Mount Linux NFS – Fixing rpc.statd Not Running

linuxnfs

I have Ubuntu 12.04 as the NFS server. The clients are Linux. My /etc/exports file has 1 line,

/folderToExport *(rw,async,no_subtree_check)  

/etc/init.d/nfs-kernel-server status shows that the NFS share is working as expected. The problem is that whenever I attempt to mount the NFS share from another Linux host, stdout says

mount.nfs: rpc.statd is not running but is required for remote locking
mount.nfs: use '-o nolock'...or start statd

ps -ef |grep statd shows that rpc.statd is already running, so why do they say to "start statd"?

Including their -o nolock suggestion allows for the mount NFS to occur, but then the mounted NFS becomes read-only. The /etc/exports file asks for rw.

How do you start statd? Is the NFS client or server missing some configuration?


Here's what worked for me. Make a declaration for each shared folder in /etc/exports, e.g.

/folderToExport *(rw,async,no_subtree_check) 

statd can be started by

service statd stop followed by

service statd start. Then ps -ef |grep statd shows

statd 1994 1 0 15:23 ? 00:00:00 rpc.statd -L

Once you've verified that statd is running, next run mount from the Linux client,

mount 192.168.1.3:/folderToExport /mountFolder

There should no longer be a message rpc.statd is not running ... start statd

Finally, be sure that permissions on NFS server allow for rw permissions. (Modifying the /etc/exports file alone was insufficient)

chmod 0777 /folderToExport -R

Best Answer

statd is part of the package nfs-common. You could probably find that yourself with locate statd which gives you among others /etc/init.d/statd.

You can start statd with:

service statd start

But it should normally have started on system boot but maybe there is something else going wrong. You should check your log files: grep statd /var/log/* to see if there are reasons why that did not start.

Your /etc/exports looks ok to me. I use:

/data0    *(rw,no_root_squash,no_subtree_check)

on my server and:

192.168.0.2:/data0 /data0   nfs  defaults,noauto,user 0 0

in the /etc/fstab on my client.

Related Question