View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 11 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sat Jun 26, 2010 1:48 pm 
Offline
Joined: Wed Jan 07, 2004 12:14 pm
Posts: 425
Location: Charlotte, NC
I am running a master backend and a frontend only setup on 6.03 and have NFS running fine on my backend machine. I am trying to get NFS running on my frontend machine because I use that one for backups. All of this has been working for years on the old Knoppmyth setup. The problem is with autostarting NFS on the frontend. It is setup exactly the same as the backend. I see no errors in any logs (var/log). I get the following when I run rcpinfo. NFS is not running...

program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 43947 status
100024 1 tcp 41790 status
100021 1 udp 38495 nlockmgr
100021 3 udp 38495 nlockmgr
100021 4 udp 38495 nlockmgr
100021 1 tcp 38299 nlockmgr
100021 3 tcp 38299 nlockmgr
100021 4 tcp 38299 nlockmgr


I am able to start it manually (/etc/rc.d/nfslock start; /etc/rc.d/nfsd start). Then rcpinfo shows:

program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100021 1 udp 38495 nlockmgr
100021 3 udp 38495 nlockmgr
100021 4 udp 38495 nlockmgr
100021 1 tcp 38299 nlockmgr
100021 3 tcp 38299 nlockmgr
100021 4 tcp 38299 nlockmgr
100024 1 udp 40319 status
100024 1 tcp 59044 status
100005 3 udp 52890 mountd
100005 3 tcp 40974 mountd
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs

Now I am able to connect... And it will stay connected until a reboot. I suspect it is a timing problem of some sort but am unsure where to look for clues. I believe that linHES does not use rc.conf daemon list for autostart (uses /var/service I think). So how does one control the timing of what starts first?


Last edited by nbdwt73 on Tue Jul 06, 2010 6:44 pm, edited 2 times in total.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 27, 2010 12:16 pm 
Offline
Joined: Sun Sep 25, 2005 3:50 pm
Posts: 1013
Location: Los Angeles
I believe the following should help:

Code:
$ sudo add_service.sh nfsd
$ sudo add_service.sh nfslock
$ sudo add_service.sh netfs

_________________
Mike
My Hardware Profile


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 29, 2010 5:15 pm 
Offline
Joined: Wed Jan 07, 2004 12:14 pm
Posts: 425
Location: Charlotte, NC
Thanks Mike... I tried that but found that there is an intermittent timing problem (nfslock should start before nfsd... Also netfs was already in /var/service).

My solution was to use runit (added nfslock and nfsd to 1.local) - works perfectly every time now (rebooted 20 times to confirm...)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 29, 2010 8:38 pm 
Offline
Joined: Sun Sep 25, 2005 3:50 pm
Posts: 1013
Location: Los Angeles
nbdwt73 wrote:
Thanks Mike... I tried that but found that there is an intermittent timing problem (nfslock should start before nfsd... Also netfs was already in /var/service).

My solution was to use runit (added nfslock and nfsd to 1.local) - works perfectly every time now (rebooted 20 times to confirm...)


Interesting. If you can help debug this, please try this:

Comment out your new lines in 1.local. Take a look at /etc/sv/netfs/run

Edit this file to look like this:
Code:
#!/bin/sh
exec 2>&1
svwaitup 3 portmap
svwaitup 3 nfslock
/etc/rc.d/netfs start


Does that help?

_________________
Mike
My Hardware Profile


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 30, 2010 9:15 am 
Offline
Joined: Wed Jan 07, 2004 12:14 pm
Posts: 425
Location: Charlotte, NC
That seems to work. I made the change to one frontend and left the other with the changes I made (runit). So far, after several reboots, it continues to work. I will leave it this way for a few days and report back.

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 06, 2010 3:13 pm 
Offline
Joined: Wed Jan 07, 2004 12:14 pm
Posts: 425
Location: Charlotte, NC
Mike,

I have tested your idea for a few days and it seems to work. The actual change to /etc/sv/netfs/run is below (portmap and nfslock are in /etc/rc.d/ - "sv" doesn't work).

#!/bin/sh
exec 2>&1
/etc/rc.d/portmap start
sleep 5
/etc/rc.d/nfslock start
sleep 5
/etc/rc.d/netfs start

Thanks for the hint.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 06, 2010 3:33 pm 
Offline
Joined: Sun Sep 25, 2005 3:50 pm
Posts: 1013
Location: Los Angeles
nbdwt73 wrote:
Mike,

I have tested your idea for a few days and it seems to work. The actual change to /etc/sv/netfs/run is below (portmap and nfslock are in /etc/rc.d/ - "sv" doesn't work).


Did you try to:

Code:
$ sudo add_service.sh portmap
$ sudo add_service.sh nfslock


I have both portmap and nfslock under /etc/sv. It may just be a matter of adding the symlinks to allow them to start (add_service.sh makes the symlinks to /var/service). You really should not have to muck with rc.d (although I'm aware some run scripts do call rc.d). NFS is a very common feature and it should "just work" provided the starup links exist.

_________________
Mike
My Hardware Profile


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 06, 2010 5:23 pm 
Offline
Joined: Wed Jan 07, 2004 12:14 pm
Posts: 425
Location: Charlotte, NC
Both portmap and nfslock are there (in /var/service). I even removed them and "sudo add_service.sh" them back. Now, what I don't know, is there any issue with the order in which you issue the commands (ie timing issue for startup)?

The problem I am seeing is somewhat intermittent but consistent and repeatable once it hits. I have built two other test machines and, out of the box, am seing this issue. The real odd thing is that I don't see it on my backend machine (which of course is the one where most people will use NFS) - only on my frontend-only machines. I have not torn them apart enough to know if there is anything unique about the builds that would cause this to happen. I can say that by adding the rc.d start commands the problem seems to have disappeared.

More testing....


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 06, 2010 5:59 pm 
Offline
Joined: Sun Sep 25, 2005 3:50 pm
Posts: 1013
Location: Los Angeles
nbdwt73 wrote:
Both portmap and nfslock are there (in /var/service)


But are they in /etc/sv ? All the items in /var/service are links back to the real scripts in /etc/sv. I'm guessing since add_service.sh succeeded, they are, but it wouldn't hurt to confirm ;)

nbdwt73 wrote:
Now, what I don't know, is there any issue with the order in which you issue the commands (ie timing issue for startup)?

That's what the svwaitup stuff was for. What it means is "Wait for this service to be up for 3 seconds before starting service XYZ."

nbdwt73 wrote:
The real odd thing is that I don't see it on my backend machine (which of course is the one where most people will use NFS) - only on my frontend-only machines.


Yeah, that's where I run NFS on my systems. Hmmm...

_________________
Mike
My Hardware Profile


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 06, 2010 6:28 pm 
Offline
Joined: Sun Sep 25, 2005 3:50 pm
Posts: 1013
Location: Los Angeles
Just spoke to jams in IRC and here's why it's not working:

Quote:
16:59 <mihanson> jams; Any oddities or special instructions needed to run NFS
on a frontend? i.e. Share a folder on a FE machine to a backend.
Ref: http://linhes.org/phpBB2/viewtopic.php?t=21174
17:01 <jams> hehe NFS is activately disabled for FE machines. Anytime
the systemconfig script is run it kills NFS on FE machines.
17:01 <jams> other then that there is nothing special
17:03 <mihanson> Why is it actively diabled?
17:03 <jams> no real reason other then at the time I felt FE machines
shouldn't run NFS servers. Still feel that way but to each his
own
17:04 <jams> whenever I get around to it..that will be part of the config
file so that systemconfig will not disable it

_________________
Mike
My Hardware Profile


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 06, 2010 6:40 pm 
Offline
Joined: Wed Jan 07, 2004 12:14 pm
Posts: 425
Location: Charlotte, NC
OK - now I don't feel so bad. I was starting to think I didn't know what I was doing...

Oh, wait - I don't. Damn, now I feel bad again :cry:


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu