Furor Teutonicus blog | over | volg | teuto | lyme | archief | doneer | todo
🕰️
  ⬩  
✍️ Evert Mouw
  ⬩  
⏱️ 2 min

nofail and nobootwait mount options in fstab prevent boot problems

External Drive icon, from the Wooden Drives Icons set by Teijo Räty.

Source: Wooden Drives Icons set by Teijo Räty.

Problem description: You (re)boot your computer, e.g. a headless server. The boot process can halt or exit to rescue mode when an external disk is unavailable or when an internal but non-critical disk is out of order.

A possible disadvantage of nobootwait is that, if the disk is actually present, it will do the filecheck in the background and continue booting. That might be exactly what you want for e.g. external drives, but if other services depend on the drive, then those services can fail.

Another disadvantage of nobootwait is the fact that it is not supported by all Linux distributions. For example, using Scientific Linux (RHEL) 6.4, I cannot mount a partition that has the nobootwait set in fstab.

According to the fsck man page, this is what nofail does:

fsck normally does not check whether the device actually exists before calling a file system specific checker. Therefore non-existing devices may cause the system to enter file system repair mode during boot if the filesystem specific checker returns a fatal error. The /etc/fstab mount option nofail may be used to have fsck skip non-existing devices. fsck also skips non-existing devices that have the special file system type auto

Ubuntu has a bug listed: “mountall ignores nofail mount option”. That makes sense, as mountall has not implemented nofail. It uses nobootwait. The bug reporters argue that both mountall and fsck should make use of the nofail option, and I agree with them.

So, if you want to be on the safe side, you

Below an example from my own SE 6.4 server using only the nofail option, because mounting with the nobootwait option present gives an error.

LABEL=Series  /mnt/filer/Series  xfs  auto,nofail,nodev,noexec,nouser,noatime  0  2

Sources:


Deze blogpost werd in december 2022 overgezet van WordPress naar een methode gebaseerd op Markdown; het is mogelijk dat hierbij fouten of wijzigingen zijn ontstaan t.o.v. de originele blogpost.