2007-05-14 11:58:37

by Christian Hesse

[permalink] [raw]
Subject: dm(-crypt) and /dev/disk/by-label/

Hello everybody,

If this is the wrong place to ask, please tell me where to ask instead.

I have ext3 filesystems with labels on devicemapper crypted devices. These do
not show up in /dev/disk/by-label/, in contrast to filesystems of my "real"
partitions. Is this the expected behaviour or what could go wrong?
--
Regards,
Chris


Attachments:
(No filename) (333.00 B)
signature.asc (189.00 B)
This is a digitally signed message part.
Download all attachments

2007-05-14 13:04:53

by Alexander E. Patrakov

[permalink] [raw]
Subject: Re: dm(-crypt) and /dev/disk/by-label/

Christian Hesse wrote:
> Hello everybody,
>
> If this is the wrong place to ask, please tell me where to ask instead.

linux-hotplug-devel, but they will tell you to ask your distro vendor.

> I have ext3 filesystems with labels on devicemapper crypted devices. These do
> not show up in /dev/disk/by-label/, in contrast to filesystems of my "real"
> partitions. Is this the expected behaviour or what could go wrong?

Some distributions intentionally tell udev to ignore device-mapper devices
completely, for the following reasons:

1) without this prohibition, udev creates /dev/dm-* devices, and LILO breaks
completely if they are present instead of the correct /dev/mapper/* nodes
created by dmsetup and similar tools

2) without this prohibition, udev tries to open snapshot devices managed by
dm-snapshot. The problem is that LVM2 sometimes creates such snapshots with
the intention just to see whether it can be done. Udev keeps the temporary
device open and thus prevents LVM2 from removing the temporary snapshot cleanly.

More details can be found at:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=401393
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=392623
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=343671
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=344040

Since the only known way to solve the above problems at that time was to
prevent udev from looking at device-mapper, crypted devices don't show up in
/dev/disk/by-label/ on your system.

--
Alexander E. Patrakov

2007-05-14 19:56:53

by Jan Engelhardt

[permalink] [raw]
Subject: Re: dm(-crypt) and /dev/disk/by-label/


On May 14 2007 19:06, Alexander E. Patrakov wrote:
> Christian Hesse wrote:
>> Hello everybody,
>>
>> I have ext3 filesystems with labels on devicemapper crypted devices. These
>> do not show up in /dev/disk/by-label/, in contrast to filesystems of my
>> "real" partitions. Is this the expected behaviour or what could go wrong?
>
> Some distributions intentionally tell udev to ignore device-mapper devices
> completely, for the following reasons:
>
> 1) without this prohibition, udev creates /dev/dm-* devices, and LILO breaks
> completely if they are present instead of the correct /dev/mapper/* nodes
> created by dmsetup and similar tools

Uhm, openSUSE does not have this prohibition. /dev/dm-\d+ exist,
/dev/mapper/\w+ exist, as do /dev/disk/by-label/\w+. Though,
it uses GRUB by default.


Jan
--