umount: device is busy

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
gilthanaz
Site Admin
Posts: 444
Joined: Fri Aug 29, 2003 9:29 pm
Contact:

umount: device is busy

Post by gilthanaz »

[Problem]
If you get a "device is busy" error while trying to umount a drive, make sure that no other user is in that directory. Make sure you didnt su yourself and the login-user is sitting in the directory you want to umount... make sure no one ... well, you know the hundreds of reasons why you couldn't umount.

[Solution]
If you want to know exactly why you cant umount, for example, /mnt/mymounteddrive - just use this:

lsof | grep /mnt/mymounteddrive

You will get all files and users that access that mount point atm - as well as the pids of their processes. You know how to use the kill <pid> command, right? :)
Post Reply