Sunday, September 7, 2008

Unmounting a busy drive in Unix

When a drive is "busy" and having problems unmounting

sudo umount /media/HD-HSU2/
umount: /media/HD-HSU2: device is busy
umount: /media/HD-HSU2: device is busy

you can find out what's keeping the drive busy by using:

fuser -m /dev/sdc1

This will return with the process number of the process keeping the device busy.

Then use ps (like, a ps -x) to find out what process it really is and kill it.

No comments: