[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#572376: linux-base: Please use UUID for swap, not LABEL



On Wed, 2010-03-03 at 23:26 -0800, Josh Triplett wrote:
> On Thu, Mar 04, 2010 at 01:01:02AM +0000, Ben Hutchings wrote:
> > On Wed, 2010-03-03 at 11:41 -0800, Josh Triplett wrote:
> > > Package: linux-base
> > > Version: 2.6.33-1~experimental.2
> > > Severity: normal
> > > 
> > > The conversion script decided to use LABEL=myhostname-swap for my swap
> > > partition.  Swap partitions support UUIDs too; please consider using
> > > those instead.
> > 
> > I think labels are far more user-friendly since they are actually
> > memorable.  Therefore, for devices that have both a label and a UUID,
> > the label will be used, and for devices that have neither, a label will
> > be generated.  You are free to reject the plan and edit files yourself.
> > Unless you can give a very good reason why UUIDs are preferable, I will
> > not implement this.
> 
> I can give several good reasons.
> 
> UUIDs generally can't collide; labels can.  Bad Things could happen if
> two different partitions end up with the same label.

That's why I include the hostname in generated labels, and avoid all the
existing disk labels.

> Consider what would happen if you had a Linux install on a USB flash
> drive.  (I have several specialized Debian systems that run off USB
> drives.)  What happens if you plug a system with a partition labeled
> "/" into a system which already has a partition labeled "/"?
> 
> UUIDs generally won't appear anywhere where "user-friendly" matters.
> Users shouldn't fiddle with /etc/fstab or similar unless they have a
> clue.  Graphical tools will use a label if available, even if the actual
> mount call doesn't.

And clueful users can remember UUIDs, can they?

> Furthermore, filesystems won't necessarily already have labels, while
> all filesystems *should* have UUIDs.

Though this is not yet true for swap partitions.

> A few references I found:
> 
> http://www.mail-archive.com/debian-user@lists.debian.org/msg478822.html
> https://bugzilla.redhat.com/show_bug.cgi?id=364441
> 
> Does all of this provide sufficient reason, or should I provide more?
> :)

There is one argument you missed: consistency with new installations,
which do use UUIDs.  So I will consider doing this now, but it's quite a
lot of work.

Ben.

-- 
Ben Hutchings
Q.  Which is the greater problem in the world today, ignorance or apathy?
A.  I don't know and I couldn't care less.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: