Issues with NFS mounting on boot

Today, I ran into an odd issue where NFS mounts were not being mounted at boot, despite having all of the proper settings in the /etc/fstab entry. There were no errors of note in server logs but I was able to determine that the issue was related to the fact that the server was trying to mount the nfs mount prior to networking coming up. To resolve this, I found the two entries in the /etc/rc3.d/ directory that corresponded to networking and network filesystems:

[root@server rc3.d]# ll | grep netfs
lrwxrwxrwx 1 root root 15 May 21 14:00 K75netfs -> ../init.d/netfs
[root@server rc3.d]# ll | grep network
lrwxrwxrwx 1 root root 17 May 21 09:10 S10network -> ../init.d/network

Once I located those two files, it was clear that the problem lay in the fact the server was running K75netfs prior to S10network due to rc.d’s habit of starting services in alphabetical order. To resolve the problem, I located an empty “slot” after S10 to move the K75netfs symlink to:

[root@server rc3.d]# mv K75netfs S86netfs

By doing this, the network and netfs rc.d scripts are now in the proper order:

[root@server rc3.d]# ll | grep network
lrwxrwxrwx 1 root root 17 May 21 09:10 S10network -> ../init.d/network
[root@server rc3.d]# ll | grep netfs
lrwxrwxrwx 1 root root 15 May 21 14:00 S86netfs -> ../init.d/netfs

I did a test reboot to confirm and sure enough, when the server was accessible via networking, the nfs mount was in place and accessible as expected. I thought I’d make a post on this for anyone else having the same issue, as google was not too helpful for me.

2 Replies to “Issues with NFS mounting on boot”

  1. The netfs daemon wasn’t starting because it wasn’t enabled. Services that start with K are not ran on boot, only ones that start with S. You could have fixed this with chkconfig netfs on

  2. Thanks for the comment Jack! I checked my bash history logs and did enable chkconfig for the daemon, but I guess it didn’t commit for some reason. Thanks for the tip though!

Leave a Reply

Your email address will not be published. Required fields are marked *