umount: /mnt/XXXX: device is busy

Are your tired of those nasty messages telling you can’t umount /mnt/cdrom?

Well here goes a little trick…

lsof | grep /mnt/cdrom

This will output the process(es) that are using the device. Now stop or kill the process and you are done.

There are another approach to this question, but let’s see if you have ideas on this…

2 Responses to “umount: /mnt/XXXX: device is busy”

  1. Anonymous says:

    You also could try something like this…

    fuser -muv /mnt/cdrom

    which will list each account, PID, etc using the device mounted on /mnt/cdrom.

  2. Anonymous says:

    This will also do the trick:

    kill -9 `lsof -t /dev/cdrom`
    umount /dev/cdrom
    eject

Leave a Reply

You must be logged in to post a comment.