10.4: Create Spotlight indexes for networked volumes

May 04, '05 10:03:00AM

Contributed by: ldm

Tiger only hintI was quite disappointed when I read Friday evening that Spotlight would only index volumes physically attached to my machine (e.g., FireWire or internal). I have a Linux server in the basement with lots of data that I was hoping to index and mine with Spotlight. This evening, while digging around, I found a command line utility called mdutil. It has a switch, -i, to enable indexing on a volume. So I just went ahead as root (sudo bash) and ran:

 mdutil /Volumes/ldm -i on
Then I checked the status with
 mdutil /Volumes/ldm -s
And, behold ... I got back the following:
 /Volumes/ldm/:
   Status: Indexing Enabled
A second later, the Spotlight Icon started pulsating. Half an hour later, it stopped. I went to a Finder window, typed a query, and selected the network volume ldm. To my delight, matches were coming back instantaneously on files deep down in the file hierarchy on that volume. I have not checked whether newly added files are indexed on the fly, too, and I do not know where the .Spotlight-V100 file is stored (not in the root of the volume in question it seems).

I thought that others may give it a try to confirm whether this is working as expected. The volume I tested this with was an AFP volume served via NETATALK (v. 2.0.2) by my Linux server (a x86 debian box). Unfortunately, it appears to fail with SAMBA. I have not checked NFS. One caveat: you must rerun the mdutil command each time the volume is mounted.

Hope it helps someone!

Comments (31)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20050430233117572