DbAppWeb.com

Menu
  • Home
  • Linux
  • HP-UX
  • macOS
  • Windows
  • Web Servers
  • App Servers
  • Storage

Umount NFS Volume showing ‘Stale file handle’ error in RHEL Systems

July 30, 2020 DbAppWeb Admin

Problem

I have an NFS server and some volume/directories are shared from this server to other servers. One day I performed some tasks on the NFS server and during this activity, I removed a mount point /test which was shared with other servers.

Before removing the mount point I had stopped the NFS service and after re-mounting the /test I started the NFS service.

When I check the mount point on client systems, df -h showed the Stale file handle error as shown below:

[root@dbappweb.com ~]# df -h /home/test
df: ‘/home/test’: Stale file handle

I tried fuser, also tried to umount forcefully but not become successful.

[root@dbappweb.com ~]# fuser -kcu /home/test
Cannot stat /home/test: Stale file handle
[root@dbappweb.com ~]# umount nfs_server:/test
umount.nfs4: /home/test: device is busy
[root@dbappweb.com ~]# umount -f /home/test
umount.nfs4: /home/test: device is busy

Reason

This has happened because the NFS service stopped on the NFS server without umounting the NFS volume first on client systems. This may also happen in the case of the NFS server rebooted without the client umounting the NFS volumes first.

Solution

Use the -l option with umount command to umount the NFS volume showing ‘Stale file handle’ and it will be successfully umounted.

[root@dbappweb.com ~]# umount -lf /home/test

After successful umounting, remount the volume again.

[root@dbappweb.com ~]# mount nfs_server:/test /home/test

And server started working fine with NFS mounted volume.

[root@dbappweb.com ~]# df -h /home/test
Filesystem                   Size  Used Avail Use% Mounted on
nfs_server:/test             1.0T  320G  680G  32% /home/test

Use umount –help or umount -h to get more details about umount command.

[root@dbappweb.com ~]# umount --help
[root@dbappweb.com ~]# umount -h

Usage:
 umount [-hV]
 umount -a [options]
 umount [options]  | 

Options:
 -a, --all               unmount all filesystems
 -A, --all-targets       unmount all mountpoins for the given device
                         in the current namespace
 -c, --no-canonicalize   don't canonicalize paths
 -d, --detach-loop       if mounted loop device, also free this loop device
     --fake              dry run; skip the umount(2) syscall
 -f, --force             force unmount (in case of an unreachable NFS system)
 -i, --internal-only     don't call the umount. helpers
 -n, --no-mtab           don't write to /etc/mtab
 -l, --lazy              detach the filesystem now, and cleanup all later
 -O, --test-opts   limit the set of filesystems (use with -a)
 -R, --recursive         recursively unmount a target with all its children
 -r, --read-only         In case unmounting fails, try to remount read-only
 -t, --types       limit the set of filesystem types
 -v, --verbose           say what is being done

 -h, --help     display this help and exit
 -V, --version  output version information and exit

For more details see umount(8).
[root@dbappweb.com ~]#

Last Updated: July 30, 2020

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Telegram (Opens in new window)
  • Click to share on WhatsApp (Opens in new window)
Prev Article
Next Article
Tags:Linux NFS RedHat Linux RHEL

Leave a Reply Cancel Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • Popular
  • Recent

Categories

  • Android (2)
  • Blogger (16)
  • Domain and Hosting (1)
  • Hardware Issues (7)
  • HP-UX (55)
  • HPE Data Protector (9)
  • IBM Lotus Notes (2)
  • IBM WebSphere Application Server (16)
  • Internet Tips & Tricks (15)
  • iOS (8)
  • JBoss/WildFly Application Server (2)
  • Linux (76)
  • macOS (15)
  • Microsoft Windows (31)
  • News and Updates (11)
  • Oracle Database (5)
  • SSL/TLS (1)
  • Storage Servers (23)
  • Tools/Softwares (1)
  • VMware ESXi (17)
  • Web Servers (14)
  • WordPress (5)

Archives

DbAppWeb.com

Solution of Database, Application and Web Server Problems

About DbAppWeb.com

One Stop Solution for Database Server, Application Server and Web Server Problems.

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

DbAppWeb on Social Media

Copyright © 2025 DbAppWeb.com
Terms and Conditions   Theme by MyThemeShop.com