When Linux Complains Umount Cannot Be Done, A Flash/USB Device Is Busy!

As any other operating system, Linux comes with its own problems.  Today I like to talk about how to umount your flash/usb drive from your Linux box (Linux computer).  When everything is fine as the sky is blueish, no rain, and the sun is out shining brightly, you find that umount is working without complaining.  The truth is that umount sometimes behave oddly, but not everyone using Linux will be the unlucky one that gets to experience this.  I had!  Umount complained that the device is busy and cannot be umount.  I was freaking out, and of course, the logical thing to do is to get out of the directory that you want to umount, but when I did that the freaking Linux still complained that the device is busy.

To solve the problem like this, I had to search the web for an answer!  I found the answer, and it was about a running process or a running file that failed to die and still used the mounting directory.

Let solve this!  First you need to get out of the directory that you’re trying to umount.  Type pwd to see what directory you’re in.  You can also do mount -l to list the mounting devices/directories.  By checking with mount -l you can see that the flash/usb drive is listed there as a mounting device/directory, and this assures you that the device is still busy.  The easiest way is to see if one command line “umount -l /media/disk” (/media/disk is where my flash/usb drive mounts to, your can be named differently) solves the problem.  After trying umount -l and you still see Linux complains about the device is busy, then you have to try the next method.

Alternative method is to kill the process that bothers the mounting device.  To list the process that bothers your mounting device, you can try “fuser -m /media/disk” command line.  This will show the process’s ID of the bothersome process/file.  To kill the bothersome process/file, you need to do “kill -9 12345″ where as 12345 is the process’s ID.  Each process has different ID number, and so number 12345 is just an example. After killing the bothersome process/file, you can try “umount -l /media/disk” again to see if umount is possible or not.  You can also do “mount -l” to see the mounting device that you’re trying to get rid of is still hanging around or not.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • MySpace
  • Netvibes
  • NewsVine
  • RSS
  • Technorati
Linux

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

Leave Comment

You must be logged in to post a comment.