A mount -t nfs fails with Stale file handle if the server has some stale exports entries for that client. Example scenario: this might happen when the server reboots without the client umounting the nfs volumes first.
When the server is back and the client then umounts and tries to mount the nfs volume the server might respond with:. If there is entry for the client it might be a stale one. You can fix this via explicitly un-exporting and re-exporting the relevant exports on the server. For example to do this with all exports:. It's export being stale vs. A stale file handle easily happens with NFS e.
The error, ESTALE, was originally introduced to handle the situation where a file handle, which NFS uses to uniquely identify a file on the server, no longer refers to a valid file on the server. This can happen when the file is removed on the server, either by an application on the server, some other client accessing the server, or sometimes even by another mounted file system from the same client.
The NFS server also returns this error when the file resides upon a file system which is no longer exported. Additionally, some NFS servers even change the file handle when a file is renamed, although this practice is discouraged.
This error occurs even if a file or directory, with the same name, is recreated on the server without the client being aware of it. The file handle refers to a specific instance of a file and deleting the file and then recreating it creates a new instance of the file. The information is discovered to be out of date or stale when a subsequent operation is sent to the NFS server.
This error can also occur when a change is made on the server in between looking up different components of the pathname to be looked up or between a successful lookup and a subsequent operation. If you see lines related with the IP address of the NFS client and the share you are trying to mount, remove the stale entries from the rmtab:. In my case, I was also getting error "mount. This was happening since the older volume which was mounted got deleted. After unmounting, the volume using,.
Stale file handle error means that the NFS server holds an old version of the files in his export path. 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. All clients will see the mount point disconnect. If not then NFS configurations must be checked, provided you have changed configuration and post that you started seeing this error.
This site uses Akismet to reduce spam. Connect and share knowledge within a single location that is structured and easy to search. On the server node, it is possible to access an exported folder. However, after reboots both server and client , the folder is no longer accessible from the clients. I have to say that there were no problem with the shared folder from client side however after reboots server and client , I see this message. The order of reboots is important. Rebooting the server after the clients can result in this situation.
The stale NFS handle indicates that the client has a file open, but the server no longer recognizes the file handle. In some cases, NFS will cleanup its data structures after a timeout.
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. The server may keep the file open until it is rebooted, but the reboot will remove the in-memory file handle on the server side. Then the client will no longer be able to open the file.
Determining which mounts have been used from the server is difficult and unreliable. The showmount -a option may show some active mounts, but may not report all of them. Locked files are easier to identify, but require the locking to be enabled and relies on the client software to lock the files. You can use lsof on the clients to identify the processes which have files open on the mounts.
I use the hard and intr mount options on my NFS mounts. The hard option causes IO to be retried indefinitely. Then unmount the partition and mount it back. Sign up to join this community.
0コメント