In this article I discuss a couple of ways to fix NFS stale file handle messages seen with network mounts. I recommend that you try the solutions in order, escalating to the next one if the current one doesn't solve your issue.
Fix NFS Stale File Handle - Solution 1 Link to heading
The first solution to this problem is straightforward and can fix the problem pretty quickly without disrupting the machine.
- Unmount the filesystem
umount **/nfs/directory/mountpoint**
- Remount it by trying to access it
ls **/nfs/directory/mountpoint**
If the above doesn't work, you could also try a lazy unmount of the filesystem which can be done by using the -l
option with the umount
command.
Fix NFS Stale File Handle - Solution 2 Link to heading
This solution involves killing any processes that have died or ended up in permanent sleep so that an unmount can cleanly occur.
- Identify processes that are trying to access the workstation
lsof |grep workstation
- Kill the nfs/autofs processes as well as any other processes that are trying to access workstation disk
kill **PID** # kill -4 may be needed if process won't die
- Stop and restart nfs and autofs services
service nfs stop
service autofs stop
service nfs start
service autofs start
Conclusion Link to heading
NFS stale filesystem handles can occur for a number of reasons and could originate from the client or the server, such as:
- NFS server crashing
- Server-side configuration changes
- Client network issues
While the above solutions may fix the problem the do not address the source cause of the issue so be sure to investigate that!