| Resolving Stale nfs file handle issues on Linux |
| Articles & Information - Tech Talk | |
|
NFS is a mature and simple system for file sharing across systems. It is not the fastest or most feature rich but is supported by almost everything so is an easy choice for *nix users. When your NFS server is restarted, it is common for existing clients to report a "Stale NFS file handle" when accessing shared resources. This is a server issue, not a client issue as one may assume. To resolve this, there are 2 options: 1) Refresh the server (Recommended) The server needs to have a new registry of connected clients in the local exports table. To achieve this, just run the following command: exportfs -f This is described in the manual page as: "In 'new' mode, flush everything out of the kernels export table. Any clients that are active will get new entries added by mountd when they make their next request." 2) Remount the client mount Remounting the share can be achieved as follows: mount -o remount /home The client may not let you do this if there are processes using the share. You will see an error like this: umount.nfs: /home: device is busy fuser -fvm /home/ The response may be similar to this: root@vm-1207:/etc/exim4/conf.d# fuser -fvm /home/ You can then close off the programs accessing the share and remount.
|
|