Contents
How do I clear a stale file handle?
Try restarting NFS first on the server and then on the clients. This may clear the file handles. Rebooting NFS servers with files opened from other servers is not recommended. This is especially problematic if the open file has been deleted on the server.
What causes stale file handles?
A filehandle becomes stale whenever the file or directory referenced by the handle is removed by another host, while your client still holds an active reference to the object. So this can occur if the directory is modified on the NFS server, but the directories modification time is not updated.
How check stale NFS mount?
You could write a C program and check for ESTALE . mount can list NFS mounts directly. read -t (a shell builtin) can time out a command. stat -t (terse output) still hangs like an ls *.
How do you unmount a stale NFS mount?
You can use umount -f -l /mnt/myfolder , and that will fix the problem.
- -f – Force unmount (in case of an unreachable NFS system). (Requires kernel 2.1.
- -l – Lazy unmount. Detach the filesystem from the filesystem hierarchy now, and cleanup all references to the filesystem as soon as it is not busy anymore.
Which daemon is not required to run NFS service?
To support NFS file locking, the lockd and statd daemons are run on NFS clients and servers. However, unlike previous versions of NFS, in NFS version 4, the daemons lockd, statd, mountd, and nfslogd are not used. This section describes the following daemons.
How can I resolve A GPFS stale file handle in?
In the ” gpfs02 ” cluster I created mmremotecluster and mmremotefs is configured correctly, but when trying to mount, I get this stale file handle error: [root@gpfs02 ~]# mmmount all Thu Dec 12 18:57:14 IST 2019: mmmount: Mounting file systems mount: mount gpfs02 on /gpfs/storage failed: Stale file handle.
Why do I get stale file handle error?
The stale file system error is telling you that this has occurred. Unmounting (force) and remounting from the client will resolve this problem IF there are no other references within the client that are retaining the handle/ID. I.e. this is a problem for processes that are running and have open file handles when you do the force unmount.
When does a filehandle become stale in NFS?
A filehandle becomes stale whenever the file or directory referenced by the handle is removed by another host, while your client still holds an active reference to the object.
How to resolve mount.nfs error handle error?
Try killing them off to free mount point. Once done you will be able to un-mount it properly. Sometimes it still gives the same error for mount command. Then try mounting after restarting NFS service at the client using the below command. Even if this didn’t solve your issue, final step is to restart services at the NFS server.