Fixing rpc.statd is not running but is required for remote locking

If you come across this error while attempting to mount an NFS filesystem it means that the statd process is not running.

# mount -a -t nfs
ย 
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mount.nfs: an incorrect mount option was specified

Hereโ€™s how to fix the rpc.statd is not running error on el6

First, ensure that rpcbind is running and that it is set to start on boot

ย 
# /etc/init.d/rpcbind start
Starting rpcbind:                                          [  OK  ]
ย 
# chkconfig rpcbind on

Then, start the nfslock service

ย 
# /etc/init.d/nfslock start
Starting NFS statd:                                        [  OK  ]
# chkconfig nfslock on

Thatโ€™s it. You should now be able to mount your nfs filesystem.