[DRBD-user] DRBD and Heartbeat

John Baker jbaker at sasami.atomised.org
Mon Dec 26 18:23:34 CET 2005

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


I'm evaluating drbd and heartbeat, and have a very simple problem that I'm
sure others have tackled.

I have two machines, A and B, both running drbd. Let's consider A to be the
primary, and B to be the secondary. I would like heartbeat to switch B to
the primary drbd in the event of A crashing. I do not wish to share an IP
between the two machines - I just want something like this executed on B:

  drbdadm primary all ; mount /dev/drbd0 /mnt/drbd0
I've been reading the heartbeat (1.2.x) docs and I'm sure this is possible,
however while I have drbd doing precisely what I want it to do (I'm using
gentoo - I emerged, quicky configured and it "just worked"), I can not
get heartbeat working properly.

So my question is: Is this possible and does anyone have it working?
If so, do you fancy sharing some heartbeat configuration files (ha.cf and

I also have another thought; if A crashes, and B takes over, I do not wish A
become the primary as soon as it comes back online, or rather, what I'd like
is a "flip flop" effect. When A crashes and comes back online, I wish it to
become the secondary drbd instance, resync, and not become the primary until
B goes offline.

Thanks in advance, and Merry Christmas.


More information about the drbd-user mailing list