ScaleScaleScaleScale

Tips / Nginx


Stale NFS file handle error

nfs

Stale NFS file handle, that was the error I saw on the logs while trying to mount an NFS client, it was also seen while trying to ls or edit any file on the NFS shared directory.

This kind of weird error is seen when a directory or file that was originally opened by a NFS client is replaced, removed or renamed. You may think it’s a NFS client problem, however the problem resides on the NFS server, which needs to renegotiate the NFS file handles with the NFS clients.

In order to fix it, you can try a couple of things:

1) On the client, umount and remount the file system, example:

umount -f /var/www/content/nfs
mount -t nfs 192.168.2.1110:/home/nfsĀ /var/www/content/nfs

2) On the NFS, remove the access cache:

exportfs -f
service nfs restart

3) Reboot the client having problems:

shutdown now -rf

On the first option we force the umount of the NFS directory, and try to mout it again. On the second, we delete the NFS access cache, and restart the NFS server to build new cache connections, the last option is just to reboot the client.

If you know any other solution, please share it with us.

Popular search terms:

  • apache nfs stale content
  • nginx nfs
  • scale nfs handle
  • stale nfs file handle
profile

Esteban Borges

Linux Geek, Webperf Addict, Nginx Fan. CTO @Infranetworking