Spotlight refuses to be enabled on Lion: reboot helped
Posted by jpluimers on 2013/06/24
When Spotlight on my MacBook Air that runs OS X Lion didn’t show any results from the file system any more, I tried a lot of options, but only the final one worked: reboot:
MacBookAir:/ SuperUser$ sudo mdutil -i off
Password:
MacBookAir:/ SuperUser$ ls -al /
MacBookAir:/ SuperUser$ sudo rm -R /.Spotlight-V100
MacBookAir:/ SuperUser$ sudo mdutil -E /
/:
No index.
MacBookAir:/ SuperUser$ sudo mdutil -i on /
/:
Error: unable to perform operation. (-400)
No index.
MacBookAir:/ SuperUser$ sudo mdutil -i on -E /
/:
Error: unable to perform operation. (-400)
No index.
MacBookAir:/ SuperUser$ sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
com.apple.metadata.mds: Already loaded
MacBookAir:/ SuperUser$ sudo mdutil -as
/:
No index.
/.MobileBackups:
No index.
/Volumes/Firefox:
Indexing disabled.
/Volumes/MobileBackups:
Index is read-only.
/Volumes/MobileBackups/Backups.backupdb:
Index is read-only.
/Volumes/Opera:
Indexing disabled.
MacBookAir:/ SuperUser$ reboot
It was only later that I found out maybe a simpeler solution would have worked: kill all of the mdworker processes like this:
MacBookAir:/ SuperUser$ sudo killall -9 mdworker
–jeroen






Mac OS X – Spotlight not finding many files: force a rescan solved it « The Wiert Corner – irregular stream of stuff said
[…] Years ago I also had Spotlight issues; then it would find nothing (now it did find some files) which was solved by a reboot: Spotlight refuses to be enabled on Lion: reboot helped. […]