Thursday, November 21, 2024

network – How to get Spotlight working correctly on SMB mounted volumes?

We’ve been having this strange issue on an 18TB drive that is nearly full (1.4TB available). The larger of the two directories will apparently not stay indexed or available for search once indexed. I can search it and get limited results from the network while it is being indexed (after erasing the index and starting over) but once it has completed indexing I can no longer search that directory and get results. I even added it again using mdimport /Volumes/Plex/Movies. The indexing started and the same thing happens – once the indexing is done I don’t get search results from that directory over the network.

The naughty one is:
/Volumes/Plex/A-Movies

The nice one is:
/Volumes/Plex/B-Movies

I’ve read that Spotlight “doesn’t work over SMB” but if that was the case why would one directory work while the other doesn’t.

When checking the volume locally I see it’s indexed

john@MacMini ~ % mdutil -s -V /Volumes/Media_1 
/Volumes/Media_1:
    Indexing enabled. 

When checking the volume from the network I see this:

18:30:38.961 iMac191 ~ 
➜ mdutil -s -V /Volumes/Media_1  
/Volumes/Media_1:
    Server search enabled.

man mdutil says I can use the -p flag:

 -p  Spotlight caches indexes of some network devices locally.  This option requests that
     a local caches be flushed to the appropriate network device.

When I use that command it fails.

18:44:47.075 iMac191 ~ 
➜ sudo mdutil -p /Volumes/Media_1
Password:
/System/Volumes/Data/Volumes/Media_1:
    Error: datastore publishing not implemented.

I ran many internet searches and everyone seems to be just as clueless as I am. Maybe I am not asking the correct questions. Might it be related to the local or server side SMB configuration file.

Related Articles

Latest Articles