Can’t unmount a volume? Here’s how to figure out why.

From Joe Kissell’s TidBITS post:

Have you ever tried to eject a CD, disk image, or network volume, only to see an error message saying the volume is in use? If so, the maddening part can be figuring out which process is using it so you can quit that process. So enter the following, substituting for VolumeName the name of the volume you can’t unmount:

lsof | grep /Volumes/VolumeName

By “enter the following”, Joe means fire up Terminal (Applications > Utilities) and enter that line in Terminal’s command line. You’ll see a list of processes that are using the specified volume. Should be enough of a clue for you to quit the associated application. Or kill the process.

Not sure how to kill a process? Read this post.

Tuck this one away. And read the rest of Joe’s post, too. Useful stuff.