Victory over Spotlight
May 20th, 2007 at 11:11 am (Productivity, Technology)
Mac OS 10.4 has a nifty built-in fast-search feature called Spotlight, which supports deep searches (into the contents of a file), not just filename searches. To do this, it maintains an index of all of the files on your hard drive. This is handy.
It is less handy if, like me, you periodically connect an external hard drive for the purposes of backing up your system. As soon as I connect the drive, the BounceBack software I use auto-starts a backup of my (100 GB) Mac hard drive. Spotlight wakes up and starts trying to add the contents of the (300 GB) backup drive to its index… which is stored on the Mac’s hard drive. The first time I noticed this, I also started getting unexplained “I/O permission” errors from BounceBack for a small subset of my backed-up files. I don’t know if that’s the cause, but either way, I definitely don’t want Spotlight to index the backup drive (the utility of doing this is almost nil).
Spotlight’s preferences do permit you to exempt certain files, folders, or drives from being indexed. See System Preferences->Spotlight->Privacy. However, frustratingly, it “forgets” about my exemption of the backup drive each time it is disconnected. This was driving me nuts! Finally, today, I found a solution, courtesy of a comment made nearly two years ago by Systems Boy (thank you Google!).
You can permanently disable Spotlight indexing via:
sudo mdutil -i off /Volumes/YourFireWireDrive
Another possibly useful hint came from an equally old comment by Neil Lee:
The other thing to remember is if you want to add something to Spotlight’s Privacy tab, Spotlight needs to have completely indexed it at least once before it can be added.
I have not tested the latter, since disabling it with mdutil as suggested above seems to have worked like a charm.