Can't eject external drive because I keep receiving message that it is being used though it is not

Discussion in 'OS X El Capitan (10.11)' started by stanw, Feb 9, 2016.

  1. stanw macrumors 6502a

    Aug 29, 2007
    I keep receiving the message that my external hard drives can not be ejected because one or more programs may be using it. The only option is to do a force eject or I reboot the iMac and unplug it while it reboots or after it reboots I can safely eject it. This keeps happening with different hard drives and it just happened when copying files from one drive to another, and the drive was not using any programs.

    1. is it bad for the drive to not safely eject it and just reboot the mac instead?
    2. is there some way to safely eject it when I receive this message? I quit every single program and even re launch finder and check the force quit menu and none of that seems to help.

  2. ocabj macrumors 6502a


    Jul 2, 2009
    I've had this happen on occasion, where even when I quit every single application, it still won't eject because it claims the drive is in use. Generally, what happens is some application has a rogue file descriptor locking some file on that volume. If you lsof and grep for the volume name, you should be able to locate the process locking a file on the volume, and you can (hopefully) kill the PID, then eject / unmount the disk, without having to restart.
  3. flowrider macrumors 603


    Nov 23, 2012
  4. Weaselboy, Feb 10, 2016
    Last edited: Feb 10, 2016

    Weaselboy Moderator


    Staff Member

    Jan 23, 2005
    OP> I get that sometimes when Spotlight it trying to index an external drive. You can prevent this by adding each of the drives to the exclude list in Spotlight settings. This fixed it for me on two different external drives I use.
  5. n-evo macrumors 65816


    Aug 9, 2013
  6. treekram macrumors 65832

    Nov 9, 2015
    Honolulu HI
    It would help to know what kind of files are on the external disk(s). If there are text files and you haven't done what was suggested in post #4, Spotlight will try to index all of the textual content, which can take some time if there are a lot of files with textual content. For non-textual files, it'll index the file names and metadata, if present. That could explain the problem when doing the file copy, particularly if both drives are being used for the first time on the computer.

    For some (all?) Apple apps if there are no files open, the app appears like it isn't running in the dock when it still is running and still has a hold on a file. I have also had issues since Yosemite with Terminal preventing an eject even after the current directory is not on the external drive. I have to close the Terminal window or the app to eject.
  7. fisherking macrumors 603


    Jul 16, 2010
    ny somewhere
    you could try quitting the finder, then, when the finder reloads (should happen immediately), try ejecting again...
  8. Partron22 macrumors 68020


    Apr 13, 2011
    Sometimes Preview keeps an unholy grip on files after you close them.
    The cure is to open a different file, in this case on a different drive, with Preview, then quit again.

Share This Page