0

Okay, so I have this external (USB) HD that is sometimes (read: almost always) connected to my server. I want to mount the partitions on this HD to my own configured mount points, via fstab.

What is the correct magic incantation for fstab entries if I need to make sure the server does not drop me into rescue mode on boot. should the external disk not be plugged in? I have read about nofail and nobootwait but I'm not sure I really understand the implications.

I'm using Arch linux.

1 Answers1

2

On a CentOS7 the nofail option in /etc/fstab will not drop you into a rescue shell when the device is not connected.

/dev/sdx    /mnt    xfs defaults,nofail     0 0 

Since you did not mention which distribution and version you are using, you should consult the man page of fstab and maybe test it a VM before.

You also could use a udev rule to mount the disk or use autofs.

Thomas
  • 4,155
  • 5
  • 21
  • 28
  • OK, I might give that a shot. I'm using Arch as my main OS, updated the question. – Emanuel Landeholm Nov 18 '17 at 09:16
  • I'm accepting this answer. Booting the server w/o the disk works as expected. Plugging in the disk mounts it automatically in my /mnt/ mount point. Booting the server with the disk connected also works as expected. – Emanuel Landeholm Nov 22 '17 at 02:29