Workaround for NFS share not mounted at boot

I had a couple of servers unable to mount a NFS share at boot time. My /etc/fstab was something like:

[... usual stuff ...]
nfs.domain.tld:/nfs /nfs  nfs4  _netdev,auto,rw,noexec,nodev,timeo=5,retry=5,retrans=5,rsize=32768,wsize=32768,proto=tcp,hard,intr  1 2

If I tried to mount it after boot, it would work without any problem.

After checking the basic stuff (services, network access, etc), I went to see if The Internet[tm] knew any better, and this suggestion was spot-on, for some reason that I couldn’t pinpoint, even if the mountpoint definition had a _netdev attribute, it seemed like the mount was failing to properly resolve the name during the boot.

For the moment I went for a quick workaround, there was two main options: either add the NFS server hostname to /etc/hosts, or switch to the IP address in /etc/fstab. I went for the latter because it’s simpler (less stuff can break), until I can find out why it doesn’t resolve the names during the boot.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.