Bug#509378: should use labels for all partitions in fstab
On Sun, Dec 21, 2008 at 08:15:55PM +0000, Daniel Pocock wrote:
> I believe it would be much safer to use labels for partitions rather
> than using the device nodes.
Automatically assigning labels is a really, really bad idea. Red Hat
tried this and the result was that if you did two Red Hat installations
on the same machine then they would get terribly confused on boot as
there would be two filesystems with LABEL=root. I spoke to the Anaconda
developers about this in person some time back, and they agreed that
this was a mistake (I think UUIDs may have been unavailable at the
Of course you could try to generate universally unique labels, but this
is a bit silly when we already have UUIDs. Labels should be reserved for
assignment by the system administrator.
I absolutely think that we should be using UUIDs by default for devices
where there isn't some other stable naming, as Ubuntu does.
Note that pretty much every naming system has its downsides:
* Traditional device names
Fail when devices are enumerated in a different order at boot, or
when the kernel changes device naming (e.g. IDE -> libata).
Good when assigned manually by the system administrator, but
assigning automatically is fraught with problems. Bit-for-bit
filesystem copies will preserve the label, which is fine for backup
and restore but can have surprising results. If you have to
reconstruct a filesystem during disaster recovery you need to
remember to reset the label too (or adjust /etc/fstab).
Every filesystem already has one so they can be used automatically.
Long and difficult to remember. Bit-for-bit filesystem copies will
preserve the UUID, which is fine for backup and restore but can have
surprising results. If you have to reconstruct a filesystem during
disaster recovery you need to remember to reset the UUID too (or
If your disk fails and you have to plug in a new one with a
different serial number, you have to remember to adjust /etc/fstab.
If you have to move a disk to a different hardware location, you
have to remember to adjust /etc/fstab.
IMO the best answer is to use UUIDs by default, but use labels if they
are manually set during installation. This way people who don't care can
have it just work, and people who care can set labels. In Ubuntu we put
a comment above the UUID in /etc/fstab with the original traditional
device name for the device in question, which is often a useful
> The only solution I can see is for d-i to enforce the use of labels for
> /boot and other non-LVM filesystems. Using the labels with LVM
> filesystems would be nice but not essential.
I think it's best to use the LVM names for LVM filesystems, since they
already form a stable naming scheme.
Colin Watson [firstname.lastname@example.org]