Re: Problems ejecting volumes / disks from GUI but not command

Tim Roberts <[email protected]> Sat, 16 Feb 2013 13:55:44 -0600
Newsgroups gmane.comp.macosx.admin
Message-ID <[email protected]>
>=20
> On 16/02/2013, at 4:08 AM, Tim Roberts <[email protected]> wrote:
>=20
>> Use the following to disable mds aka Spotlight. 'off' for disable =
'on' to enable.
>>=20
>> sudo mdutil -a -i off[on]
>>=20
>> If you still have problems ejecting then some other process is =
accessing that Volume.
>> BTW, If you have a Terminal open and cd to that volume, it will block =
eject.
>>=20
>> Best,
>>=20
>> Tim Roberts
On Feb 16, 2013, at 12:07 PM, Ashley Aitken <[email protected]> wrote:

>=20
> Interestingly, I turn mds off for all volumes before and after volume =
mounted and yet it doesn't log that it is turning off mds for the =
external volume.
>=20
> Cannot eject or force eject volume from Finder (GUI) and still mds =
processes with open files on the volume but ejects first time from =
command line (sudo hdiutil ...).
>=20
> It seems to be a Finder vs. command line thing but since I guess they =
use the same underlying API, it would seem to be a permissions things =
(command line runs as root).
>=20
> Very strange (at least to me). =20
>=20
> Cheers,
> Ashley.
>=20
> PS Tested the above twice, repeatedly turning off mds (without turning =
back on) for all volumes between volume being mounted etc.
>=20
> --
> Ashley Aitken
> Perth, Western Australia (GMT + 8hrs!)
> Social (Facebook, Twitter, Skype etc.): MrHatken=20
> Professional (LinkedIn, Twitter, Skype etc.): AshleyAitken
>=20
>=20


Boot into Safe Mode and see if the problem persists. Spotlight server =
does not start in Safe Mode.
Also, bypasses any Login Items etc=85

Beyond that:
You can delete the directory on that volume called ".Spotlight-V100" if =
it exists.
Then add a blank file called .metadata_never_index to the root directory =
of that Volume.

%touch .metadata_never_index=20

IME, you will still see the Volume being accessed by mds, but that =
shouldn't prevent it from ejecting.
I really suspect something else.

Any chance you also see processes owned by 'revisiond' when you lsof =
/Volumes/Name_Of_Volume?

Look for and delete or mv to someplace that is not the root directory of =
a volume, a directory called .DocumentRevisions-V100 if it exists.

Be aware that this deletes version information if you use Versions in =
TextEdit or Pages etc.

Repair Permissions. I wouldn't necessarily expect that to fix the =
problem, but you never know.
You might consider clearing cache files in /Library/Caches/ and =
~/Library/Caches/.
Or use a utility like Onyx or Applejack to do this for you.

Best,

Tim Roberts=