One virtual machine runnning on Xen host experienced 'Stale NFS file handle' problems and I can't explain it while there is no NFS mount present.
How can the answer be improved? This happens somewhere between several minutes or several hours. The errors thrown by the different docker containers are consistent, 'Stale file handle' Attempted Steps to resolve the issue. Set timeout of 0 (indefinite) for automount. So the volumes are never unmounted; Switched from automount to mounts via fstab; Switched from NFS to CIFS shares.
The problem occurs when listing the content on a specific directory:
The following command returns nothing:
Other info:
migrated from stackoverflow.comOct 20 '11 at 14:36
This question came from our site for professional and enthusiast programmers.
2 Answers
![Stale Nfs File Handle Stale Nfs File Handle](https://sjc1.discourse-cdn.com/plex/uploads/default/original/3X/d/9/d9f3747a31b6d79626e1bbb8a0e3597080b11f5e.jpeg)
With no-NFS problem seems filesystem integrity. Try to check filesystem. It worked for me.
This error comes up when client is trying to access a file or a directory which is removed/replaced.
![Stale nfs file handle cannot remove Stale nfs file handle cannot remove](https://arkit.co.in/wp-content/uploads/2017/05/stale-file-handle.png)
Here are some solutions to try:
- unmount and remount: you may use
-l
option for lazy unmount - create a new mount point
- restart nfs client
touch
this file, for e.g:touch xxx
fsck.ext3 says that /home is clean...
igi:~$ ls -l
ls: cannot access bin: Stale NFS file handle
ls: cannot access PICTURES_nortel_tmp: Stale NFS file handle
total 78568
d????????? ? ? ? ? ? bin
d????????? ? ? ? ? ? PICTURES_nortel_tmp
drwxr-xr-x 2 penguin penguin 4096 2008-11-22 23:06 TESTATICA
-rw-r--r-- 1 penguin penguin 31395624 2008-12-03 16:25 test.avi
-rw-r--r-- 1 penguin penguin 14698436 2008-12-04 15:36 test_divx_mp3.avi
-rw-r----- 1 penguin penguin 4240419 2008-11-19 22:43 toolsdev.tar.bz2
-rw-r--r-- 1 penguin penguin 5366 2008-10-19 13:29 tourpart7.html
drwxr-xr-x 10 penguin penguin 12288 2008-12-04 23:25 UNIX_HELP
Notice the weired directories with: d?????????
These dirs give me the: 'Stale NFS file handle' error
igi:~$ rm -rf PICTURES_nortel_tmp
rm: cannot remove `PICTURES_nortel_tmp': Stale NFS file handle
Can't remove them or 'ls -l' them or anything else (neither as root or when booted from a live distro, etc...)
Any insight on solving this issue (other than salvaging whats left on the /home partition and then recreating a new partition and or the file system) would be appreciated