[DRBD-user] Re: Converting between DRBD device and name

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


Thanks, that's just the ticket. It wasn't in any of the documentation I 
could find, unfortunately.

GAUTIER Hervé wrote:
> # drbdadm sh-dev drbd_resource ?
> 
> Nick Dyer a écrit :
>> 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




More information about the drbd-user mailing list