I have a few servers running CentOS 5.3, and am trying to get 2 NFS mount-points to mount automatically on boot. I added 2 lines similar to the following to fstab:
server1:/path1 /path1 nfs soft 0 0
server2:/path2 /path2 nfs soft 0 0
When I run 'mount -a' manually, the mount points are properly mounted as expected. However, when I reboot the machine, only /path2 is mounted. For /path1 I get the following error:
mount: can't get address for server1
It obviously looks like a DNS issue, but the record is properly configured in all the DNS servers and is mounted properly if I re-try the mount after the reboot is completed. I could properly fix this by using IP address instead of hostnames in /etc/fstab or adding server1 to /etc/hosts but I would rather not do that.
What might be the reason for failing to resolve this specific address during boot time? Why the problem is only with the 1st mount point and the 2nd is properly mounted despite having identical configuration?
had the same issue, on CentOS 5.3, i did
1) enable STP portfast on the switch (cisco)
2) changed the nfs mount in fstab to
and now it works just fine.
How does your machine get its DNS configuration?
The latter problem can be caused, for exmaple, by ethernet switch ports that don't come live instantly when they detect a client coming online.
Add the bg in the option part.
server1:/path1 /path1 nfs bg,soft 0 0
This puts the mounting in background modus. Once the server is available the mount will be available.
Good luck.
This does not solve the DNS problem, but it solves the mounting problem :-)