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

Re: Foolproof disk device name in fstab



Quoting Frank Miles (fpm@u.washington.edu):
> On Mon, 19 Jan 2015 03:50:01 +0100, andmalc wrote:
> 
> > I have a Jessie VPS with external disks attached.  The disks are
> > specified in /etc/fstab with traditional /dev/sdXX naming.  I recently
> > made changes to the disks that made a device name invalid but didn't
> > notice. When I rebooted, the disk couldn't be found and boot halted in
> > rescue mode.
> > 
> > My question is: how can I specify devices in fstab so if they can't be
> > found boot proceeds proceeds normally instead of halting?  Would
> > mounting with systemd with the 'device-timeout' option as described here
> > be a good way?
> > 
> > https://wiki.archlinux.org/index.php/fstab#Automount_with_systemd

That's a handy page that I hadn't happened upon before.

> Regardless of whether you use systemd or some other init system, using
> UUIDs is supposed to be less susceptible.

I find that LABELs are easier to use with external disks. That way I
can have partitions called lulu01, lulu02, lulu03 and lulu4 on a disk
where  "lulu" is written on the outside of disk itself. (And because
I've moved internal drives between machines a fair bit, I admit to
doing the same with them.)

> You can get the proper UUIDs using blkid() (see its man page).  Use of
> UUIDs is at least partially explained in the fstab man page.

... and   udevadm info /dev/foo   lists more than you needs to know
about disks and their partitions (or look in /run/udev/data/b8...

BTW, since moving post-wheezy, I've wondered whether   man fstab
is correct in saying:

  "The order of records in fstab is important because fsck(8),
   mount(8), and umount(8) sequentially iterate through fstab
   doing their thing."

The archlinux reference (above) seems more accurate:

  "These definitions will be converted into systemd mount units
   dynamically at boot, and when the configuration of the system
   manager is reloaded."

Cheers,
David.


Reply to: