[RHEL 6.1] filesystem used for NFS export fails to unmount and returns 'device is busy' error

Solution Verified - Updated -

Issue

  • In RHEL 6.1 NFS server, the filesystem used for NFS export failed to unmount and returned device is busy error:
$ umount /vol1
umount: /vol1: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
  • Below are the steps that leads to this issue:
    1. On NFS server create ext2/ext3 filesystem on a device, and mount the filesystem
    2. Export the filesystem using NFS version 4 (default version)
    3. Mount the NFS filesystem on client
    4. Now open a new file in NFS share with O_RDWR|O_CREAT flags, again open the same file with O_RDONLY mode
    5. Close the file opened in previous step
    6. Unmount the NFS filesystem on client
    7. Unexport the filesystem from NFS server
    8. On NFS server try to unmount the filesystem used for NFS export, it fails with device is busy error

Environment

  • Red Hat Enterprise Linux 6.1
  • kernel 2.6.32-131.0.15.el6.x86_64
  • NFSv4

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content