• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

CentOS/RHEL : Unmounting a Windows Share Fails – “device is busy”

by admin

The Problem

Unable to unmount a Windows share mount point using umount command. This Windows share is not being used by any processes recently. When executing umount command, the following error is seen;

umount: /data01: device is busy.
  (In some cases useful info about processes that use
  the device is found by lsof(8) or fuser(1))

The Solution

The error ‘umount: device is busy‘ means that the mount point is being held up by the server due to some reason. An lsof command is executed to find some open file descriptors.

# lsof /data01/
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
rsync 39176 oracle cwd DIR 0,25 0 54427649 /data01/primdb/rman
rsync 39176 oracle 1r REG 0,25 6678585344 54428135 /data01/primdb/rman/.RMDBPRD_LVL0_20170910_s145161_p1.WxJoHy (deleted)
rsync 39176 oracle 3u REG 0,25 5449449472 54428147 /data01/primdb/rman/.RMDBPRD_LVL0_20170910_s145161_p1.uqhidN

This PID could not be killed even with the kill command.

# kill -9 39176
# lsof /data01/
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
rsync 39176 oracle cwd DIR 0,25 0 54427649 /data01/primdb/rman
rsync 39176 oracle 1r REG 0,25 6678585344 54428135 /data01/primdb/rman/.RMDBPRD_LVL0_20170910_s145161_p1.WxJoHy (deleted)
rsync 39176 oracle 3u REG 0,25 5449449472 54428147 /data01/primdb/rman/.RMDBPRD_LVL0_20170910_s145161_p1.uqhidN

An rsync process which writes to this mount point is still in D state due to IO block which occurred some time ago.

# ps aux |grep rsync
root 30103 0.0 0.0 103304 804 pts/0 S+ 10:24 0:00 grep rsync
oracle 39176 0.0 0.0 110956 96 ? D Sep10 17:48 rsync -av --delete /eva/primdb/rman/ /data01/primdb/rman/

As this process is in an uninterruptible sleep state, this process could not be killed. This is the reason why it is not able to unmount the Windows share from the server.

The D state processes could not be killed using kill command as these are like orphaned entries in the process list without a parent. So it is recommended to do a server reboot for killing any such D state processes.

If a reboot is not possible at the moment as in the case of production servers, then wait until the IO becomes available again so that the process will wake up and get completed. However, it is not recommended to wait more than a month as gradually the server load might climb up if there are more such D state processes in the server.

Filed Under: CentOS/RHEL 6, CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. How to configure EPEL repository in OEL 7
  2. Examples of using dmsetup command in Linux
  3. guake: command not found
  4. sysctl Command Examples in Linux
  5. How to Transfer files securely using SCP Command in Linux
  6. Understanding linux parted utility
  7. How to Use Iperf to Test Network Performance in Linux
  8. CentOS / RHEL 5 : How to Configure kdump
  9. fail2ban-client Command Examples in Linux
  10. xeyes: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright