[DRBD-user] Is it possible to block the boot process until the end of sync ?

Lars Ellenberg lars.ellenberg at linbit.com
Mon Jan 26 15:23:45 CET 2009

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


On Mon, Jan 26, 2009 at 01:06:23PM +0100, Vianney Lejeune wrote:
> Hello,
>
> I have a problem using DRBD 8.0.5.

we have a variety of other versions to choose from.
I recommend the latest...
  ;)

which would be 8.0.14, or 8.3.0.

> When a large amount of data has to be 
> sync between 2 nodes, it takes some time.

yes?

> So  the server runs some  
> starts up scripts (including heartbeat, I didn't manage to make it wait 
> after the boot process for some reasons) even if the DRBD device isn't 
> ready and synced.

well. then you should investigate "some reasons" more closely.

> Hence, I wonder if it's possible to make DRBD block the boot process  
> until the device is synced and ready ?

Our drbd init script by default waits for drbd to establish its
connection to the peer (or go StandAlone, which should not happen
usually).

so it is not only possible,
it is supposed to be the default behaviour for drbd
to wait until it is "ready".
(ok, or the configured wfc-timeout/degr-wfc-timeout is reached,
which by default is "forever" respective two minutes, iirc.)

if you actually would want it to block until it is fully
re-synchronized, then you'd have to alter the drbd init script,
and add a something like
  for dev in $(drbdadm sh-dev all) ; do
  	drbdsetup $dev wait-sync
  done

where there is currently only the $DRBDADM wait-con-int

(all typos and thinkos mine, use at your own risk.)

-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
__
please don't Cc me, but send to list   --   I'm subscribed



More information about the drbd-user mailing list