Umounting Linux drive if it doesn’t want to unmount “umount: /media/cdrom: device is busy”

If you use Linux as Desktop or even on some servers you might end up in situation where mounted filesystem is refusing to unmount with an error:
 

umount: /media/cdrom: device is busy

That's pretty annoying and many people (especially) desktop users would force a system reboot in order to have the fs unmounted.

If this happened to you, there is no need for that anymore. umount cmd has a handy option – (Lazy Unmount) for situations like this. Here is -l description from umount manual:

 -l     Lazy unmount. Detach the filesystem from the filesystem hierarchy now, and cleanup all references to the filesystem as soon
              as it is not busy anymore.  (Requires kernel 2.4.11 or later.)

So next time you hit "umount device is busy" do:

# umount -l /media/cdrom

Enjoy 😉

Share this on:

More helpful Articles

Download PDFDownload PDF

Tags: , , , , , , ,

One Response to “Umounting Linux drive if it doesn’t want to unmount “umount: /media/cdrom: device is busy””

  1. RoseHosting says:
    Google Chrome 29.0.1547.76 Google Chrome 29.0.1547.76 Windows 7 x64 Edition Windows 7 x64 Edition
    Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.76 Safari/537.36

    yes, the lazy umount in most cases will work but one can also use

    'lsof /path/to/mountpoint'

    or in this case /media/cdrom to see what processes are preventing umount to complete.

    thanks

    View CommentView Comment

Leave a Reply

CommentLuv badge