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 am a newbie to drbd/heartbeat. We have two servers/nodes and have it working
w/ one exception. When the master loses networking, it stays primary. When it
regains networking, it causes a 2pri split brain since the slave took primary.
What is the best method to have the master change states when it loses
networking? We have tried using dopd and ipfail which don't seem to do that
probably due to lack of proper configuration. This is were help would be
greatly appreciated.
Failover works properly when the master is halted/rebooted. The problem
happens only when it loses networking.
Here are the configs.
======================
/etc/ha.d/haresources
primary 172.20.20.234 drbddisk::replicate-volume
Filesystem::/dev/drbd0::/replicate-volume::ext3
======================
/etc/ha.d/ha.cf
debugfile /var/log/ha-debug
logfile /var/log/ha-log
logfacility local0
keepalive 1
deadtime 20
warntime 5
initdead 60
udpport 694
ucast eth0 172.20.20.35
ucast eth0 172.20.20.235
bcast eth1
auto_failback on
node primary
node secondary
# ping_group always_up_nodes 172.20.20.1
#respawn hacluster /usr/lib/heartbeat/ipfail
#ping 172.20.20.1
auto_failback off
respawn hacluster /usr/lib/heartbeat/dopd
apiauth dopd gid=haclient uid=hacluster
======================
/etc/drbd.conf
global { usage-count yes; }
common {
protocol C;
}
resource replicate-volume {
disk {
fencing resource-only;
}
handlers {
# split-brain "/usr/lib/drbd/notify-split-brain.sh root";
pri-on-incon-degr "/usr/lib/drbd/notify-pri-on-incon-degr.sh";
pri-lost-after-sb "/usr/lib/drbd/notify-pri-lost-after-sb.sh";
local-io-error "/usr/lib/drbd/notify-io-error.sh";
split-brain "/usr/lib/drbd/notify-split-brain.sh root";
out-of-sync "/usr/lib/drbd/notify-out-of-sync.sh root";
outdate-peer "/usr/lib/heartbeat/drbd-peer-outdater";
}
net {
after-sb-0pri discard-younger-primary;
after-sb-1pri discard-secondary;
after-sb-2pri call-pri-lost-after-sb;
}
startup {
wfc-timeout 60;
}
syncer {
rate 12M;
}
on primary {
device /dev/drbd0;
disk /dev/sdb1;
address 172.20.20.35:7788;
meta-disk internal;
}
on secondary {
device /dev/drbd0;
disk /dev/sdb1;
address 172.20.20.235:7788;
meta-disk internal;
}
}
======================
Thanks,
Dan