2

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?

1 Answer 1

0

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

 ps aux | grep nfsd

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

 sudo apt-get --purge remove nfs-kernel-server

And then install again with

sudo apt-get install nfs-kernel-server

Unless your on 14.04 server, then just use my pastebin.

1
  • 1
    point to be added, remove nfs-kernel will remove the /etc/exports file too Feb 8, 2015 at 14:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .