[Drbd-dev] [PATCH 1/1] fix drbd.rules to avoid start drbd fail

Liuhua Wang lwang at suse.com
Thu Jul 10 09:47:05 CEST 2014


Hi Roland,
 
> 
> I checked with one of our senior-devs and you are actually using
> depricated behavior. What you should use is /dev/drbd/by-*, and not the
> device name in /dev.
> 

I tested pacemaker+drbd8.4.5+drbd-utils-8.9.0,
drbd resource will fail to start in case of device name
different from drbd%minor. for example:

# cat /etc/drbd.d/test.res
---------------------------
resource test {
   protocol	C;
   disk {
      on-io-error	pass_on;
   }
   on vm13-sle12b8 {
      address	192.168.124.13:7788;
      device	/dev/drbd_r0 minor 0;
      disk	/dev/sda4;
      meta-disk	internal;
   }
   on vm14-sle12b8 {
      address	192.168.124.14:7788;
      device	/dev/drbd_r0 minor 0;
      disk	/dev/sda4;
      meta-disk	internal;
   }
}
-------------------

That is because in drbd_start will wait forever for the
drbd%minor settled in loop:
---------------- 
my_udevsettle()
{
        for dev in ${DRBD_DEVICES[@]}; do
                while ! test -b $dev; do
                        sleep 1;
                done
        done
        return 0
}
----------------

I think there is either of the following way to resolve it.
1. fix drbd.rules by adding SYMLINK to drbd%minor
2. fix drbd.ocf not waiting DRBD_DEVICES but drbd%minor

What do you thinks?

> regards, rck
> 
> 




More information about the drbd-dev mailing list