NFS not mounting at boot under certain conditions.
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
NFS not mounting at boot under certain conditions.
I have two machines. We'll call them Master and Slave. Master serves NFS mount to the Slave, if the master goes down, it's all fine and dandy, when it comes back up, the mounted fs will again be accessible. One caveat; if the slave is rebooted, and the master is down/rebooting and the slave comes up attempting to mount the nfs share without the master being able to abide, it will never mount the nfs share without manual interaction (mount -a et al) Is there some set of fstab options that will force it to retry to initial mount (not just subsequent retries/remounts on fs timeout)
About retrying, have a look at "man nfs". The option "retry=n" for NFS4 with fore/background mounts.
Hope this helps
Done and done, to avail. This isn't the problem I don't think... Here is what I see occurring although I can't be for certain, but this is what it appears to be doing. When the system (client) boots, it mounts the devices/locations from fstab, including the NFS share on the master. Problem is that if it doesn't mount, then it fails, there is no retry because mount failed, and the retry=n is never actually of consequence. It seems that once it's been mounted retry correctly works. I've tried all options both hard/soft and fg/bg, to no avail. I'm not really sure what I can do to offset this. Currently we have a script that causes it to just wait to mount nfs, (since it typically doesn't take more than about 20-30 seconds for the master to come up after the slave has booted, this is usually sufficient) But I see this a fail point if for some reason the master was not to come up in the allotted time, thus this really needs to be handled via the correct methods, of which I'm lost to.
Having pondered your client mount issue can't find a 'correct method' either. My reading man ifplugd suggests it might present a painless work around. There is a run= option that is executed on change of nic status. So you sit at the client and can't login to your server home. Unplug the nic and then wait till you think the master/server is up then replug. Not sure you would need/want an unmount -t nfs when the nic goes inactive but would want to mount -t nfs when the nic goes active.
I present as concept only and have no practical experience.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.