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:
Apr 10 20:07:56 hubble kernel: [ 33.654768] Installing knfsd (copyright (C) 1996 firstname.lastname@example.org).
Apr 10 20:07:56 hubble rpc.statd: Version 1.1.3 Starting
Apr 10 20:07:56 hubble rpc.statd: Flags:
Apr 10 20:07:56 hubble rpc.statd: 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: Already notifying clients; Exiting!
# uname -a
Linux hubble 126.96.36.199-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!
There is a discussion that may be useful here :
Apparently there is a sm-notify lockfile that isn't being unlocked or removed at shut down
Why it works ok when run manually I don't know ...
tried: "renaming /var/run/sm-notify.pid to something else (sm-notify.pid.old) then rebooting." And unfortunately the problem stays the same.
# /etc/init.d/nfsserver status
Checking for kernel based NFS server: mountd 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.
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 ?
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.
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 :
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.
|All times are GMT -5. The time now is 06:53 AM.|