7

I want to join several external usb-disks with mergerfs to one large data-storage. Because the disks might not be available at all times I added the nofail-option, to prevent errors during boot.

This leads to the curious situation that everything works fine during boot, but I can't mount the disks later because mount -a fails with fuse complaining about the nofail option (fuse: unknown option 'nofail'). But I can't remove nofail either because this leads to an error during boot. So what are my alternatives? How do I do this right?

Im running. Debian 5.5.17-1~bpo10+1 (2020-04-23) x86_64 GNU/Linux

My current line in /etc/fstab:

/srv/dev-disk-by-label-EXTERN1:/srv/dev-disk-by-label-EXTERN2:/srv/dev-disk-by-label-EXTERN3            /srv/5d3c61b6-d6b0-42bd-9b48-2ef8632b12a3       fuse.mergerfs   defaults,nofail,allow_other,cache.files=off,use_ino,category.create=epmfs,minfreespace=10G,fsname=Storage_Extern:5d3c61b6-d6b0-42bd-9b48-2ef8632b12a3,x-systemd.requires=/srv/dev-disk-by-label-EXTERN1,x-systemd.requires=/srv/dev-disk-by-label-EXTERN2,x-systemd.requires=/srv/dev-disk-by-label-EXTERN3     0 0
AdminBee
  • 21,637
  • 21
  • 47
  • 71
Gedi Nixan
  • 71
  • 2

1 Answers1

1

According to man 8 mount you could write your own mount helper, say /sbin/mount.mynofail, and replace type fuse.mergerfs in the fstab by mynofail.

On mounting, the script would be called with arguments corresponding to the fstab entry, minus various options. Your script would remove the fatal "nofail," string from the options, and call /sbin/mount.fuse with the result, after appending -t fuse.mergerfs.

meuh
  • 49,672
  • 2
  • 52
  • 114