Edit
Attach
Printable
topic end
<!-- * Set TOPICTITLE = #define private public - "Disk FOO wasn't ejected because one or more programs may be using it!" (25 Oct 2015) --> <style type="text/css"> pre {background-color:#ffeecc;} </style> %STARTINCLUDE% <a name="25"></a> ---+++ [[DefinePrivatePublic20151025MacEjectExternalDisk]["Disk FOO wasn't ejected because one or more programs may be using it!"]] (25 Oct 2015) <summary> I had seen that pesky message every now and then before, but today I finally got fed up with it, as I was pretty sure that no application was running which had a legitimate business touching the external drive - at least none of the applications I had started myself. So I set out on a quest to find the culprit. </summary> The weapon of choice in such a case is [[https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man8/lsof.8.html][lsof]]: <pre> sudo lsof | grep /Volumes/FOO </pre> In my case, this produced a list of files opened by a process called =mds_store= which, apparently, is used to produce the Spotlight search index: <pre> mds_store 42059 root txt REG 1,6 3277 8832664 /Volumes/FOO/.Spotlight-V100/Store-V2/A75D8EF4-8412-4A13-8775-A52C20F05842/live.0.indexGroups mds_store 42059 root txt REG 1,6 32768 8832663 /Volumes/FOO/.Spotlight-V100/Store-V2/A75D8EF4-8412-4A13-8775-A52C20F05842/live.0.indexIds mds_store 42059 root txt REG 1,6 8192 8832666 /Volumes/FOO/.Spotlight-V100/Store-V2/A75D8EF4-8412-4A13-8775-A52C20F05842/live.0.indexTermIds mds_store 42059 root txt REG 1,6 8192 8832668 /Volumes/FOO/.Spotlight-V100/Store-V2/A75D8EF4-8412-4A13-8775-A52C20F05842/live.0.indexPositionTable mds_store 42059 root txt REG 1,6 8224 8832669 /Volumes/FOO/.Spotlight-V100/Store-V2/A75D8EF4-8412-4A13-8775-A52C20F05842/live.0.indexDirectory mds_store 42059 root txt REG 1,6 1024 8832670 /Volumes/FOO/.Spotlight-V100/Store-V2/A75D8EF4-8412-4A13-8775-A52C20F05842/live.0.indexCompactDirectory mds_store 42059 root txt REG 1,6 65536 8832671 /Volumes/FOO/.Spotlight-V100/Store-V2/A75D8EF4-8412-4A13-8775-A52C20F05842/live.0.indexArrays mds_store 42059 root 5r DIR 1,6 2074 8832643 /Volumes/FOO/.Spotlight-V100/Store-V2/A75D8EF4-8412-4A13-8775-A52C20F05842 mds_store 42059 root 11r DIR 1,6 2074 8832643 /Volumes/FOO/.Spotlight-V100/Store-V2/A75D8EF4-8412-4A13-8775-A52C20F05842 mds_store 42059 root 47u REG 1,6 28 8832650 /Volumes/FOO/.Spotlight-V100/Store-V2/A75D8EF4-8412-4A13-8775-A52C20F05842/indexState mds_store 42059 root 49u REG 1,6 118784 8832674 /Volumes/FOO/.Spotlight-V100/Store-V2/A75D8EF4-8412-4A13-8775-A52C20F05842/.store.db backupd 42148 root 4w REG 1,6 1300 8832803 /Volumes/FOO/Backups.backupdb/Claus/2015-10-25-175619.inProgress/.Backup.467484979.422497.log </pre> The fun part was that <i>I had explicitly configured Spotlight to ignore that particular external disk</i> - and yet, it was still trying to index it! Turns out that I am not alone with this. [[http://hints.macworld.com/article.php?story=20060814124808745]["Disable Spotlight on a FAT32 external drive"]] provides the best summary I could find. Apparently, the type of file system on the external drive plays a role. I was somewhat skeptical about this claim, but then, all my external drives had FAT32 file systems on them, and so I followed the instructions in the article. I was still somewhat incredulous, as this seemed to be such a basic issue and the article is rather old. But then, following the instructions indeed seemed to be successful, at least initially. The magic ingredient in the sauce was to create a top-level file called =.metadata_never_index= on the affected drive: <pre> touch /Volumes/FOO/.metadata_never_index </pre> I was too impatient to wait for existing instances of =mds_store= to finish their work, and did not care about the consistency of the Spotlight index on the external drive anyway. So I killed the =mds_store= process right away, then unplugged the drive and plugged it in again. From there, indeed I had no issues anymore with ejecting the external disk. Hmmm... Other related articles and discussions: * http://apple.stackexchange.com/questions/104842/the-volume-cant-be-ejected-because-its-currently-in-use * http://apple.stackexchange.com/questions/29580/how-do-i-make-spotlight-stop-indexing-my-backup-drive/211616#211616 * http://apple.stackexchange.com/questions/142459/how-to-eject-my-external-drive-when-my-mac-refuses-because-of-spotlight --- %STOPINCLUDE% %COMMENT{type="below" nonotify="on"}% ---
to top
End of topic
Skip to action links
|
Back to top
Edit
|
Attach image or document
|
Printable version
|
Raw text
|
Refresh
|
More topic actions
Revisions: | r1.2 |
>
|
r1.1
|
Total page history
|
Backlinks
You are here:
Blog
>
DefinePrivatePublic20151025MacEjectExternalDisk
r1.2 - 24 Feb 2016 - 16:39 -
ClausBrod
to top
Blog
This site
2017
:
12
-
11
-
10
2016
:
10
-
7
-
3
2015
:
11
-
10
-
9
-
4
-
1
2014
:
5
2013
:
9
-
8
-
7
-
6
-
5
2012
:
2
-
10
2011
:
1
-
8
-
9
-
10
-
12
2010
:
11
-
10
-
9
-
4
2009
:
11
-
9
-
8
-
7
-
6
-
5
-
4
-
3
2008
:
5
-
4
-
3
-
1
2007:
12
-
8
-
7
-
6
-
5
-
4
-
3
-
1
2006:
4
-
3
-
2
-
1
2005:
12
-
6
-
5
-
4
2004:
12
-
11
-
10
C++
CoCreate Modeling
COM & .NET
Java
Mac
Lisp
OpenSource
Scripting
Windows
Stuff
Changes
Index
Search
Maintenance
Impressum
Datenschutzerklärung
Home
Webs
Atari
Blog
Claus
CoCreateModeling
Klassentreffen
Main
Sandbox
Sommelier
TWiki
Xplm
Jump:
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback