You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How do you eject a Time Machine drive safely?

I know this is a common problem, but I've found no comprehensive answer.


Time Machine external USB drives will not unmount because the system says that another program is using the drive. lsof shows that mds (spotlight) is the culprit. I've read that spotlight is now part of Time Machine's dependencies, so adding the drive to the Spotlight Privacy settings is ignored (and it is). I've read that one should disable automatic backups, but then local backups are removed. And of course, it would seem that force ejecting the drive or killing mds is just a bad, bad idea all around. Meanwhile, the only solution that seems to work (at least does not produce scary messages) is to shut the machine down, disconnect the drive and restart. Is there any official Apple position on how to get eject Time Machine disks? Do I really have to stop everything I'm doing, shut down my entire system and restart just to eject the drive safely?

MacBook Pro (Retina, 15-inch, Late 2013), OS X Yosemite (10.10.3)

Posted on Feb 3, 2018 2:50 PM

Reply
Question marked as Top-ranking reply

Posted on Feb 3, 2018 7:42 PM

Perhaps your issue is an improperly functioning system that is causing the problem.


Possible Fixes for El Capitan or Later

You should try each, one at a time, then test to see if the problem is fixed before going on to the next.


Be sure to backup your files before proceeding if possible.


  1. Shutdown the computer, wait 30 seconds, restart the computer.
  2. Resetting your Mac’s PRAM and NVRAM
  3. Reset the System Management Controller (SMC)
  4. Start the computer in Safe Mode, then restart normally. This is slower than a standard startup.
  5. Repair the disk by booting from the Recovery HD. Immediately after the chime hold down the Command and R keys until the Utility Menu appears. Choose Disk Utility and click on the Continue button. Select the indented (usually, Macintosh HD) volume entry from the side list. Click on the First Aid button in the toolbar. Wait for the Done button to appear. Quit Disk Utility and return to the Utility Menu. Restart the computer from the Apple Menu.
  6. Create a New User Account Open Users & Groups preferences. Click on the lock icon and enter your Admin password when prompted. On the left under Current User click on the Add [+] button under Login Options. Setup a new Admin user account. Upon completion log out of your current account then log into the new account. If your problems cease, then consider switching to the new account and transferring your files to it - Transferring files from one User Account to another.
  7. Download and install the OS X El Capitan 10.11.6 Combo Update or 10.12.6 Combo Update or Download macOS High Sierra 10.13.3 Combo Update as needed.
  8. Reinstall OS X by booting from the Recovery HD using the Command and R keys. When the Utility Menu appears select Reinstall OS X then click on the Continue button.
  9. Erase and Install OS X Restart the computer. Immediately after the chime hold down the Command and R keys until the Apple logo appears. When the Utility Menu appears:
  1. Select Disk Utility from the Utility Menu and click on Continue button.
  2. When Disk Utility loads select the drive (out-dented entry) from the Device list.
  3. Click on the Erase icon in Disk Utility's toolbar. A panel will drop down.
  4. Set the Format type to Mac OS Extended (Journaled.)
  5. Click on the Apply button, then wait for the Done button to activate and click on it.
  6. Quit Disk Utility and return to the Utility Menu.
  7. Select Reinstall OS X and click on the Continue button.

Similar questions

7 replies
Question marked as Top-ranking reply

Feb 3, 2018 7:42 PM in response to waltz49

Perhaps your issue is an improperly functioning system that is causing the problem.


Possible Fixes for El Capitan or Later

You should try each, one at a time, then test to see if the problem is fixed before going on to the next.


Be sure to backup your files before proceeding if possible.


  1. Shutdown the computer, wait 30 seconds, restart the computer.
  2. Resetting your Mac’s PRAM and NVRAM
  3. Reset the System Management Controller (SMC)
  4. Start the computer in Safe Mode, then restart normally. This is slower than a standard startup.
  5. Repair the disk by booting from the Recovery HD. Immediately after the chime hold down the Command and R keys until the Utility Menu appears. Choose Disk Utility and click on the Continue button. Select the indented (usually, Macintosh HD) volume entry from the side list. Click on the First Aid button in the toolbar. Wait for the Done button to appear. Quit Disk Utility and return to the Utility Menu. Restart the computer from the Apple Menu.
  6. Create a New User Account Open Users & Groups preferences. Click on the lock icon and enter your Admin password when prompted. On the left under Current User click on the Add [+] button under Login Options. Setup a new Admin user account. Upon completion log out of your current account then log into the new account. If your problems cease, then consider switching to the new account and transferring your files to it - Transferring files from one User Account to another.
  7. Download and install the OS X El Capitan 10.11.6 Combo Update or 10.12.6 Combo Update or Download macOS High Sierra 10.13.3 Combo Update as needed.
  8. Reinstall OS X by booting from the Recovery HD using the Command and R keys. When the Utility Menu appears select Reinstall OS X then click on the Continue button.
  9. Erase and Install OS X Restart the computer. Immediately after the chime hold down the Command and R keys until the Apple logo appears. When the Utility Menu appears:
  1. Select Disk Utility from the Utility Menu and click on Continue button.
  2. When Disk Utility loads select the drive (out-dented entry) from the Device list.
  3. Click on the Erase icon in Disk Utility's toolbar. A panel will drop down.
  4. Set the Format type to Mac OS Extended (Journaled.)
  5. Click on the Apply button, then wait for the Done button to activate and click on it.
  6. Quit Disk Utility and return to the Utility Menu.
  7. Select Reinstall OS X and click on the Continue button.

Feb 3, 2018 6:01 PM in response to Kappy

I know how to eject drives. The problem is that MacOS does not release the drive, even after hours of non-use, and long waits after a backup. Even when the activity light has not flashed in a long time, the mds process holds on to it with numerous open files. There must be a way to tell mds to stop indexing the files in order to unmount the drive, but I can't find it.


One addition that I forgot to mention before, some people have problems with Finder keeping files open as well, mainly for icons. I've seen that also (quick fix is to kill Finder which restarts automatically), but that is not the issue here.

Feb 3, 2018 3:08 PM in response to waltz49

My Time Machine drive ejects without problems. You wait until the drive has stopped processing by watching the indicator light. Or eject the drive then wait for the OS to eject it. Spotlight's connection to Time Machine is what enables you to backup and restore. You can't search without Spotlight.


If you shut down the computer there is no reason to disconnect the drives. They will restart when the machine restarts. The official action is to select the Desktop icon(s) for the drive(s) you wish to eject then press the Eject key. You can also use Command-E to eject a selected drive(s) or select Eject from the Finder's File menu. Then there are ways using the Terminal.

Feb 3, 2018 11:22 PM in response to CountryGirl56

Adding the drive to "Spotlight" / "Privacy" is supposed to stop Spotlight (through the mds process) trawling the drive.


I've been intermittently suffering a similar issue, and am looking for a solid fix as well.


Adding the drive into "Spotlight" / "Privacy" does help, but the setting seems to disappear from time to time. For me, the setting does become invisible whilst the drive is unmounted, and reinstates itself when the drive mounts, but occasionally when I eject the drive, I again receive the drive in use message. "lsof' implicates 'mds' as the culprit, and the drive has vanished from the "Spotlight" / "Privacy" list. On some of these sessions, I've verified that the drive DID add itself back into the list when it mounted. This means that either it was dropped from the list whilt in normal use, or, when I attempted to eject the drive, a race condition occurred whereby as part of prep for the eject, the drive was removed from the privacy list, and mds stepped in in the instant before the drive was actually unmounted.


Another mitigation that I've read suggests touching a .metadata_never_index file into the root of the removable volume (which is supposed to disable indexing the volume). I have implemented such files, but cannot say that I've noticed any benefit.


For me, the issue as noted on Sierra (which was the original OS on my MBP) and High Sierra since. However researching this suggests that it is a much longer running issue.

How do you eject a Time Machine drive safely?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.