Background: I had an NFS server, ran fine for years, needed to hard reboot it, and now I cannot get the daemon to stop when it's told to. Also, clients can't mount it any more, but I suspect the problem is whatever is preventing the daemon from stopping.
When I run:
service nfs-kernel-server stop
It says:
* Stopping NFS kernel daemon [ OK ]
* Unexporting directories for NFS kernel daemon... [ OK ]
Then I run:
service nfs-kernel-server status
and it says:
nfsd running
So it doesn't appear to be stopping the service. Also, running stop
multiple times does not produce an error- it just says it Stopping NFS kernel daemon
each time I run the stop command.
When it is supposedly stopped, ps aux | grep nfsd
shows:
root 761 0.0 0.0 0 0 ? S< Apr04 0:00 [nfsd4]
root 762 0.0 0.0 0 0 ? S< Apr04 0:00 [nfsd4_callbacks]
root 763 0.0 0.0 0 0 ? D Apr04 0:00 [nfsd]
root 764 0.0 0.0 0 0 ? D Apr04 0:00 [nfsd]
root 765 0.0 0.0 0 0 ? D Apr04 0:00 [nfsd]
root 766 0.0 0.0 0 0 ? D Apr04 0:00 [nfsd]
root 767 0.0 0.0 0 0 ? D Apr04 0:00 [nfsd]
root 768 0.0 0.0 0 0 ? D Apr04 0:00 [nfsd]
root 769 0.0 0.0 0 0 ? D Apr04 0:00 [nfsd]
So it appears that the stop command isn't actually stopping the daemon and processes. Why?
Maybe your nfs-kernel-server file got trashed in /etc/init.d
I'm running 14.04 server and here is a pastebin of mine
http://paste.ubuntu.com/9651994/
If nothing wrong there on your end, you may need to purge and reinstall.
Edit: I just stopped mine and then checked the status and it said it was not running. I then did
And it was definitely not running. So like I said, I think your issue is the /etc/init.d/ nfs-kernel-server file.
After further thought, if it were me I would just
And then install again with
Unless your on 14.04 server, then just use my pastebin.