Exportfs

What’s a stale file handle? A file handle becomes stale when the file or directory referenced by the handle is removed by another host/server, while our client still holds an active reference to the object file/directory. A typical example occurs when the current directory of a process, running on our client, is removed on the server (either by a process running on the server or on another client).

If your NFS file handles are stale, run this command.

/usr/bin/exportfs -a

NFS Fails to Mount on Bootup

Check if rpcbind is running.

service rpcbind status|start|stop|restart

Or you can also clean the NFS cache.

service rpcbind stop
service nfslock stop
rm -rf /var/lib/nfs/statd/sm/*
rm -rf /var/lib/nfs/statd/sm.bak/*
service rpcbind start
service nfslock start

NFS Client

Services to check.

chkconfig nfs on
service rpcbind start
service nfs start
mount -a

If missing, install it.

yum install nfs-utils nfs-utils-lib

Mount it.

mount -a
mount 192.168.1.200:/home /mnt/nfs/home

Add to /etc/fstab.

10.10.10.10:/home on /mnt/nfs/home type nfs (rw,noatime,nolock,bg,nfsvers=2,intr,tcp,actimeo=1800,addr=10.10.10.10)