LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-16-2007, 12:32 PM   #1
jwolter0
LQ Newbie
 
Registered: Apr 2004
Location: Cleveland, OH
Posts: 11

Rep: Reputation: 0
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!
 
Old 04-16-2007, 02:54 PM   #2
mether
Member
 
Registered: Mar 2007
Distribution: RHEL, Fedora, Open Suse
Posts: 151

Rep: Reputation: 31
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 .
 
Old 04-16-2007, 03:08 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.
 
Old 04-17-2007, 08:28 AM   #4
jwolter0
LQ Newbie
 
Registered: Apr 2004
Location: Cleveland, OH
Posts: 11

Original Poster
Rep: Reputation: 0
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!
 
Old 07-29-2007, 07:39 AM   #5
rsp
LQ Newbie
 
Registered: Jul 2007
Posts: 4

Rep: Reputation: 0
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

Last edited by rsp; 07-29-2007 at 07:40 AM.
 
Old 08-01-2008, 11:31 AM   #6
oldscratch
LQ Newbie
 
Registered: Apr 2008
Location: South Carolina
Distribution: Red Hat, Scientific Linux, CentOS, and Ubuntu
Posts: 27

Rep: Reputation: 13
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

Last edited by oldscratch; 08-01-2008 at 11:35 AM. Reason: Remove needless smug remark.
 
1 members found this post helpful.
Old 03-02-2009, 12:05 PM   #7
floricello
LQ Newbie
 
Registered: Mar 2009
Posts: 1

Rep: Reputation: 0
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.
 
Old 03-03-2009, 07:20 AM   #8
oldscratch
LQ Newbie
 
Registered: Apr 2008
Location: South Carolina
Distribution: Red Hat, Scientific Linux, CentOS, and Ubuntu
Posts: 27

Rep: Reputation: 13
Hi, Floricello,

That makes a lot more sense, with the K vs. S thing. Thanks.
 
Old 07-28-2009, 03:34 PM   #9
sandricky
LQ Newbie
 
Registered: Nov 2008
Posts: 14

Rep: Reputation: 0
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.
 
Old 09-10-2009, 09:22 AM   #10
unixadm28
LQ Newbie
 
Registered: Sep 2009
Posts: 2

Rep: Reputation: 0
Smile 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!
 
Old 09-10-2009, 11:24 PM   #11
oldscratch
LQ Newbie
 
Registered: Apr 2008
Location: South Carolina
Distribution: Red Hat, Scientific Linux, CentOS, and Ubuntu
Posts: 27

Rep: Reputation: 13
Thanks for the comment, unixadm28. Very gratifying to know that my post helped someone.
 
Old 02-27-2012, 01:28 PM   #12
barataaway
LQ Newbie
 
Registered: Jan 2012
Location: São Paulo / SP / Brazil
Distribution: Red Hat, Fedora, SuSe, HPUX, Solaris
Posts: 12

Rep: Reputation: Disabled
Quote:
Originally Posted by oldscratch View Post
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!!
 
  


Reply

Tags
boot, fstab, nfs


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Network fstab entries don't mount at boot tisource Linux - Networking 7 12-29-2005 06:54 PM
Network fstab entries not being mounted at boot tisource Linux - Networking 4 12-26-2005 10:47 AM
/etc/fstab -- adding entries every boot Kamikazee Linux - Newbie 3 07-14-2005 04:35 AM
Suse 9.1: Not all entries in fstab are mounted at boot. why? BrianK Linux - General 9 08-23-2004 01:45 PM
Mounting NFS filesystem fstab vs autofs rrich100 Linux - Networking 0 11-13-2003 01:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration