IBM Support

umount fails with device busy error

Troubleshooting


Problem

Attempt to unmount a file system fails with errors such as:

umount: 0506-349 Cannot unmount /dev/lvname: The requested resource is busy
umount: error unmounting /dev/lvname: Device busy

Cause

These are some of the common causes:
  1. Open files in file system
  2. The file system contains a library that is loaded
  3. File system contains the mount point of a nested file system
  4. The file system or a subdirectory is exported by NFS 
  5. The file system or directory is the root node or the public node of the NFSV4 tree 
  6. The file system is used for audit logs
1.  Open files in file system
Diagnosis:
# fuser -c /mountpoint
# fuser -dV /mountpoint

 
Resolution:
  • Check any processes that are listed by the above fuser commands & close any open files gracefully where possible
  • If processes have their current directory in the file system, change their current directory. (for example, shell users can cd to another directory)
  • If necessary consider killing processes that cannot be handled gracefully. fuser -ck /mountpoint can be used to kill all processes using the file system.
    1. It is always good practice to attempt 'kill <processid>' first, and 'kill -9 <processid>' only as a last resort. kill -9 will prevent processes from doing any cleanup that they may be designed to do
    2. Use caution when using fuser -ck. The -c flag selects processes accessing the file system containing /mountpoint. If there is no file system mounted at /mountpoint, it kills processes in the parent file system which may negatively impact the system.
2.  The file system contains a library that is loaded
Diagnosis: N/A

Resolution: Run 'slibclean' to unload unused libraries.
3.  The file system contains the mount point of a nested file system
Diagnosis: Check the output of the df or mount command
Resolution: unmount nested file systems before unmounting the parent.
4.  The file system or a subdirectory is exported by NFS
Diagnosis: Check the output of 'exportfs'

Resolution: If the file system or a subdirectory of the file system is exported, understand the impact of making it unavailable to the NFS clients.  Then unexport it using:
# exportfs -u /directory
 
5.  The file system or directory is the root node or the public node of the NFSV4 tree
Diagnosis: use 'nfsd -getnodes' to check the version 4 nodes.  /nfspublic will be busy in this example:
# nfsd -getnodes
#root:public
   /:/nfspublic
Resolution: Refer -r and -p options in the chnfs man page to change the root or public node.

6.  The file system contains active audit logs
Diagnosis: Use the 'audit query' command to check if auditing is enabled. Check the location of the audit files in /etc/security/audit/config.
Resolution: If auditing is enabled and has log files in the file system in question, stop auditing by 'audit shutdown'.

Resolving The Problem

SUPPORT

If you require more assistance, use the following step-by-step instructions to contact IBM to open a case for software with an active and valid support contract.  

1. Document (or collect screen captures of) all symptoms, errors, and messages related to your issue.

2. Capture any logs or data relevant to the situation.

3. Contact IBM to open a case:

   -For electronic support, see the IBM Support Community:
     https://www.ibm.com/mysupport
   -If you require telephone support, see the web page:
      https://www.ibm.com/planetwide/

4. Provide a clear, concise description of the issue.

 - For more information, see: Working with IBM AIX Support: Describing the problem.

5. If the system is accessible, collect a system snap, and upload all of the details and data for your case.

 - For more information, see: Working with IBM AIX Support: Collecting snap data

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG10","label":"AIX"},"Component":"","Platform":[{"code":"PF002","label":"AIX"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
07 July 2022

UID

ibm10879213