Indexing SMB volumes with Spotlight, redux

Week before last, I posted about a problem I was having making Spotlight index SMB volumes. It turns out that Spotlight is indexing the volume just fine, as you can see by using the mdls command to check whether a given file has been indexed. Part of the problem was a misunderstanding on my part: the Spotlight database actually lives in /private/var/db/Spotlight-V100, although there’s a separate .Spotlight-V100 directory in each local volume. That directory wasn’t present on my SMB volumes, which confused me. It turns out that the real problem is that the Spotlight menu bar extension doesn’t search catalogs from network volumes, and neither does the mdfind utility! I might not have figured this out on my own, but this thread at Apple was very instructive.

To test, I created a text file at the root of my SMB directory with the string “Zarahemla” in it. Neither the menu bar nor mdfind would find that file, but the Finder’s Find utility did the trick once I told it explicitly to look at /Volumes/work. I can live with this limitation for the time being. A bonus limitation is that indexing is turned off when the volume’s unmounted, so I’ll have to remember to turn it on each time I remount the volume. C’mon, Apple, fix this in 10.4.2.

Comments Off on Indexing SMB volumes with Spotlight, redux

Filed under General Tech Stuff

Comments are closed.