Tag Archives: umount

Umount error: /home: target is busy. [How to Solve]

 

Record an error when alicloud ECS is operated and the disk is unloaded. The result of alicloud data disk unloading shows:

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

At first glance, it is very simple. If a process is occupying the disk, it is OK to exit. However, after troubleshooting, it is found that no process is occupied. At this time, a command needs to be used: fuser (use file or file structure to identify the process)

fuser -m -v /dev/vdb

-m   Name specifies a file mounted on the file system or a mounted block device (name). In this way, all processes accessing the file or file system will be listed. If a directory is specified, it will be automatically converted to “name /”, and all file systems mounted under that directory will be used;

-v   Detailed mode, output like PS command, including PID, user, command and many other fields. If it is accessed by the kernel, the PID is the kernel. – V output version number;

 

-k   Kill the process that accesses the file. If – signal is not specified, sigkill signal will be sent;

-a   Displays all the files specified on the command line. By default, the accessed files will be displayed.