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

Re: Why I don't like UUIDs (Re: can't mount sdf1 in stretch, gparted claims its fat32)



On Wed, Feb 05, 2020 at 01:43:37PM -0600, David Wright wrote:
On Wed 05 Feb 2020 at 09:00:41 (-0500), Michael Stone wrote:
On Tue, Feb 04, 2020 at 07:04:16PM -0500, Stefan Monnier wrote:
> While I'm sure this can be managed by explicitly setting UUIDs, I've
> found it much more pleasant to manage explicit names (I personally
> prefer LVM names over filesystem labels, but filesystem labels work well
> for those filesystems I don't put under LVM).  Not only I can pronounce
> them and they carry meaning, but they tend to be much more visible (and
> hence easier to manipulate).

I dislike using names becaues it's *much* more common to find name
collisions than UUID collisions. (E.g., a bunch of disks with
filesystems all labeled with easy to remember names like "root" or
"home".) Reboot with a couple of those in your system on a
label-oriented configuration and you may have a very bad day.

Rather a strawman argument there. There's no reason not to choose
sensible LABELs, unlike the examples you've given there, which fail
for at least two reasons: they're unlikely to be unique and they're
too overloaded with meaning.

What does "sensible" mean in this context? On a static system all of this is a complete waste of time because nothing changes. If you start upgrading disks, using external drives, moving things around, etc., it may very well be that the same "sensible" label applies to a filesystem found on more than one disk. Can problems be avoided through careful attention to detail? Sure--but the same is true of many other systems. I submit that labels are not inherently "better", but merely a matter of preference. If you like them, great! Have fun! If giving every thumbdrive its own label and mountpoint makes you happy, go for it. I generally expect thumbdrives to be consumables, mount them at generic points, and call it a day. YMMV.

And FWIW, those aren't "strawman arguments", those are based on things I've found in the real world. Just because you personally use a feature in a particular way doesn't mean everyone else does. Sometimes a standard install of an OS can default to labeling schemes that cause conflicts if you put the drive from one machine into another machine--so this really isn't something I'm making up out of thin air that never happens in real life.

LVM is
more resistant to that as long as you keep the vg names unique. (Call
everything vg0 and you're back to having a bad day.)

It seems that saying "keep the vg names unique" is not very different
from saying to keep filesystem LABELs unique.

It's pretty much exactly the same. If you have multiple logical entities addressed by the same name, you might not get the entity you expected to get. This isn't always obvious to someone starting out who reads something like "labels prevent problems" and hasn't yet run into cases where that isn't true and thus hasn't adopted strategies to avoid those problems.


Reply to: