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

Guido Günther agx at sigxcpu.org
Mon Aug 10 07:06:57 UTC 2009


Hi Ferenc,
On Sun, Aug 09, 2009 at 09:31:48PM +0200, Ferenc Wagner wrote:
> Guido Günther <agx at sigxcpu.org> writes:
> 
> > On Sun, Aug 09, 2009 at 04:57:28PM +0200, Ferenc Wagner wrote:
> >
> >> OK, so the problem is identifying multipath devices in d-i.  So that
> >> option would be better called d-i_friendly_names, because from the
> >> user PoV losing name persistence -- which this option implies --,
> >> isn't friendly or useful, in my opinion.  If only multipath used
> >
> > To avoid we're furhter talking past each other: which device names
> > aren't persistent from your PoV when using user_friendly_names? 
> 
> I was wrong.  The "friendly" mpath<n> names are persistent, because
> /var/lib/multipath/bindings takes care of the persistence.  But they
> are arbitrary, and subject to change between machines.  (Actually,
> I've never used them, please correct me if I'm wrong again.)
It's correct this way. The names are of course persistent across reboots
since they're stored in a mapping file but not persistent across
machines. Good to have this sorted out.

> > Dropping user_friendly_names won't give you name persistence with and
> > without mp all by itself. You'll either have to use disk/by-id or
> > disk/by-uuid to achive that.
> 
> Why not?  The WWIDs, which are used to name the devices by default,
> are persistent and also consistent between machines, aren't they?
Yes, these are persistent across machines but they aren't persistent as
to switching multipath on and off (see below).

> I've been using them on this assumption for years, and it seems to
> work out...  Please explain why the udev symlinks would be any better
> (given that I'm not interested in using filesystem UUIDs).
We could have the same fstab with and without multipath. This would be
convenient for our users since they'd have easier means of error
recovery (and an easy way to turn multipath on and off):

Without multipath:
/dev/disk/by-uuid/<UUID> -> /dev/sdaY 

With multipath:
/dev/disk/by-uuid/<UUID> -> /dev/mapper/<WWID>-partY

Udev would handle this transparently. Something similar can possibly be
done by looking at /dev/disk/by-id/scsi-<WWID>-partY (using the WWID
instead of the fs UUID) but I'd have to check the details for that.

> To get really friendly names, I define aliases in multipath.conf, but
> that's mostly sugar, I could do without them.  Losing name consistency
> amongst different machines would be a major inconvenience, though.
I wouldn't object getting rid of user_friendly_names in multipath.conf,
but preferably by switching to /dev/disk/by-{uu,}id then.
Cheers,
 -- Guido




More information about the pkg-cryptsetup-devel mailing list