Re: dm(-crypt) and /dev/disk/by-label/

From: Alexander E. Patrakov
Date: Mon May 14 2007 - 09:04:55 EST


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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/