Benches macOS

3

External Drive Won't Eject. LSOF no help.

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

I have an eSATA bay and we use it to frequently swap out external SATA drives. Very often, my attempts to eject the drives through the Finder fail. I get the message:

"The disk <disk name> is in use and could not be ejected"

To find out why, I turn to Terminal and enter:

lsof | grep <disk name>

Much of the time I see the app which has locked the drive and deal with it. But, almost as much, the lsof/grep command produces an empty result. I'm pretty confident I'm typing the disk name correctly. And to be doubly sure, I'll try

lsof | grep Volumes

to find locks on any external files. Still, these drives just don't appear.

Right now, I'm in the middle of an image database import which which will take a while. I would really like not to be in the position of having to kill such processes in order to swap drives.

Does anyone know what I could do about this short of restarting the computer? Does anyone know what I could do to prevent this from happening?

Thanks much!

3 replies

Sign in or join Beachball Help to reply.

  1. 0

    baltwo

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    The only thing that might be happening is that those are being indexed by Spotlight. Try disabling it on the HD before trying to disconnect.

  2. 0

    aubreyapple

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Top see the offending process you need sudo:

    sudo lsof | grep <disk name>

    Very likely it is fseventsd and I have no idea what it does... but apparently one can kill it without harm. You may wish to search for fseventsd in the discussions to be sure.

  3. 0

    aubreyapple

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I just took my own advice and did a search. It is still as clear as mud, but it looks like it might mess up time machine to kill it. Rebooting will solve the problem, if you can reboot.