[DRBD-user] Patch for having init.d script wait for lower level and meta device

Mrten mrten+drbd at ii.nl
Wed Jul 6 23:31:16 CEST 2011

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

On 2011-07-06 21:58, Florian Haas wrote:

>> Attached is a patch for the init.d script which makes the
>> drbd-script wait for the arrival of the ll- and md-devices.
> Excellent contribution,

Not too excellent alas, for today I've encountered a sorta-kinda race
condition with md, which starts devices with size zero (which is too
small for drbd :) to be scaled up to size later.

So there needs to be another condition in the while-loop to check the
size of the device (I settled for `blockdev --getsize64` -gt 0).

> however if you are getting bitten by this here is a practical
> workaround: as a general rule, the preferred management framework for
> DRBD is Pacemaker, and on Pacemaker managed clusters it is entirely
> appropriate to leave the init script disabled (chkconfig drbd off).
> At that point Pacemaker will take care of everything (including
> loading the drbd.ko module), and all of this will obviously occur
> long after your udev has settled.

Thank you for pointing me to Pacemaker; however, if one would call the
learning curve for understanding drbd 'steep', I would call the curve
for Pacemaker, well, 'straight up'? Really, for what I'm using drbd
a complete cluster management suite is a bit much.

I realize that I'm not being the usual drbd-customer here, but I thought
I'd share what I discovered along the way so that maybe more people can

If there's another avenue for that I'd love to hear about it.

thanks for replying,

More information about the drbd-user mailing list