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 ( that needs a username and password.

Have you tried setting the options noauto or nofail?

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.