[pkg-cryptsetup-devel] UUID in fstab for device mapper devices?

Guido Günther agx at sigxcpu.org
Fri Aug 7 15:15:06 UTC 2009


Hi Max,
thanks for bringing this up!

On Fri, Aug 07, 2009 at 04:28:46PM +0200, Max Vozeler wrote:
> [Resend to @packages.debian.org]
> 
> Hello fellow maintainers,
> 
> we recently changed d-i (partman-target, to be precise) to use 
> UUIDs in fstab in order to get stable device naming.
So you're using /dev/disk/by-uuid/<uuid> in /etc/fstab?

> Currently UUIDs are used for all devices except 
>  - /dev/fd*
>  - cryptsetup mappings
>  - those specified by explicit /dev/disk/by-* paths
I'm confused. Doesn't every disk have symlnks in /dev/disk/by-id (even
LVM LVs)?

> Since then, we concluded that it is preferable to go back to plain
> /dev/mapper/ paths for LVM LVs because those already provide stable 
> device naming (and are more descriptive).
> 
> What about your types of devices? (dmraid, multipath)

multipath.udev sets up these links for persistent device naming:

# Create persistent links for multipath tables
ENV{DM_UUID}=="mpath-*", \
	SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_NAME}"

# Create persistent links for dmraid tables
ENV{DM_UUID}=="dmraid-*", \
        SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_NAME}"

# Create persistent links for partitions
ENV{DM_PART}=="?*", \
        SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_NAME}-part$env{DM_PART}"

This is what should idealy be used in d-i for multipath device naming.
We could then start to remove the hacks that use /dev/mapper/mpath* to
reference multipath devices then.

I'd be happy to help to get this working for Squeeze.
Cheers, 
 -- Guido




More information about the pkg-cryptsetup-devel mailing list