Enable Spotlight in Samba

Henning Kessler

Contributor
Joined
Feb 10, 2015
Messages
143
Hello,

it would be great if samba in TrueNAS could be compiled with Spotlight support. It seams that it is currently not enabled

Code:
root@freenas[11:58][~]: smbd -b |grep -i spot
root@freenas[11:58][~]: 


on a samba version with spotlight enabled you should get:

Code:
root@samba:~ # smbd -b | grep -i spot
   HAVE_SPOTLIGHT_BACKEND_ES
   HAVE_SPOTLIGHT_BACKEND_TRACKER
   WITH_SPOTLIGHT
root@samba:~ # 
 

Kris Moore

SVP of Engineering
Administrator
Moderator
iXsystems
Joined
Nov 12, 2015
Messages
1,448
Hi @Kris Moore,
that's great news. Unfortunately I am bound to a TrueNAS CORE installation because I use a lot of jails ;-). Is it on the roadmap for TrueNAS as well?
Regards
Henning

We're not 100% sure yet. Plan is to try it out on SCALE, see if there's any big 'gotchas' to work through, and then we'll evaluate if we want to backport it to CORE/Enterprise. To do it right does introduce a lot of new moving parts, so expect some bumps while we get it all nailed down.
 

Henning Kessler

Contributor
Joined
Feb 10, 2015
Messages
143
We're not 100% sure yet. Plan is to try it out on SCALE, see if there's any big 'gotchas' to work through, and then we'll evaluate if we want to backport it to CORE/Enterprise. To do it right does introduce a lot of new moving parts, so expect some bumps while we get it all nailed down.
Okay seeing forward to it and maybe a spinup a VM with SCALE ....
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,737
We're not 100% sure yet. Plan is to try it out on SCALE, see if there's any big 'gotchas' to work through, and then we'll evaluate if we want to backport it to CORE/Enterprise.
Why not just compile in the features for CORE's smbd and leave it to the community to come up with a jail that runs Elastic and does the indexing. @anodos at least once claimed it was available already.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,175
Why not just compile in the features for CORE's smbd and leave it to the community to come up with a jail that runs Elastic and does the indexing. @anodos at least once claimed it was available already.
Wouldn't you need to run Samba in the jail for that?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,737
As far as I know, not. Samba just needs to be able to reach Elastic over a TCP socket. The indexer is a separate process that could run in the jail with a mount of the Samba share.

See here:

Code:
[global]
spotlight backend = elasticsearch
elasticsearch:address = localhost
elasticsearch:port = 9200

[share]
spotlight = yes


So instead of localhost just use the jail's address.
 

Constantin

Vampire Pig
Joined
May 19, 2017
Messages
1,827
FWIW, I much prefer Foxtrot search over Spotlight for text searches due to the speed and flexibility of the Foxtrot engine, combined with being able to leave the indices on the volume where the data resides. Thus, everyone can take advantage of Foxtrot and the volume doesn't have to get indexed over and over. Sadly, the email program that was the genesis of Foxtrot search (PowerMail) is no more due to the lack of development.

For images, I'm still evaluating between Neofinder and the perpetual-license version of Light Room 5 (LR5). The latter can no longer be purchased and for you folk considering anything higher than Mojave, remember that while LR5 is a 64-bit application and can hence run in Catalina, etc. the updater is a 32-bit application, meaning that you have to update to 5.7.1 (the latest) before updating your system software above Mojave. Brilliant business plan at Adobe at work there.
 

Constantin

Vampire Pig
Joined
May 19, 2017
Messages
1,827
If you are referencing built-in spotlight support, IIRC it’s enabled as of TrueNAS core 13 and active on the latest scale build as well.
 

cap

Contributor
Joined
Mar 17, 2016
Messages
122
If you are referencing built-in spotlight support, IIRC it’s enabled as of TrueNAS core 13 and active on the latest scale build as well.
As far as I know, Spotlight support is enabled in SAMBA for TrueNAS Scale und Core 13. But it needs more, like Elasticsearch. Would be cool if someone already has this running. I hope in the future for a solution that goes without much tinkering. Since I'll probably be switching from Core to Scale, I'm even more interested in this for Scale.
 

volothamp

Explorer
Joined
Jul 28, 2019
Messages
72
As far as I know, Spotlight support is enabled in SAMBA for TrueNAS Scale und Core 13. But it needs more, like Elasticsearch. Would be cool if someone already has this running. I hope in the future for a solution that goes without much tinkering. Since I'll probably be switching from Core to Scale, I'm even more interested in this for Scale.
I have the whole indexing and searching part running in a Jail I'm just missing the SMB part, as it needed a recompile and I didn't have 80gb to do that and was just too lazy. Now that it's in 13 I'll wait for it.

See https://www.truenas.com/community/t...der-of-freenas-files.81532/page-3#post-664671

Anyway I'm pretty sure the search engine part could be packaged inside a plugin.
 
  • Like
Reactions: cap

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,543
I have the whole indexing and searching part running in a Jail I'm just missing the SMB part, as it needed a recompile and I didn't have 80gb to do that and was just too lazy. Now that it's in 13 I'll wait for it.

See https://www.truenas.com/community/t...der-of-freenas-files.81532/page-3#post-664671

Anyway I'm pretty sure the search engine part could be packaged inside a plugin.
Yes, the basic idea is that the FS crawler could be in a jail / app. Elasticsearch is not exactly a lightweight solution and decoupling updates for java and other requirements from the base OS (and "containerization") is imho a requirement. IIRC elasticsearch doesn't support connections over unix domain sockets and so using loopback will probably be required for host to jail communication.
 

phradr

Dabbler
Joined
Sep 27, 2022
Messages
49
To all who are waiting for the spotlight support:
We had long discussions and debuggings within another, way older thread that furthermore was started in the FreeNAS section.
BUT: We think, that the Samba version used by TrueNAS 13 (CORE) AND TrueNAS SCALE both use the same samba source (within actual TN versions at least) and that is what breaks the functionality as there are simply some lines of code that could be read as „not yet implemented“.

For more details please have a look at the FreeNAS thread (LINK) and/or the jira issue I raised (LINK).

Best regards,
phradr
 

phradr

Dabbler
Joined
Sep 27, 2022
Messages
49
To all who are waiting for the spotlight support:
We had long discussions and debuggings within another, way older thread that furthermore was started in the FreeNAS section.
BUT: We think, that the Samba version used by TrueNAS 13 (CORE) AND TrueNAS SCALE both use the same samba source (within actual TN versions at least) and that is what breaks the functionality as there are simply some lines of code that could be read as „not yet implemented“.

For more details please have a look at the FreeNAS thread (LINK) and/or the jira issue I raised (LINK).

Best regards,
phradr
„...and since iX counts votes on issues to determine whether to implement them, if you're interested in this, please log in to Jira and vote for this issue.“ (@danb35 )
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,455
...and since iX counts votes on issues to determine whether to implement them, if you're interested in this, please log in to Jira and vote for this issue.
Seems I saw someone else say that...
 

phradr

Dabbler
Joined
Sep 27, 2022
Messages
49
Last edited:
Top