drbd.conf
October 31st, 2010 . by adminStructur of file /etc/drbd.conf
global {}
common {}
resource res-0 {}
..
..
resource ress-n{}
where resource is:
resource name {
on {}
on {}
startup {}
syncer {}
handlers {}
net {}
disk {}
protocol {}
}
Each resource section needs:
- 2 on host sections
- May have a startup, syncer, handlers, net, disk.
- Required parameter in this section: protocol.
where:
on alf {
device /dev/drbd0;
disk /dev/hdc5;
address 192.168.22.12:7788;
meta-disk internal;
#or meta-disk /dev/sdbx[idx];
}
startup {
wfc-timeout
degr-wfc-timeout
wait-after-sb
become-primary-on both
}
syncer {
rate, after, al-extents
}
handlers {
pri-on-incon-degr
pri-lost-after-sb
pri-lost
outdate-peer
local-io-error
split-brain
}
net {
sndbuf-size, timeout, connect-int, ping-int, ping-timeout, max-buffers,
max-epoch-size, ko-count, allow-two-primaries, cram-hmac-alg, shared-secret,
after-sb-0pri, after-sb-1pri, after-sb-2pri
}
disk {
on-io-error, size, fencing, use-bmbv,
no-disk-flushes, no-md-flushes
}
protocol { A | B | C }
Parameters:
pri-on-incon-degr: primary on inconsistent data, degraded(cluster with only one node left)
pri-lost-after-sb: primary lost after split brain
wfc-timeout: wait for connection timout
degr-wfc-timeout: degraded wait for connection timout
rate: on 100Mbit ethernet, you cannot expect more than 12.5 MByte
after-sb-0pri: after split brain zero(no) node is primary
after-sb-1pri: after split brain one node is primary, other is secondary
after-sb-2pri: : after split brain two node are primary
for more see:
man drbd.conf
man drbdsetup
less /etc/drbd.conf