[DRBD-user] drbd and volume label

Lars Ellenberg lars.ellenberg at linbit.com
Wed Feb 27 22:20:38 CET 2008

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


On Wed, Feb 27, 2008 at 03:03:10PM -0500, Vadym Chepkov wrote:
> Hello,
> 
> How does one use volume labels with drbd?
> 
> When I have this configuration
> 
>     device     /dev/drbd0;
>     disk       /dev/sda3;
> 
> and I assign a label: 'e2label /dev/drbd0 mylabel'
> 
> /dev/sda3 also receives the same label and when I put LABEL=mylabel
> into /etc/fstab startup script is trying to mount /dev/sda3 instead of
> /dev/drbd0.

yes.  absolutely correct, and not a problem of drbd.
I think there is a patched version of "mount" somewhere,
which takes DRBD into account.  I don't remember whether I actually
wrote the patch myself or told someone what needed to be done,
may even be in the list archives. may well be a couple years old.

maybe "modern" mount does not do the label scan by itself anymore,
though. in which case it would be some udev rule populating
some directory, or libblkid populating some cache file.

as you may know, any "transparent" virtual block device would have this
problem: the label can be found via the "physical" and any layered
transparent "virtual" block device.

thus all these virtual block devices get special treatment by the
"mount by label" code. drbd would need to get that same special
treatment as well.

it may be possible to do a "manual override"
(using some udev rule, or pre-populating the blkid cache,
or specifying some "ignore" filters somewhere).
but I never tried. I admit that I do mount by device name.

-- 
: Lars Ellenberg                           http://www.linbit.com :
: DRBD/HA support and consulting             sales at linbit.com :
: LINBIT Information Technologies GmbH      Tel +43-1-8178292-0  :
: Vivenotgasse 48, A-1120 Vienna/Europe     Fax +43-1-8178292-82 :
__
please use the "List-Reply" function of your email client.



More information about the drbd-user mailing list