Get the App
SLTechnology News&Howtos  ›  Servers  › 

What should I do if I encounter device is busy in Linux

Shulou Source: shulou.com Published: 2022-06-01 18:09:41 10月05日 Update

This article mainly shows you "what to do when you encounter device is busy in Linux", which is easy to understand and clear. I hope it can help you solve your doubts. Let the editor lead you to study and learn this article "what to do when you encounter device is busy in Linux".

"device is busy" is often encountered when Linux manages umount devices, if umount a file system encounters this situation, and you are not in the directory you need to unmount. Then it is likely that a user or process is using that directory.

# umount / mnt

Umount: / mnt: device is busy

Umount: / mnt: device is busy

Then you must use the fuser command to view the owner of the process ID and the process, such as:

# fuser-mu / mnt

/ mnt: 25781c (root)

# kill-9 25781

# umount / mnt

In a case like this, it means that rhythmbox users are using that directory. You can then use fuser-ck / dev/sdc1 to kill the process.

# fuser-m / dev/sdc1

/ dev/sdc1: 538

# ps auxw | grep 538

Donncha 538 0.4 2.7 219212 56792 SLl Feb11 11:25 rhythmbox

If all these efforts do not work, after killing the process, you may need to add the-f-l parameter at this time to force unloading

# umount-f-l / mnt

NOTE:

You can use the following command to check for bad blocks on the SATA hard drive.

# badblocks-v / dev/sda

# badblocks-v / dev/sdb

# badblocks-v / dev/mapper/vgosi-lvol1

Checking blocks 0 to 10477568

Checking for bad blocks (read-only test): done

Pass completed, 0 bad blocks found.

The above is all the contents of the article "what to do when you encounter device is busy in Linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Process how to do content directory article command situation user learning help representative parameter owner file time easy to understand more organization knowledge hard disk Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Apple OPPO Reno NVidia MariaDB