NFS client shares not re-mounting after server recovery?

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

IamSpartacus

Well-Known Member
Mar 14, 2016
2,516
650
113
I'm having an issue where all the NFS shares I have mounted in my Ubuntu server are not re-mounting or auto-recovering after the NFS server comes back online after a failure.

I have two sets of NFS shares mounted in my server and then pooled via MergerFS for a sort of HA for my bulk media storage. However, if one of the NFS servers goes down for an extended period and then comes back online, I have to manually remount the shares to access that data again. Can this be automated? My nfs mounts look like this:

Code:
<server>:/mnt/***   /mnt/***   nfs rw,hard,intr,rsize=4194304,wsize=4194304,timeo=14 0 0
I though the 'hard' option would cause the client to continuously try and re-mount the share but that doesn't appear to be what's happening.
 

IamSpartacus

Well-Known Member
Mar 14, 2016
2,516
650
113
Have you tired with soft mounts? The hard option is typically used to prevent corruption through a failed write, but for a media share, soft should work better and may prevent a potential freeze if the underlying filesystem is not available. Or, just use something like this instead :)

nfs_automount/README.md at master · vwal/nfs_automount · GitHub
I have no tried soft mounts but I have seen some freezes when the NFS mounts become unavailable so I will give them a try.

Also, that nfs_automount script looks VERY promising. Thanks a lot for the link I will def. test that out tomorrow.