“Try quitting applications”

The disk “X” is in use and could not be ejected.
Try quitting applications and try again.

I get this error message a lot on my Mac. And it’s so completely irritating. “Yeah, just… you know, quit some things and try again.” T_T

Yesterday someone showed me a way to identify what’s holding onto your disk. Just type this in your Terminal:

lsof +D <path to disk>

For example:
[mycomputer:~] guest% lsof +D /Volumes/LaCie/
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
AdobeRead 11375 ..... ... ... .... ........ .... /Volumes/LaCie/dsp.pdf

… So if I quit Adobe Reader, I can then eject LaCie.

February 2, 2008. computers/programming. 1 Comment.

One Comment

  1. Jacob replied:

    That rules!

    You might want to mention that you should be root/sudo to check all possible processes. In my case it turned out I had remote mounted the drive from another machine and nothing showed up until I used sudo. Then it was obvious what I had done when it showed “AppleFileServer” was holding the drive.

    June 10th, 2008 at 7:30 pm. Permalink.

Leave a Reply


Trackback URI