<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi All,<br>
<br>
I need to use very low bandwith network between 2 machines using
drbd and I try using csums-alg/verify-alg.<br>
<br>
But I've same duration with or without csums-alg !<br>
<br>
Execution with csums-alg:<br>
<blockquote><tt>[root@sms246105 drbd.d]# cat /proc/drbd</tt><br>
<tt>version: 8.4.2 (api:1/proto:86-101)</tt><br>
<tt>GIT-hash: 7ad5f850d711223713d6dcadc3dd48860321070c build by
root@rh63_build, 2013-01-10 09:57:53</tt><br>
<br>
<tt> 1: cs:SyncTarget ro:Secondary/Secondary
ds:Inconsistent/UpToDate C r-----</tt><br>
<tt> ns:0 nr:512 dw:512 dr:147968 al:0 bm:9 lo:0 pe:0 ua:0 ap:0
ep:1 wo:f oos:4904384</tt><br>
<tt> [>....................] sync'ed: 3.0% (4788/4932)M</tt><br>
<tt> finish: 0:15:17 speed: 5,332 (5,284) want: 2,040 K/sec</tt><br>
</blockquote>
<br>
Execution without csums-alg:<br>
<blockquote><tt>[root@sms246105 drbd.d]# cat /proc/drbd</tt><br>
<tt>version: 8.4.2 (api:1/proto:86-101)</tt><br>
<tt>GIT-hash: 7ad5f850d711223713d6dcadc3dd48860321070c build by
root@rh63_build, 2013-01-10 09:57:53</tt><br>
<br>
<tt> 1: cs:SyncTarget ro:Secondary/Secondary
ds:Inconsistent/UpToDate C r-----</tt><br>
<tt> ns:0 nr:53760 dw:53760 dr:0 al:0 bm:3 lo:0 pe:0 ua:0 ap:0
ep:1 wo:f oos:4819904</tt><br>
<tt> [>....................] sync'ed: 1.2% (4704/4756)M</tt><br>
<tt> finish: 0:14:52 speed: 5,376 (5,376) want: 2,040 K/sec</tt><br>
</blockquote>
I don't know where is the problem... is csums-alg usable only in a
more recent version of DRBD (like 8.4.3 or 8.4.4) ?<br>
I've built drbd packages from source, perhaps I need to specify an
option in order to have csums-alg facility (I'll check for this) ?<br>
<br>
I've put csums-alg in "net" section and in some web pages I've found
a "syncer" section with csums-alg (seems no more available in 8.4.x
versions).<br>
==> what's the good place ?<br>
<br>
On both machines, I do this sequence:<br>
<blockquote><tt><small><big># /etc/init.d/drbd stop<br>
# delete all partition on /dev/sdb and create a 5GB (for my
tests, real size is around 300GB) partitions with fdisk<br>
# partprobe /dev/sdb</big><br>
<big>#</big></small></tt><tt><b><small> </small></b></tt><tt>dd
if=/dev/zero of=</tt><tt>dev/sdb1</tt><tt> bs=4096</tt><tt>
==> to initialize disk content<br>
</tt><tt># mkfs.ext3 -j -m 0 -b 4096 /dev/sdb1</tt><tt><br>
</tt><tt># PARTSIZE=`sfdisk -s </tt><tt>/dev/sdb1</tt><tt> |
xargs -i echo "{} 1024 / 1024 / p" | dc`</tt><tt><br>
</tt><tt># NEWSIZE=$[${PARTSIZE}-2]</tt><tt><br>
</tt><tt># resize2fs </tt><tt>/dev/sdb1</tt><tt> ${NEWSIZE}G</tt><tt><br>
</tt><tt># e2fsck -f /dev/sdb1</tt><tt><br>
</tt><tt># /etc/init.d/drbd start</tt><tt><br>
</tt><tt># /sbin/drbdadm create-md sqldata</tt><tt><br>
</tt><tt>#</tt><tt> </tt><tt>/sbin/drbdadm up sqldata</tt><tt><br>
</tt><tt>On one machine: # /sbin/drbdadm --force primary sqldata</tt><br>
</blockquote>
The file /etc/drbd.d/sqldata.res :<br>
<blockquote><tt>resource sqldata {</tt><tt><br>
</tt><tt> device /dev/drbd_sqldata minor 1;</tt><tt><br>
</tt><tt> disk /dev/sdb1;</tt><tt><br>
</tt><tt> meta-disk internal;</tt><tt><br>
</tt><tt> on sms246104 {</tt><tt><br>
</tt><tt> address 135.117.246.104:7788;</tt><tt><br>
</tt><tt> }</tt><tt><br>
</tt><tt> on sms246105 {</tt><tt><br>
</tt><tt> address 135.117.246.105:7788;</tt><tt><br>
</tt><tt> }</tt><tt><br>
</tt><tt>}</tt><br>
</blockquote>
The file /etc/drbd.d/global_common.conf :<br>
<blockquote><tt>global {</tt><br>
<tt> usage-count yes;</tt><br>
<tt> dialog-refresh 1;</tt><br>
<tt> minor-count 5;</tt><br>
<tt>}</tt><br>
<tt>common {</tt><br>
<tt> handlers {</tt><br>
<tt> pri-on-incon-degr
"/usr/lib/drbd/notify-pri-on-incon-degr.sh;
/usr/lib/drbd/notify-emergency-reboot.sh; echo b >
/proc/sysrq-trigger ; reboot -f";</tt><br>
<tt> pri-lost-after-sb
"/usr/lib/drbd/notify-pri-lost-after-sb.sh;
/usr/lib/drbd/notify-emergency-reboot.sh; echo b >
/proc/sysrq-trigger ; reboot -f";</tt><br>
<tt> local-io-error "/usr/lib/drbd/notify-io-error.sh;
/usr/lib/drbd/notify-emergency-shutdown.sh; echo o >
/proc/sysrq-trigger ; halt -f";</tt><br>
<tt> split-brain "/usr/lib/drbd/notify-split-brain.sh
root";</tt><br>
<tt> }</tt><br>
<br>
<tt> startup {</tt><br>
<tt> wfc-timeout 15;</tt><br>
<tt> }</tt><br>
<br>
<tt> options {</tt><br>
<tt> }</tt><br>
<br>
<tt> disk {</tt><br>
<tt> on-io-error detach;</tt><br>
<tt> c-plan-ahead 20;</tt><br>
<tt> c-fill-target 50k;</tt><br>
<tt> c-min-rate 250k;</tt><br>
<tt> c-max-rate 2M;</tt><br>
<tt> }</tt><br>
<br>
<tt> net {</tt><br>
<tt> timeout 60;</tt><br>
<tt> ping-int 6;</tt><br>
<tt> after-sb-0pri discard-younger-primary;</tt><br>
<tt> after-sb-1pri discard-secondary;</tt><br>
<tt> after-sb-2pri call-pri-lost-after-sb;</tt><br>
<tt> ping-timeout 60;</tt><br>
<tt> protocol C;</tt><br>
<tt> cram-hmac-alg sha1;</tt><br>
<tt> shared-secret "TestHA";</tt><br>
<tt> csums-alg sha1;</tt><br>
<tt> verify-alg sha1;</tt><br>
<tt> }</tt><br>
<tt>}</tt><br>
</blockquote>
<br>
Traces in /var/log/kern.log :<br>
<blockquote><tt>Sep 5 13:03:16 sms246104 kernel: events: mcg drbd:
2</tt><br>
<tt>Sep 5 13:03:16 sms246104 kernel: drbd: initialized. Version:
8.4.2 (api:1/proto:86-101)</tt><br>
<tt>Sep 5 13:03:16 sms246104 kernel: drbd: GIT-hash:
7ad5f850d711223713d6dcadc3dd48860321070c build by
root@rh63_build, 2013-01-10 09:57:53</tt><br>
<tt>Sep 5 13:03:16 sms246104 kernel: drbd: registered as block
device major 147</tt><br>
<tt>Sep 5 13:03:16 sms246104 kernel: d-con sqldata: Starting
worker thread (from drbdsetup [21781])</tt><br>
<tt>Sep 5 13:03:16 sms246104 kernel: block drbd1: disk( Diskless
-> Attaching )</tt><br>
<tt>Sep 5 13:03:16 sms246104 kernel: d-con sqldata: Method to
ensure write ordering: flush</tt><br>
<tt>Sep 5 13:03:16 sms246104 kernel: block drbd1: max BIO size =
524288</tt><br>
<tt>Sep 5 13:03:16 sms246104 kernel: block drbd1: drbd_bm_resize
called with capacity == 10486656</tt><br>
<tt>Sep 5 13:03:16 sms246104 kernel: block drbd1: resync bitmap:
bits=1310832 words=40964 pages=41</tt><br>
<tt>Sep 5 13:03:16 sms246104 kernel: block drbd1: size = 5120 MB
(5243328 KB)</tt><br>
<tt>Sep 5 13:03:16 sms246104 kernel: block drbd1: bitmap READ of
41 pages took 1 jiffies</tt><br>
<tt>Sep 5 13:03:16 sms246104 kernel: block drbd1: recounting of
set bits took additional 0 jiffies</tt><br>
<tt>Sep 5 13:03:16 sms246104 kernel: block drbd1: 5051 MB
(1293168 bits) marked out-of-sync by on disk bit-map.</tt><br>
<tt>Sep 5 13:03:16 sms246104 kernel: block drbd1: disk( Attaching
-> UpToDate ) pdsk( DUnknown -> Outdated )</tt><br>
<tt>Sep 5 13:03:16 sms246104 kernel: block drbd1: attached to
UUIDs
646C4E1151078FBF:DAB8D60C65E253A0:0000000000000004:0000000000000000</tt><br>
<tt>Sep 5 13:03:16 sms246104 kernel: d-con sqldata: conn(
StandAlone -> Unconnected )</tt><br>
<tt>Sep 5 13:03:16 sms246104 kernel: d-con sqldata: Starting
receiver thread (from drbd_w_sqldata [21782])</tt><br>
<tt>Sep 5 13:03:16 sms246104 kernel: d-con sqldata: receiver
(re)started</tt><br>
<tt>Sep 5 13:03:16 sms246104 kernel: d-con sqldata: conn(
Unconnected -> WFConnection )</tt><br>
<tt>Sep 5 13:03:37 sms246104 kernel: d-con sqldata: Handshake
successful: Agreed network protocol version 101</tt><br>
<tt>Sep 5 13:03:37 sms246104 kernel: d-con sqldata: Peer
authenticated using 20 bytes HMAC</tt><br>
<tt>Sep 5 13:03:37 sms246104 kernel: d-con sqldata: conn(
WFConnection -> WFReportParams )</tt><br>
<tt>Sep 5 13:03:37 sms246104 kernel: d-con sqldata: Starting
asender thread (from drbd_r_sqldata [21786])</tt><br>
<tt>Sep 5 13:03:37 sms246104 kernel: block drbd1:
drbd_sync_handshake:</tt><br>
<tt>Sep 5 13:03:37 sms246104 kernel: block drbd1: self
646C4E1151078FBE:DAB8D60C65E253A0:0000000000000004:0000000000000000
bits:1293168 flags:0</tt><br>
<tt>Sep 5 13:03:37 sms246104 kernel: block drbd1: peer
DAB8D60C65E253A0:0000000000000000:0000000000000000:0000000000000000
bits:1293168 flags:0</tt><br>
<tt>Sep 5 13:03:37 sms246104 kernel: block drbd1:
uuid_compare()=1 by rule 70</tt><br>
<tt>Sep 5 13:03:37 sms246104 kernel: block drbd1: Becoming sync
source due to disk states.</tt><br>
<tt>Sep 5 13:03:37 sms246104 kernel: block drbd1: peer( Unknown
-> Secondary ) conn( WFReportParams -> WFBitMapS ) pdsk(
Outdated -> Inconsistent )</tt><br>
<tt>Sep 5 13:03:37 sms246104 kernel: block drbd1: send bitmap
stats [Bytes(packets)]: plain 0(0), RLE 25(1), total 25;
compression: 100.0%</tt><br>
<tt>Sep 5 13:03:37 sms246104 kernel: block drbd1: receive bitmap
stats [Bytes(packets)]: plain 0(0), RLE 25(1), total 25;
compression: 100.0%</tt><br>
<tt>Sep 5 13:03:37 sms246104 kernel: block drbd1: helper command:
/sbin/drbdadm before-resync-source minor-1</tt><br>
<tt>Sep 5 13:03:37 sms246104 kernel: block drbd1: helper command:
/sbin/drbdadm before-resync-source minor-1 exit code 0 (0x0)</tt><br>
<tt>Sep 5 13:03:37 sms246104 kernel: block drbd1: conn( WFBitMapS
-> SyncSource )</tt><br>
<tt>Sep 5 13:03:37 sms246104 kernel: block drbd1: Began resync as
SyncSource (will sync 5172672 KB [1293168 bits set]).</tt><br>
<tt>Sep 5 13:03:37 sms246104 kernel: block drbd1: updated sync
UUID
646C4E1151078FBE:DAB9D60C65E253A0:DAB8D60C65E253A0:0000000000000004</tt><br>
</blockquote>
<br>
I hope someone will be able to help me...<br>
<br>
Perhaps, I'm totally wrong on csums-alg usage !<br>
<br>
Regards<br>
<br>
<br>
<br>
<br>
<br>
</body>
</html>