I have plugged an external disk to my Mac. Now, I want to eject it. But my Mac stubbornly refuses and says that an application may be using the disk.
I have not launched any app neither opened any file from the disk.
I have downloaded and installed the app What's Keeping Me? This app is quite nice. She tells me that the process
mds
is using my disk.I have a probook 645 g1. I cant found any eject button for its optical dik drive. Now windows boot manager appear and ask me to insert windows installation disk, but how can I do?
I have killed the process
mds
and several processes mdworker
. These are for Spotlight. But such processes get spawned again.How can I eject my disk from my Mac ?
I have Mac OS X 10.6.8.
Nicolas BarbulescoNicolas Barbulesco1,28177 gold badges2828 silver badges4343 bronze badges
8 Answers
Simply turn indexing off for the drive and erase the contents of the journal on the volume. To do so, open Terminal and enter the following command:
You must run this procedure as an admin. Enter your password when prompted. A reboot may be required.
Alternatively, as suggested by Simon White, just shut down the machine and then unplug the drive. The caveat is that the drive will start indexing when connected again, however.
user343989430k66 gold badges4747 silver badges6969 bronze badges
njbootnjboot6,52722 gold badges2222 silver badges5454 bronze badges
You may try to unmount it from the command line:
or with force:
If it's still failing, check what's using your disk:
Or using
lsof
:![Disk Disk](https://car-pictures.cars.com/images/?IMG=USC60FOC071B021001.jpg&height=369&autotrim=1)
(Some processes only turn up when lsof is run as administrator.)
To disable temporary Spotlight, run:
Then
sudo mdutil -a -i on
to re-enable.Other apps which can be helpful: Whats Keeping Me.
user343989430k66 gold badges4747 silver badges6969 bronze badges
kenorbkenorb7,49288 gold badges5252 silver badges102102 bronze badges
Often I find it is mds that is preventing me from unmounting a volume.
And then (quickly) try ejecting the volume again.
In my case, I am mounting another Mac's main volume on my current Mac. I don't want to disable Spotlight as I want indexing to resume when the external volume is returned to the other Mac (as its boot up volume).
ColinColin
To prevent Spotlight from indexing the drive, create a plaintext file in TextEdit with no content, just the title of .metadata_never_index and save to the external. Uncheck use extension 'txt' ... and tell TextEdit that yes, you do want to save it with a dot at the front (which will make it invisible.)
I'm not sure whether that will stop it right now, but it will prevent it in future.
Alternatively, make this Applescript into an app, to force eject [with the usual caveats on force-ejecting...]... credit to The MacTipper Blog
TetsujinTetsujin63.6k1515 gold badges108108 silver badges206206 bronze badges
If you can’t disconnect a drive for any reason, you can simply Shutdown the computer. When the computer is off, you can safely disconnect the drive. Then start the computer. This will not only enable you to safely unplug the drive, but it will ensure that the mds process restarts in case it is actually hung.
If you have decided that you don’t want to use Spotlight with that drive, all you have to do to stop it from being indexed is add the drive to the Privacy tab of the Spotlight pane of System Preferences. Spotlight will ignore the drive.
Alternatively, if you do want to use Spotlight on that drive, then building an index the first time the computer sees the drive is a necessary evil. Once the index is built, it is updated with every change to every file, so it won’t make you wait again. But if you don’t see a progress bar in the Spotlight menu, then it is likely that mds is hung. Again, just Shutdown the computer in that case, and disconnect your drive.
Simon WhiteSimon White
Another simple option is to eject it through Disk Utilities.
Tim UndheimTim Undheim
You can try to force-quit Finder, this worked for me. Finder was hanging onto the USB drive, so force-quiting and re-launching released whatever the hang was.
![Disk Eject Error Lincoln Mkz Disk Eject Error Lincoln Mkz](/uploads/1/2/4/8/124868520/798149385.jpg)
user128242user128242
You can tell Spotlight that it should never index that drive and then you won't have to worry about it.
In the 10.11 System Preferences there's an entry for 'Spotlight', which has a tab named 'Privacy'. Click '+', select your drive, and you're done. Just close System Preferences, wait a few seconds for the system to notice the update, and you should be able to eject. Now it won't start indexing the disk the next time you connect, so you won't have the problem again in the future.
nohillside♦54.5k1414 gold badges115115 silver badges163163 bronze badges
David K. StorrsDavid K. Storrs