Fix a 'Could not set indexing status for volume' Spotlight error

I have read several forums which discuss the "Could not set indexing status for volume" error message from mdutil, but none of the responses explain why this happens. There are several reasons for getting this error message from mdutil, the tool for changing Spotlight settings. Here are a few of the reasons, and the remedies... If Spotlight is already Disabled, attempting to do sudo mdutil -i off /Volumes/your_vol will result in this error message. There are at least two reasons for mdutil to believe that Spotlight is disabled. The first is that the volume was mounted and had a .metadata_never_index file at its base. The remedy is to remove that file in Terminal: sudo rm -f /Volumes/Your Volume/.metadata_never_index Then dismount and remount your_vol. If it is on your internal hard drive, do a restart instead. The second reason is that Spotlight actually is disabled! To find out, do the f...

published on Wednesday, the 6. January 2010, macosxhints

10.5: Disable Spotlight during Time Machine backups

I am using Time Machine with a Western Digital MyBook World, and had the hardest time getting it to make backups (even incremental ones of only a few megabytes) with reasonable speed. Apart from having to turn off any virus scanner, Spotlight tried to index the backup drive, which made it unbearably slow. I was not able to add the backup mount to the Privacy tab in the Spotlight System Preferences panel -- neither with the preferences pane, nor with any mdutil commands.So I had to turn it off whenever I was doing the backup with this command:launchctl unload /System/Library/LaunchDaemons/​com.apple.metadata.mds.plistAf​ter the backup had finished, I then reloaded the daemon. If you want to use Spotlight and scheduled backups, this is not really practical. So I found a blunt force method that works to me. First, a daemon runs a script every minute to...

published on Tuesday, the 28. October 2008, macosxhints

10.5: Spotlight and the Time Machine disk

After much experimentation with the various known techniques and applications for turning off Spotlight indexing on a volume, I have concluded that it is not possible to convince OS X (Leopard) to not index the volume being used for Time Machine. This is true even if Time Machine is set to Off, its volume is added to Spotlight's Privacy list, and the volume has a .metadata_never_index file at its root. The volume I was using is a partition on an external FireWire 800 drive dedicated to Time Machine. My guess is that Apple enforces indexing on the Time Machine volume to facilitate searching backups, as suggested in this knowledge base document. But there are many ways to search, I don't use Spotlight all that much, the volume is 400GB, and I really just don't want Spotlight chewing on it -- especially when there's...

published on Tuesday, the 29. July 2008, macosxhints