LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   NFS entries in /etc/fstab not mounting on boot (http://www.linuxquestions.org/questions/linux-server-73/nfs-entries-in-etc-fstab-not-mounting-on-boot-546512/)

jwolter0 04-16-2007 12:32 PM

NFS entries in /etc/fstab not mounting on boot
 
I've got a small cluster on a private network. The users filesystems are on the master node, which is NFS mounted by the worker nodes. I added a few nodes to the cluster and everything was working fine until a power outage caused the cluster to reboot. All of the old nodes came up fine, but all the new nodes came up without mounting the NFS entries in /etc/fstab. If I log onto the new nodes and manually type 'mount /home', it mounts just fine. I'm probably missing something simple, but I'm stumped. Can anyone point to things to look for?

All nodes are running FC5; the old ones were upgraded from FC1, the new ones installed fresh. All nodes are on the same IP subnet.

Relevant line from /etc/exports:
/home 192.168.1.0/255.255.255.0(rw)


Relevant /etc/fstab entry:
a10:/home /home nfs rw,hard,intr 0 0

Thanks!

mether 04-16-2007 02:54 PM

Not sure why is not working from fstab ( we need to look at the logs )...but a easy workaround is using /etc/rc.d/rc.local .

jschiwal 04-16-2007 03:08 PM

I wonder if the remote nodes tried to mount their home directories before the partition on the master node was finished mounting, causing the remote nodes to hang. You might try the soft option on the remote nodes along with a "timeo=timeout" option to give the master node time to finish mounting it's own partitions.

jwolter0 04-17-2007 08:28 AM

Quote:

Originally Posted by jschiwal
I wonder if the remote nodes tried to mount their home directories before the partition on the master node was finished mounting, causing the remote nodes to hang. You might try the soft option on the remote nodes along with a "timeo=timeout" option to give the master node time to finish mounting it's own partitions.

A good theory, except that when I reboot the worker nodes (leaving the master up and running), it still doesn't work. I'd love to pin down the problem and fix it, but since the workaround is so easy, I think I'm going to just do that. Thanks for your suggestions!

rsp 07-29-2007 07:39 AM

Please read /etc/rcS.d/README. May try to change the link S35mountall.sh to S80mountall.sh.
Also, edit /etc/init.d/mountall.sh and change nonfs to nfs in the line giving all fs types such as nfs4,smb,... etc.
In my case it worked. See tag debian > nfs

Regards,

rsp

oldscratch 08-01-2008 11:31 AM

NFS not mounting on boot -- CentOS/RH solution
 
Hi -- I just ran across this problem, and didn't really find a good answer, but here's what I figured out and what worked for me on CentOS 5:

The problem was that my NFS mounts were not mounting on boot, but after booting, I could issue:

#mount -a

and they would mount just fine.

My servers boot into runlevel 3. Turns out if you look in /etc/rc3.d on CentOS 5, you'll probably see some files called:

K75netfs
S10network

K75netfs takes care of mounting network volumes, and S10network takes care of bringing up network interfaces.

These files are run in alphabetical order when the system enters runlevel 3. So, it was trying to mount the NFS volumes before the network interfaces were brought up, and that, of course, fails.

The way I solved this problem was that I renamed K75netfs to S96netfs to make it run a good bit later in the init process. This worked like a charm for me.

#cd /etc/rc3.d
#mv K75netfs S96netfs

You need to do this for whatever runlevels you want to have NFS mounts automagically mounted in. So, if you want this to happen in runlevel 5, just make the same changes in /etc/rc5.d

floricello 03-02-2009 12:05 PM

System V and netfs
 
- System V
On a Fedora system, based on the System V philosophy, the services are run according to the /etc/rcX.d links. These links start with S or K, services to be Started or Killed while entering the runlevel.

- netfs
On Fedora again the network shares are mounted with the netfs service, so this initscript is to be enabled in your runlevel (3 or 5). The # chkconfig: 345 25 75 line from the /etc/init.d/netfs file will tell you that this service is to be run on the 3, 4 and 5 runlevels, started early in the 25th position if enabled while entering this level (after the network which is the 10th postion) or very late (position 75) if disabled.
In your case netfs is probably disabled in your runlevel. chkconfig --list netfs from command line.

- enable netfs
Several ways to enable this service in your corresponding runlevel (I use only 3 and 5 in this example).

1. command line chkconfig --level 35 netfs on and check again with chkconfig --list netfs. You can also use ntsysv.
2. there are several graphical tools depending on your Window Manager ... etc.


Hope it helps.

F.

oldscratch 03-03-2009 07:20 AM

Hi, Floricello,

That makes a lot more sense, with the K vs. S thing. Thanks.

sandricky 07-28-2009 03:34 PM

I have seen a similar problem RHEL5 and if you watch the startup scripts execute you may see "no route to host" error messages. This indicates that the routing tables have not be fully initialized before the nfs entries in the fstab file are attempted. On one system we have about 7-8 nfs entries and only the bottom half were getting mounted. A sleep command in the network startup script worked. I am not sure if there is another fix available to resolve this. I have added the IP address, ensured the server name was resolving etc. You may only want to add the sleep statement to the start stanzas vice the main body of the script to eliminate unecessary delays in the shutdown or network stop commands.

unixadm28 09-10-2009 09:22 AM

worked for me
 
Thanks oldscratch for your response.

I had similar issue and your suggestion (of mv /etc/rc5.d/K76netfs /etc/rc5.d/S96netfs) worked great for me.

thanks again!

oldscratch 09-10-2009 11:24 PM

Thanks for the comment, unixadm28. Very gratifying to know that my post helped someone.

barataaway 02-27-2012 01:28 PM

Quote:

Originally Posted by oldscratch (Post 3233398)
Hi -- I just ran across this problem, and didn't really find a good answer, but here's what I figured out and what worked for me on CentOS 5:

The problem was that my NFS mounts were not mounting on boot, but after booting, I could issue:

#mount -a

and they would mount just fine.

My servers boot into runlevel 3. Turns out if you look in /etc/rc3.d on CentOS 5, you'll probably see some files called:

K75netfs
S10network

K75netfs takes care of mounting network volumes, and S10network takes care of bringing up network interfaces.

These files are run in alphabetical order when the system enters runlevel 3. So, it was trying to mount the NFS volumes before the network interfaces were brought up, and that, of course, fails.

The way I solved this problem was that I renamed K75netfs to S96netfs to make it run a good bit later in the init process. This worked like a charm for me.

#cd /etc/rc3.d
#mv K75netfs S96netfs

You need to do this for whatever runlevels you want to have NFS mounts automagically mounted in. So, if you want this to happen in runlevel 5, just make the same changes in /etc/rc5.d



Thank you very much, oldscratch! It solved my problem!!


All times are GMT -5. The time now is 10:49 AM.