What causes stale NFS mounts?

What causes an NFS “stale file handle” error? The answer is any change in the mounted file’s underlying inode, disk device, or inode generation on the NFS server causes an NFS stale filehandle.

How do you unmount a stale NFS mount that fails to unmount?

You can use umount -f -l /mnt/myfolder , and that will fix the problem.

  1. -f – Force unmount (in case of an unreachable NFS system). (Requires kernel 2.1.
  2. -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.

How do I know if my mount is NFS stale?

Stale files are usually found using ls -ltR / | grep “\?” , but this usually takes some time (since it goes over all files in a given path). To further clarify, the issue seen in specific files such as Java library file(s) rather than the whole mount.

Why NFS is not suitable for work anymore?

The NFS device inherently sits directly in the data path, and can’t scale performance to accommodate the demands of I/O intensive computing or multiple concurrent requests. Any gateway is a bottleneck too, and NFS gateways are no exception.

How do I restart my NFS kernel server?

When you are finished making your changes, save and close the file. Then, to make the shares available to the clients that you configured, restart the NFS server with the following command: sudo systemctl restart nfs-kernel-server.

How can I remount a stale NFS file?

Check the /etc/dfs/sharetab file on the NFS server for an entry corresponding to the box in question. If you see such an entry, edit the file, remove the entry and save the file, and try to remount the NFS resource on the client. First let us try to understand the concept of Stale File Handle.

Why does Mount-t fail with stale file handle?

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:

Why do I get an error mount.nfs?

Whenever you reboot the NFS server or some of the NFS processes are not running on the client or server or share is not properly exported at the server; these can be reasons for this error. Moreover, it’s irritating when this error comes to a previously mounted NFS share.

When does NFS server change the file handle?

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.