[DRBD-user] Advice on drbd8 config options

George H george.dma at gmail.com
Mon Feb 4 10:29:20 CET 2008

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Hi,

I used to use DRBD v0.7.20 and now I am doing a new install with
v8.0.8 and I noticed that a lot has changed in the config file.

My setup is Active/Passive (Primary/Secondary), I am using UCARP for
IP Failover and it allows me to run a script when it fails over. I am
really just needing the failover when there is a network failure.

My questions are what does DRBD do automatically and what needs the
administrator to do manually.

For example if Master node gets cut off from the network the Slave
node will notice and UCARP will failover the virtual IP. DRBD will get
disconnected from the primary node. Will DRBD automatically promote
itself into Primary ? or do I have to make UCARP run "drbdadm primary
r0" to do this ?

When the failed primary comes back on the network I can have UCARP run
"drbdadm secondary r0" or should I just not do anything and DBRD will
put itself in secondary mode on its own and re-sync ?

Should fencing be "don't care" ?

I notice drbd has some emailing featuers during split brain I dont'
understand too much what "pri-lost" directive does. Does it mean when
the Failed primary node comes back up and is going to be demoted to
secondary and re-sync then to send an email ?

In the sample config file there is a section that mimic 0.7.x drbd strategy

after-sb-0pri discard-younger-primary;
after-sb-1pri consensus;
after-sb-2pri disconnect;

Does it make sense to change "discard-younger-primary" to
"discard-least-changes" since the node that is newly primary will be
the only one active on the network and thus will have more changes on
it ? or will discard-younger-primary do the same thing ?

Thanks for any suggestions and advice.

-
My current DRBD config file is as follows:

global { usage-count no; }
common { syncer { rate 10M; al-extents 257;} }
resource r0
{
protocol C;

handlers {
pri-on-incon-degr "echo o > /proc/sysrq-trigger ; halt -f"
pri-lost-after-sb "echo o > /proc/sysrq-trigger ; halt -f"
local-io-error "echo o > /proc/sysrq-trigger ; halt -f"
}

startup { degr-wfc-timeout 120; }
disk { on-io-error detach; fencing dont-care };

net {
ko-count 4;
cram-hmac-alg "sha256";
shared-secret "blablalba";
after-sb-0pri discard-younger-primary;
after-sb-1pri consensus;
after-sb-2pri disconnect;
rr-conflict disconnect;
}

on node1 {
device /dev/drbd0;
disk /dev/sda4;
address 192.168.0.1;
meta-disk internal;
}

on node2 {
device /dev/drbd0;
disk /dev/sda4;
address 192.168.0.2;
meta-disk internal;
}
}

-- 
"Nothing is impossible for the person that doesn't have to do it"
"The probability of anything happening is in inverse ratio to its desirability"
--
George H
george.dma at gmail.com



More information about the drbd-user mailing list