LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices

Reply
 
Search this Thread
Old 04-10-2010, 08:56 AM   #1
jsh684
LQ Newbie
 
Registered: Apr 2010
Posts: 3

Rep: Reputation: 0
Red face NFS works but cannot start at boot automatically


I am using SUSE 11.2. And I am really baffled with a strange NFS problem. I hope some experts can help me here.

I have set up the fstab on the client and exports on the server correctly, because if I manually run
# /etc/init.d/nfs start
Starting NFS client services: sm-notify done
I can see and use the NFS partition perfectly, there is no problem at all.

But nfs cannot successfully start at boot. In yast, I have enabled nfs in "System Services (Runlevel)" at runlevel 3 and 5. So it should run automatically, but I always get the following error message:

/var/log/message:
Apr 10 20:07:56 hubble kernel: [ 33.654768] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
Apr 10 20:07:56 hubble rpc.statd[2262]: Version 1.1.3 Starting
Apr 10 20:07:56 hubble rpc.statd[2262]: Flags:
Apr 10 20:07:56 hubble rpc.statd[2262]: statd running as root. chown /var/lib/nfs/sm to choose different user
Apr 10 20:07:56 hubble kernel: [ 33.802662] NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
Apr 10 20:07:56 hubble kernel: [ 33.806946] NFSD: starting 90-second grace period
Apr 10 20:07:56 hubble sm-notify[2271]: Already notifying clients; Exiting!

More info:
# uname -a
Linux hubble 2.6.31.12-0.2-desktop #1 SMP PREEMPT 2010-03-16 21:25:39 +0100 x86_64 x86_64 x86_64 GNU/Linux

Both firewall and AppArmor are disabled.

Can someone help here? Thanks a lot in advance!
 
Old 04-10-2010, 10:10 AM   #2
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 248Reputation: 248Reputation: 248
There is a discussion that may be useful here :
http://www.mail-archive.com/linux-nf.../msg00361.html

Apparently there is a sm-notify lockfile that isn't being unlocked or removed at shut down

Quote:
> >>> Note the comment in sm-notify.c:
> >>>
> >>> /*
> >>> * Record pid in /var/run/sm-notify.pid
> >>> * This file should remain until a reboot, even if the
> >>> * program exits.
> >>> * If file already exists, fail.
> >>> */
You could test to see if this is the problem by stopping nfs then renaming /var/run/sm-notify.pid to something else (sm-notify.pid.old) then rebooting.

Why it works ok when run manually I don't know ...
 
Old 04-10-2010, 11:09 AM   #3
jsh684
LQ Newbie
 
Registered: Apr 2010
Posts: 3

Original Poster
Rep: Reputation: 0
tried: "renaming /var/run/sm-notify.pid to something else (sm-notify.pid.old) then rebooting." And unfortunately the problem stays the same.

More info:

# /etc/init.d/nfsserver status
Checking for kernel based NFS server: mountd running
statd running
nfsd running

# /etc/init.d/nfs status
Checking for mounted nfs shares (from /etc/fstab): unused

# rpcinfo -p
program vers proto port service
100000 4 tcp 111 portmapper
100000 3 tcp 111 portmapper
100000 2 tcp 111 portmapper
100000 4 udp 111 portmapper
100000 3 udp 111 portmapper
100000 2 udp 111 portmapper
100021 1 udp 42486 nlockmgr
100021 3 udp 42486 nlockmgr
100021 4 udp 42486 nlockmgr
100021 1 tcp 47237 nlockmgr
100021 3 tcp 47237 nlockmgr
100021 4 tcp 47237 nlockmgr
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100005 1 udp 34530 mountd
100005 1 tcp 47924 mountd
100005 2 udp 34530 mountd
100005 2 tcp 47924 mountd
100005 3 udp 34530 mountd
100005 3 tcp 47924 mountd
100024 1 udp 53925 status
100024 1 tcp 55462 status

so nfs has been started at boot, but it is not actually running unless I manual start the service. I do have proper imports from /etc/fstab, otherwise the manual nfs start would not work.
 
Old 04-10-2010, 12:00 PM   #4
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 248Reputation: 248Reputation: 248
So what is the actual problem ?
Are you saying that your client machine cannot connect to the nfs share unless you start nfs manually on the server ?
 
Old 04-11-2010, 03:45 AM   #5
jsh684
LQ Newbie
 
Registered: Apr 2010
Posts: 3

Original Poster
Rep: Reputation: 0
The problem is: my client machine cannot connect to the nfs share unless I manually run # /etc/init.d/nfs start on the client machine. nfsserver is running fine on the server.
 
Old 04-11-2010, 07:02 AM   #6
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 248Reputation: 248Reputation: 248
So this has nothing at all to do with the server.

You shouldn't be running nfs as a service on the client.
I suggest you change your fstab file on the client machine.

You say it is correct but you have never posted it.
If everything in fstab gets mounted before your network is initialised, then obviously you can't mount a remote directory.

you should have nfs-common installed on the client, that is all. You don't have to have anything running at boot time. nfs is a program that provides client services, it's not for running on the client.

I suggest you read this thread :
http://www.linuxquestions.org/questi...t-boot-323637/

I also suggest you uninstall whatever nfs related things you installed on your client machine, then install nfs-common. You do not have to add things to the start up.

Finally, I would suggest that when you have 2 machines involved in a problem, you actually tell people what commands and what errors are found on which machine.

Last edited by smoker; 04-11-2010 at 07:27 AM.
 
  


Reply

Tags
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
nfs client does not mount server-shares automatically on boot rsp Debian 2 07-29-2007 07:26 AM
Don't start automatically at boot, just directly muusle Slackware 7 04-07-2006 08:56 AM
How can mySQL start automatically on boot ? John_Emad Linux - Software 6 06-24-2005 12:33 PM
How do I start a program automatically when I boot up? bad_andy Mandriva 2 11-27-2004 08:15 PM
How do I start programs automatically with boot up? Kasperisa Linux - Newbie 6 07-15-2004 03:29 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration