Need a guide for Spotlight/Finder/macOS support

I’ve a TrueNAS server ready to deploy in a small office, but they have 7/8 Macs that their design team are using that are not going to be too happy when they realise they can’t use Spotlight to search it.

I’ve been hunting for a step by step guide to make this possible, but so far I’ve just found almost anecdotal reports of how people got things working.

Does anyone have a solid guide? I’m holding off on deploying it until I can be pretty sure it’ll work for them, but that can only go on so long…

This seems to suggest it is working in Scale.

1 Like

Opening Spotlight, Typing my search parameters and then clicking Search in Finder

Searching in Finder works fine.

I veto DS_Store so some things might not be working for me personally, but I haven’t had any problems finding my files. Is there something you’d like for me to test?

Samba being built with Elasticsearch support is necessary but not sufficient. You also need an Elasticsearch instance with an index.

Finder reverts back to a brute-force, grind-through-the-directories search if Spotlight isn’t functional. This is pretty slow on large filesystems.

1 Like

So what’s my best option? This dataset is about 6TB, which I’m guessing isn’t going to search quickly at all.

Would a MetaData VDEV make any difference? Would it work retrospectively or only for new files?

Or, going by your first suggestion, any guides for making an Elasticsearch instance in Scale? I’m presuming this would be easier in Docker, but since I don’t have that handy - Install Debian VM, install Docker, create Elasticsearch container?

1 Like

I haven’t done it, I’ve only seen the various guides that you’ve probably also seen.

I’m following this thread and hoping somebody else rides in with a modern guide.

Maybe a bit, but also probably not much. Many running systems end up with the majority of metadata in cache anyway. You have to be very careful with special vdevs for reliability/availability. If you’re considering it, you might try an L2ARC set to secondarycache=metadata first - that’s safe and easy, and will tell you if faster metadata even matters.

Probably more importantly, the Mac Finder is just weirdly slow at opening and listing SMB directories, so the brute-force search is also weirdly slow. I do see some improvement in Sequoia, but it’s still very slow compared to Windows or other clients.

If search is a common part of your workflow I think it’s worth continuing to investigate Spotlight.

This is most likely something that would be better positioned as a Feature Request.

it’s been requested as a feature already, did you see the JIRA? [NAS-118522] - iXsystems TrueNAS Jira

Anyway after years we’re still at [NAS-118522] - iXsystems TrueNAS Jira

“but does not work - this is the whole issue. We believe that it is due to Samba on FreeBSD requirements for http.c file patch - which is part of FreeBSD Samba version but not TrueNAS one.”

I already set up elastic search with indexing on my TrueNAS-13.0-U6.2 Core and I can’t wait to try :slight_smile: