When an NFS client accesses an inode that no longer available on the server, the stale file handle error (ESTALE) occurs.
Reproduce cases:
vm1$ exportfs -v
/srv/nfs 192.0.0.0/24(sync,wdelay,hide,no_subtree_check,sec=sys,rw,secure,root_squash,no_all_squash)vm2$ df -h
Filesystem Size Used Available Use% Mounted on
192.0.0.10:/srv/nfs 5.6G 221.0M 5.1G 4% /mnt/nfsIf the server deletes a file or directory while the client currently has open, the inode held by client becomes invalid. The further actions to the inode will fail with ‘Stale file handle’ error.
Server.
vm1$ mkdir /srv/nfs/testvm1$ rm -rf /srv/nfs/testClient.
vm2$ cd /mnt/nfs/testvm2:/mnt/nfs/test$ ls
ls: .: Stale file handleTODO…