Re: [Hampshire] fstab & UUID - sanity check

Top Page
Author: Hugo Mills
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] fstab & UUID - sanity check

Reply to this message
gpg: failed to create temporary file '/var/lib/lurker/.#lk0x57d4a100.hantslug.org.uk.14192': Permission denied
gpg: keyblock resource '/var/lib/lurker/pubring.gpg': Permission denied
gpg: Signature made Fri Jul 17 12:45:15 2009 BST
gpg: using DSA key 20ACB3BE515C238D
gpg: Can't check signature: No public key
On Fri, Jul 17, 2009 at 12:36:12PM +0100, Brian Chivers wrote:
> Alan Pope wrote:
> > 2009/7/17 Brian Chivers <brian@???>:
> >
> >> I'll explain I have a machine that I use to rsync stuff to with an external firewire drive & I just
> >> rebooted with it connected & / when from sda5 to sdb5 and the others map & this caused problems when
> >> I ran the autofs files as it talk to /dev/sdc1 for the first wire & this was now sda1 !!!
> >>
> >>
> >
> > Surely this is precisely the argument _for_ using UUID and not old
> > style /dev/sda device names?
> >
> > If you get the UUID of the external drive and plug that in your fstab,
> > the problem goes away.
> >
> > Cheers,
> > Al.
> >
> >
> Not sure I could get consistent UUID's as I have 8 of these drives &
> they're not in the fstab as I use autofs to mount & unmount them as &
> when they're needed so they can be unplugged & swapped over.


The UUID is stored *on the device*.

Unless you go out of your way to write the same UUID to each
device, it's pretty much impossible *not* to get unique and reliable
UUIDs that represent the actual device.

As you've already discovered, you cannot now use /dev/sd* device
names and expect them to match particular devices -- even the device
holding the root filesystem. It's pretty much futile to try. Thus,
using UUIDs or filesystem labels is the only way to go if you want to
be able to refer to particular devices consistently across hotplug or
reboot events.

Hugo.

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
      --- Great oxymorons of the world, no. 7: The Simple Truth ---