How to fix “umount device is busy”

By | February 24, 2015

You need to unmout a drive like external drive, CD/DVD drive, but when you try to unmout it, you get an error with “device is busy” message, for me it happens all the time. So I think what brings you here is because the same “umount device is busy” error and because of that my post this time will show you “how to Fix umount device is busy” error.

There are 2 different methods to fix this error, I will show you both of them, so lets get started..

Method 1

Handy, but lazy method

This method is the simplest and the easiest way to fix the error, this method is still using the umount. This method will immediately detaches the drive from the filesystem, and cleans up the mess afterwards, this method is really handy if you want to umount a networked file system. So how to use this easy method, use the command below.

# umount -l /dev/sdX

As you can see, there is a -l. Just add that -l before the /dev/ and don’t forget to change /dev/sdX to yours.

Method 2

Find the culprit !

You use the umount command and you found this error :

# umount /media/disk/
umount: /media/disk: device is busy

Now first thing you’ll need to do is close every terminals and application, also don’t forget to save your work too. Next thing you do is use the fuser command to find which process was keeping the device busy, so use this command :

# fuser -m /dev/sdX
/dev/sdX : 1004

Now you know the process that keeping the device busy is a process with id 1004, to know the name of the process use this command :

# ps auxw|grep 1004
mortarboyz 1004 0.4 2.7 219212 56792 ? SLl Feb20 11:55 rhythmbox

After we use the command above, you can see what process that keeping the device bust. As you can see on the example above, Rhythmbox is the culprit !. Now after we know the process you can close the process, or if you want, you can kill the process with this command :

# kill 1004

Or you can kill the process by using its name :

# killall process_name

Then umount the drive, Problem Solved !.

Thats all for my post How to fix “umount device is busy”, i hope this post will help you to fix your unmounting error. Thank you !

Leave a Reply

Your email address will not be published. Required fields are marked *