I have modified my /etc/fstab
with various NFS mounts. The source of these NFS mounts is a Synology NAS of mine. I noticed that, say, after a power outage, when all of my equipment boots back up, since my Ubuntu server comes up before my NAS does, it doesn't mount the shares when my NAS is done booting.
There are more use cases for this, but that's the main one. Sadly when I research a solution to this, I get a wide range of varying answers, none of which seem to work. One solution I came upon was one that said to use _netdev
, but this doesn't seem to work.
192.168.1.51:/volume2/media /media/plex nfs _netdev,nfsvers=3,proto=tcp,rsize=65536,wsize=65536 0 0192.168.1.51:/volume2/nextcloud /media/nextcloud nfs _netdev,nfsvers=3,proto=tcp 0 0
How can I make my NFS mounts more reliable? I want them to automatically re-mount (as if I did sudo mount -a
) when connectivity comes available.
EDIT: Bonus points for a solution that allows me to run arbitrary commands after a mount is re-mounted automatically. In my case, I need to restart certain docker containers after the mounts are set up so that they can be reloaded properly. If this turns out to be too unrelated to my original question, feel free to disregard.