Resource Template (Protocol C)
Creating a Resource
To create a new resource add it on the next file:
nano /etc/drbd.conf
global { usage-count no; }
resource "{DRBDRESOURCENAME}" {
protocol C;
startup {
wfc-timeout 15;
degr-wfc-timeout 60;
}
disk {
resync-rate "{SPEED IN MBITS}";
on-io-error detach;
disk-barrier no;
disk-flushes no;
}
net {
cram-hmac-alg sha1;
shared-secret "{SECRET}";
allow-two-primaries;
after-sb-0pri discard-zero-changes;
after-sb-1pri discard-secondary;
after-sb-2pri disconnect;
}
on nodeX {
device /dev/"{drbdX}";
disk /dev/zvol/"{ZFSX}"/"{zvolname}";
address "{IP}":"{PORT}";
meta-disk internal;
}
on nodeY {
device /dev/"{drbdX}";
disk /dev/zvol/"{ZFSX}"/"{zvolname}";
address "{IP}":"{PORT}";
meta-disk internal;
}
}
How to set disk re-sync rate
To setup disk Re-sync Rate add or modify the following parameter in /etc/drbd.conf
disk {
resync-rate "{SPEED IN MBITS}";
}
Example
disk {
resync-rate 400M;
}
For more parameters check: man /etc/drbd.conf