Bug#509378: should use labels for all partitions in fstab
On Tue, Dec 23, 2008 at 10:51:34PM +0000, Daniel Pocock wrote:
> Colin Watson wrote:
> >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
> That is why my earlier email proposed that we check for duplicates
> before creating fstab - however, I'm not saying it's a perfect solution.
The problem there is that all software that automatically assigns labels
has to check for duplicates, and we already know that not all such
> >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.
> That is a reasonable argument - in this case, d-i may need to force the
> user to specify (or agree to) a set of labels.
For automatic assignment, I honestly think UUIDs are the best answer,
and would rather not enforce a rather mysterious extra question (or set
of questions). Labels would be fine for manual partitioning, and I think
we can expect that people with complex setups will be biased towards
using manual partitioning.
> >I absolutely think that we should be using UUIDs by default for devices
> >where there isn't some other stable naming, as Ubuntu does.
> I think this is reasonable too, as long as we deal with the fstab issues.
> > * Labels
> > 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).
> Maybe we can create a hidden file in each filesystem to provide a clue
> about where it was mounted?
Interesting idea, although perhaps would be seen as clutter? I'm not
sure, though I'm not necessarily opposed to the idea.
(However, we'd have to be careful about the case of 8.3 filesystems;
avoiding that kind of tedious problem is one reason I lean towards
putting the information in /etc/fstab. Your suggestion for the format
was more verbose than that currently in use in Ubuntu, which would
probably be a good thing.)
Colin Watson [email@example.com]