24

I have this line in my fstab:

sshfs#ecarroll@o99:/opt/dealermade/ftp/inc /opt/dealermade/ftp/inc fuse defaults,idmap=user,users 0 0

For whatever reason it didn't work -- that's fine. How do I make it not stop the boot sequence. It prompted me to to hit S to skip or M to manually repair. If it isn't the boot volume, I just want my volumes to fail mounting with nothing more than an entry in logs.

Evan Carroll
  • 30,763
  • 48
  • 183
  • 315

2 Answers2

13

I'm not familiar with sshfs, but I know the nobootwait option works for local disk partitions. Maybe try:

sshfs#ecarroll@o99:/opt/dealermade/ftp/inc /opt/dealermade/ftp/inc fuse defaults,idmap=user,users,nobootwait 0 0

(A quick google search also shows archlinux uses nofail as per this thread. A little more googling shows that nobootwait might be a non-standard Ubuntu feature... curious to see if it resolves your issue. )

tshepang
  • 65,642
3

nobootwait worked very well for me in Linux Mint until version 18. I miss it.

Using nobootwait could result in writing to your OS drive rather than a mounted drive, but only if you are careless. If you always write to a folder on your mount, then if the mount fails the folder will not exist and the write fails.

  • 9
    You can also mitigate this problem by doing chattr +i /the/mount/point to deny every user (even root) access to the directory if nothing is mounted on it. – sam hocevar Jul 03 '18 at 12:20
  • This is a very interesting comment. But in case you come accross lsattr: Inappropriate ioctl it means that your filesystem does not support it. – bomben Nov 14 '20 at 21:17
  • @samhocevar just stumbled across this, and noticed your comment. I have tended to do "chmod 000" on my (network) mountpoints for the same reasons, it seems to work, and is very obvious in a full directory listing whether the mount is active. Are there any gotchas with my approach? – m4r35n357 Nov 23 '23 at 17:48
  • @m4r35n357 chmod 000 will not prevent root from accessing the directory; it may not turn out to be a problem, but be aware of that difference. – sam hocevar Dec 12 '23 at 17:32
  • @samhocevar THX for the response. Not a problem for me, as there is nothing in there to access (unless I want trouble!), it is just a nice, simple, filesystem-level indication whether a mount point is in use. Have you tried it? – m4r35n357 Dec 13 '23 at 09:40