Mount drive (fstab)

Usually when a drive (listed in fstab) fails to mount, I end up in maintenance mode. Can I tell fstab to ignore a drive that fails to mount?

It is an encrypted drive (LUKS), that might be unlocked, but it might also not be. So basically, if the drive is not unlocked, I just want it to be ignored and I will mount it myself when I have unlocked the drive.

If it matters, it is a samba/cifs share on another computer (192.168.1.5/extra) that needs a username and password.

Have you tried setting the options noauto or nofail?

https://wiki.archlinux.org/index.php/Fstab
https://www.man7.org/linux/man-pages/man5/fstab.5.html

Nope, I have not. Most of my drives only uses defaults, but I will try that a s a p. Thanks!

This can be useful as well:

Fstab - Use SystemD automount

There is still one more scenario for me to test, but it seems to work fine. Thanks…

1 Like

If it’s an optional drive that you use occasionally you could do as me and create a systemd-mount unit accompanied with an automount unit, this combo will automatically mount the drive when you need it and unmount after some delay of inactivity…
You only need to “install” the automount unit, the mount unit will be controlled by that one…

Here is a page you can use for some info, which works on all linux versions using systemd:

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.