Allow ubuntu 20.04 to boot even with failed disk

Is there a way I can let ubuntu boot even with fsck fail on one of the disks (as long as it is not the main disk)?

This would make remote troubleshooting a lot easier without management interface alongside the lost money from system downtime.

For sure, add nofail to your moint options and disable fsck (the last zero in the example).

Example fstab entry:

/dev/disk/by-path/xxx /mnt/farm/xxx auto defaults,nofail 0 0
4 Likes

thank you for the answer!
Do you know how the system will react then in case of corrupted disk? Will it just not mount (so I see or can set up an alert that something is wrong)

I don’t know how it will react, as having a corrupted disk is nothing that I wanna test on my system.

You can change the last zero to 2 in you fstab entry, so that your system will run conditionally fsck on it on boot up.

The nofail option will continue your system to boot if the related disk isn’t mountable and is not a system relevant mount point.

Reference: fstab(5) - Linux manual page

1 Like

I think I had multiple issues:

  • I had the argument (last one) set to 1 in fstab → changed to 2
  • I added defaults,nofail,errors=continue to the options

Also I figured rebooting with shutdown -rf the f omits the file system check on next boot. Handy for configuration changes and so on. checking 200 tib with 18TB drives takes a while.

Lastly but that got fixed a while ago, the swapfile needs to be large so ubuntu can actually perform a fsck / fix as tons of ram are required which is just not suitable for a farmer rig.