It happens all the time doesn’t it? You need to unmount a CD or you want to pack away the external drive but when you try to umount it you get the dreaded “device is busy” message. Wouldn’t it be great if Linux actually told you what was keeping the drive busy? Here we are in 2008, I’m using Ubuntu Gutsy, and that message hasn’t changed in all the years I’ve used Linux.
# umount /media/disk/
umount: /media/disk: device is busy
umount: /media/disk: device is busy
First thing you’ll do will probably be to close down all your terminals and xterms but here’s a better way. You can use the fuser command to find out which process was keeping the device busy:
# fuser -m /dev/sdc1
/dev/sdc1: 538
# ps auxw|grep 538
donncha 538 0.4 2.7 219212 56792 ? SLl Feb11 11:25 rhythmbox
Rhythmbox is the culprit! Close that down and umount the drive. Problem solved!
thaaaaaaaaaaaaks niall i love you 🙂
abe chutiye, nahin solve ho raha 🙂
just reconnect the ssh terminal and try again, bash is using hte mounted device.
saludos desde argentina 😀
On Redhat 6, for a loop device, umount -l cannot free the loop device associated, even the “-d” option is specified.
closing all the terminals did it for me
Thanks -l is worked for me (y)
cheers for the -l switch….tried other ones and they didn’t work.
had a issue with a broken nfs mount and it seems the nfs service was not running on the server.
anyway, sorted that, and the -l switch worked like a charm 🙂
many many thanks. i have a great respect for your work here. Hugs from Portugal
Who is reading this in 2019?