When you use macOS, you definitely know if you’ve opened a Pages file or are editing an email. But beneath the surface are files that macOS uses that you don’t see: all the activities required for background processes, Time Machine backups, Spotlight indexing, and other system needs. When you want to eject a mounted volume, such as a volume on an SSD or external hard drive, you may contravene the hidden needs of macOS.
You can try to eject a volume normally in these ways:
- Select it in Finder and press Command-E.
- Select it in Finder and choose File > Eject.
- Ctrl-click/right-click the volume in Finder and choose Eject “Volume Name”.
(If you don’t see the volume in Finder, choose Go > Computer or press Command-Shift-C, or choose Finder > Settings > General and check all items under “Show these items on desktop.” “)
If you’re lucky, when you try to eject a volume, you see a message with specific details, like this one that appeared when I tested ejecting the external drive that hosts my main Photo Library :
If you’re lucky, macOS tells you exactly which apps to quit.
Foundry
Exiting these two applications allowed me to eject “Photos SSD 2 TB”. However, if something happens at the system level, you will see a message like this: “The disk [name] was not ejected because one or more programs may be using it. You can try ejecting the disc again or click Force Eject to eject it immediately. The Cancel and Force Eject buttons are part of the dialog box, and a progress arrow appears next to the phrase “Try to eject.”
This does not help resolve the situation. Here’s what you can do to narrow down the problem. (And note that Apple uses the term “disk” despite the fact that in Finder you always eject a volume, because some disks can contain multiple mountable volumes.)
Close Finder windows
As strange as it may seem, just having a window open in the Finder showing the contents of the volume or a folder on it can sometimes trick the Finder into thinking that a “program” is using that mounted item. Close the Finder window and try again.
Remove Spotlight volume
I have found that Spotlight can sometimes grab a volume and mark it as non-ejectable even when indexing is not actively in progress on that volume.
You can check if this is the problem by going to > System Settings > Siri and Spotlightscroll to the bottom of the view and click Confidentiality. Drag the volume into the window (or click + and navigate to it, then add it), then click Do. This immediately removes the volume from indexing.
Try to eject now. If it works, that was the problem. However, if you want to search for items on this volume, you will need to delete it from Spotlight Privacy later.
Check if Time Machine is backing up
If Time Machine is actively backing up the volume, you may not be able to eject it. Check the status of Time Machine either through its system menu or by going to > System Settings > General > Time Machine. If it is in progress, you can choose Skip this save in the Time Machine system menu or click the “x” box next to the active session in the System Settings view and wait for Time Machine to finish.
You can exclude the volume from Time Machine using the settings view: click Possibilitiesclick the + (plus) sign at the bottom of Exclude backups, and add the volume once mounted. Click on Do.
Head to the terminal
There is an easy way to dig deeper using the terminal. In Terminal, copy and paste the following command after replacing “Volume Name” with the precise name of your volume, including spaces, and press Return:
lsof | grep '/Volumes/Name of volume'
Make sure there are straight single quotes before the /
In front /Volumes
and at the end of the line after your volume name.
THE lsof
The command displays all files used by applications and system processes; grep
is a filter option that, along with 'Volumes'
allows you to see only files used by a mounted drive.
The resulting output is full of technical details, but by reading it you may be able to identify which programs are causing the problem or which system processes have taken over.
For my external photo library volume, for example, I saw dozens of entries, which include these two lines:
mediaanal 38659 glenn txt REG 1,38 32768 42399710 /Volumes/Photos SSD 2TB/Photos Library.photoslibrary/database/Photos.sqlite-shm
Adobe\x20 855 glenn 84u REG 1,38 7134511104 62657146 /Volumes/Photos SSD 2TB/.TemporaryItems/folders.501/TemporaryItems/Adobe Photoshop 2024/Photoshop Temp1442699855
From there, I could have guessed that Photos and Adobe Photoshop were active, even if Finder hadn’t told me. You may be able to determine from the list which application(s) to quit, or even if you’re not sure why a given process is using the volume. In which case…
Force eject
If a Force Eject button is available in the dialog box shown at the beginning of this article, you can click it now. However, I’m not a big fan of it: using Force Eject can cause a problem when the open file on the volume being ejected is not properly updated and closed. This could corrupt a file you need without knowing it. I try to save Force Eject when I know macOS is ridiculous and there is no problem or it’s a situation where I don’t have time to choose the most conservative solution, noted then: stop or restart.
Close
If none of the solutions above help you, then:
- For a physically connected external volume, choose > Stop. When your Mac is completely shut down, unplug the SSD or hard drive. Press the power button on your Mac to start.
- For a “logically” mounted volume, such as a disk image or networked volume, choose > Restart. On reboot, the volume should be unmounted by default. Otherwise, select it immediately and use an eject option listed above, which should now work.
This Mac 911 article responds to a question submitted by igamesnews reader Cliff.
Ask Mac 911
We’ve compiled a list of the questions we get asked most frequently, along with answers and links to columns: read our super FAQ to see if your question is covered. Otherwise, we are always looking for new problems to solve! Send yours to [email protected], including screenshots where applicable and if you would like your full name used. We will not answer all questions, we do not respond to emails, and we cannot provide direct troubleshooting advice.
Table of Contents