How to resolve NFS stale file handle issue in linux ?

Today we will look at an interesting article how to resolve NFS Stale file handle issue which works in most of the cases.

However sometimes we need to perform some other actions as well.

Lets see step by step how to get rid of these error messages.

1. Try to umount the partition.

    [root@ngelinux samba]# umount /NGEI/NGEEXL2/MDM/ngeaix208/interfaces
umount.nfs: /NGEI/NGEEXL2/MDM/ngeaix208/interfaces: device is busy
umount.nfs: /NGEI/NGEEXL2/MDM/ngeaix208/interfaces: device is busy
[root@ngelinux samba]#

2. Try to check the processes using this partition.

[root@ngelinux samba]# fuser -cu /NGEI/NGEEXL2/MDM/ngeaix208/interfaces
Cannot stat /NGEI/NGEEXL2/MDM/ngeaix208/interfaces: Stale file handle
Cannot stat /NGEI/NGEEXL2/MDM/ngeaix208/interfaces: Stale file handle
Cannot stat /NGEI/NGEEXL2/MDM/ngeaix208/interfaces: Stale file handle
Cannot stat file /proc/21665/fd/24: Stale file handle

3. Now umount the partition in lazy way to clear up the stale handles.

[root@ngelinux samba]# umount -l /NGEI/NGEEXL2/MDM/ngeaix208/interfaces

4. Mount the partition back.

 
[root@ngelinux samba]# mount /NGEI/NGEEXL2/MDM/ngeaix208/interfaces

[root@ngelinux samba]# df -h /NGEI/NGEEXL2/MDM/ngeaix208/interfaces
Filesystem            Size  Used Avail Use% Mounted on
ngeaix208:/NGEexl2/products/interfaces
                       10G  2.0G  7.6G  21% /NGEI/NGEEXL2/MDM/ngeaix208/interfaces

Now all stale file handles are cleared and we have a healthy partition mounted on server.

5 1 vote
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments