Wednesday, May 20, 2009

Disk is in Use and You Can't Eject It

Ever had a hard drive you can't eject because the Finder claims it's in use even though no project is open on it, no file is open, no anything is anything on the drive?

Usually the culprit is FCP which sometimes doesn't want to be left all alone and desperately clings to any last vestiges of its former usefulness. There's a Terminal command to find out what is using the drive (or at least what file is open on it) but it's the Terminal and that's not very Mac-Like.

So, recently a free application called WhatsOpen appeared and it's perfect for finding out what's going on. Give it a try and donate something if you like it and find it useful.

This is different from when the Finder just decides to leave a properly ejected drive's icon in the sidebar which does happen on occasion. Those you can just drag out of the sidebar and enjoy the poof of smoke.

If you really want to know the Terminal command it's:

lsof | grep /Volumes/Stubborn-Hard-Drive

Where Volumes/Stubborn-Hard-Drive is the path to the hard drive in question. To make it a little easier just type:

lsof | grep

into the Terminal, then drag in the stubborn hard drive from the Finder and hit return. You'll see what file is "in use" on the drive. lsof, btw means LiSt Open Files.

No comments: