Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
04-16-2007, 12:32 PM
|
#1
|
LQ Newbie
Registered: Apr 2004
Location: Cleveland, OH
Posts: 11
Rep:
|
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!
|
|
|
04-16-2007, 02:54 PM
|
#2
|
Member
Registered: Mar 2007
Distribution: RHEL, Fedora, Open Suse
Posts: 151
Rep:
|
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 .
|
|
|
04-16-2007, 03:08 PM
|
#3
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
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.
|
|
|
04-17-2007, 08:28 AM
|
#4
|
LQ Newbie
Registered: Apr 2004
Location: Cleveland, OH
Posts: 11
Original Poster
Rep:
|
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!
|
|
|
07-29-2007, 07:39 AM
|
#5
|
LQ Newbie
Registered: Jul 2007
Posts: 4
Rep:
|
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.
|
|
|
08-01-2008, 11:31 AM
|
#6
|
LQ Newbie
Registered: Apr 2008
Location: South Carolina
Distribution: Red Hat, Scientific Linux, CentOS, and Ubuntu
Posts: 27
Rep:
|
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.
|
03-02-2009, 12:05 PM
|
#7
|
LQ Newbie
Registered: Mar 2009
Posts: 1
Rep:
|
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.
|
|
|
03-03-2009, 07:20 AM
|
#8
|
LQ Newbie
Registered: Apr 2008
Location: South Carolina
Distribution: Red Hat, Scientific Linux, CentOS, and Ubuntu
Posts: 27
Rep:
|
Hi, Floricello,
That makes a lot more sense, with the K vs. S thing. Thanks.
|
|
|
07-28-2009, 03:34 PM
|
#9
|
LQ Newbie
Registered: Nov 2008
Posts: 14
Rep:
|
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.
|
|
|
09-10-2009, 09:22 AM
|
#10
|
LQ Newbie
Registered: Sep 2009
Posts: 2
Rep:
|
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!
|
|
|
09-10-2009, 11:24 PM
|
#11
|
LQ Newbie
Registered: Apr 2008
Location: South Carolina
Distribution: Red Hat, Scientific Linux, CentOS, and Ubuntu
Posts: 27
Rep:
|
Thanks for the comment, unixadm28. Very gratifying to know that my post helped someone.
|
|
|
02-27-2012, 01:28 PM
|
#12
|
LQ Newbie
Registered: Jan 2012
Location: São Paulo / SP / Brazil
Distribution: Red Hat, Fedora, SuSe, HPUX, Solaris
Posts: 12
Rep:
|
Quote:
Originally Posted by oldscratch
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 09:57 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|