[DRBD-user] uuid, label or equivalent in drbd.conf

Admin drbd-info at internode.com.au
Mon Apr 10 11:09:05 CEST 2006

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


On Friday 07 April 2006 17:38, Lars Ellenberg wrote:
> / 2006-04-07 16:44:30 +0930
>
> \ Admin:
> > Is there a way to tell drbd to identify a block device some way other
> > than by /dev/<node>? I'm assuming that evms volume labels should be the
> > way to go but I can't get that to work (see below).
>
> not drbd's but "somebody elses problem", namely udev...
>
> man scsi_id
> man 8 udev
>
>   An example custom udev rule using scsi_id, that will name a block
>   device and any partitions for the device matching the scsi_id
>   output of 312345:
>
>   BUS=="scsi", PROGRAM=="/sbin/scsi_id -d %N -s %p", RESULT=="312345",
> NAME="disk%n"
>
> hth,

That was what I tried, but there is a problem.

If I go with a completely dynamic /dev (letting udev populate it as it sees 
fit, including my rules to force sdb instead of sda), then there ends up 
being no /dev/sdaX nodes. Consequently drbd chokes on startup since it 
expects that node to exist.

Alternately, if I keep /dev populated with standard nodes and let udev overlay 
them (as gentoo does) then /dev/sdaX will exist. Unfortunately, udev will 
create /dev/sdbX with the same major/minor numbers as the 
preexisting /dev/sdaX. This also results in drbd complaining since drbd1 and 
drbd2 try to open the same device. (I might be assuming too much here - does 
having the same major/minor still mean the same device in 2.6?)

I've just tried putting drbd1 and drbd2 on linear md devices (which makes 
sense for future expansion if required). This results in the correct devices 
being opened, except that drbd refuses to initialise since the first device 
(on the drive I physically removed) is now deemed too small.

 * Starting DRBD ...ioctl(,SET_DISK_CONFIG,) failed: Invalid argument
Meta device too small.
Command '/sbin/drbdsetup /dev/drbd1 disk /dev/md4 internal -1 
--on-io-error=detach' terminated with exit code 20

The init script is doing a 'drbdadm up all', so I could do a 'drbdadm up 
disk2' instead and leave the first disk down, but that requires either manual 
intervention or rewriting the init script (which is always a possibility I 
guess)

Is this something that would be helped by the 'on-io-error detach' mode being 
extended to startup so the one can bring a node up diskless if desired?

Has this issue been discussed on the list previously?

Thanks again
Admin



More information about the drbd-user mailing list