[DRBD-user] Converting between DRBD device and name

Nick Dyer nick.dyer at itdev.co.uk
Thu Jan 22 12:19:23 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.


Is there a easy way of programmatically converting between the DRBD 
low-level device name (eg /dev/drbd5) and the resource name (eg 
backup-disk) without parsing the drbd.conf file?

I have a lot of scripts which do things with drbd volumes and at the 
moment I have to have a hardcoded mapping between the two: it would be 
easier if you could write something like:

$drbd_device=`drbdadm rawdevice backup-disk`
mount $drbd_device /mnt

or similar

cheers

Nick




More information about the drbd-user mailing list