[plug] Long-winded dev names

Jim Householder nofixed at westnet.com.au
Mon Dec 29 16:57:13 WST 2008


Daniel Pittman wrote:
> Bernd Felsche <berfel at innovative.iinet.net.au> writes:
>> Jim Householder <nofixed at westnet.com.au> wrote:
>>
>>> The following line is extracted from Rob Dunne's  "file not found at
>>> start of boot sequence" message
>>> root=UUID=1b672a8f-71a1-4d38-86a4-c4d43fb859f9 ro single
>>> It appears that he is using SUSE or a derivative.
>>> Can anyone tell me what the advantage or benefit is obtained by using
>>> such a long-winded device name?
>> It's a unique device ID.
> 
> It is a unique *filesystem* ID.  That distinction matters because you
> can clone a filesystem and get duplicate ID values, while cloning a
> physical device is harder. ;)
> 
> 
> Moreover, the reason it matters: more and more modern hardware is
> connected to one bus or another that *only* support discovery, not
> simple enumeration.  The most common example, USB: it is absolutely
> impossible, given the design of the bus, to provide stable device
> enumeration.
> 
> (Even good old PCI is no longer assured stable: various netbook hardware
>  uses PCIe hotplug support to add and remove devices dynamically from
>  the PCI bus in the machine.)
> 
> 
> So, the net effect is that the kernel cannot assure you that sda will
> ever be the same device over two boots — today it *mostly* works, but it
> will get less and less reliable every year.
> 
> Using a stable identifier for what you care about (the root filesystem)
> rather than something unstable (whatever random SCSI node was assigned
> the disk this boot) improves life.
> 
> 
> Finally, why the UUID and not, say, the filesystem volume label?
> Because the UUID is designed to be unique, while the label is commonly
> duplicated; every RHEL4 box in the universe, more or less, has a
> partition labeled '/' on disk.
> 
>> In theory, it means that you can shuffle the discs around willy-nilly
>> and everything will still mount properly.  In practice, you sometimes
>> get the above; especially across kernel versions and drivers.
> 
> I am yet to see any distribution released in the last few years fail to
> mount the root partition correctly using a UUID or LABEL mount.
> 
> Presumably, though, you have had it fail; can you let me know where,
> please — I like to know which distributions or circumstances might lead
> to my discovering this the hard way. ;)
> 
> 
>> Myself, I prefer volume names. Volume names can also be copied when
>> you replace dodgy HDD.
> 
> If you clone the filesystem rather than the content you get the same
> effect from a filesystem UUID — but, generally, LVM volume names are a
> nice choice, too.
> 
>> Recovery from the UUID is to boot into rescue mode from CD/DVD,
>> figure out which is the root partition (e.g. /dev/sda5), and set
>> that at boot-time.
> 
> A much better approach is to boot from rescue mode, then run:
> 
>     ls -l /dev/disk/by-uuid/
> 
> Identify which is your root partition, and then update the UUID.
> (Not that this was the problem that the OP had, but whatever. :)
> 
> Regards,
>         Daniel


Thanks for enlightening me.  Looks like I'll have to learn to like it!

Jim




More information about the plug mailing list