You are not logged in.

#1 2020-04-30 15:42:01

spatz
Member
Registered: 2013-01-08
Posts: 2

Upgrading to samba-4.12.1 breaks client-side indexing on Mac

Upgrading samba on my server from 4.11.3-3 to 4.12.1-1 and restarting the smb service causes the mac to stop indexing the share.
It took me a while to debug this by I think it's because the mac thinks server side searching is enabled:

$ sudo mdutil -s /Volumes/media
/System/Volumes/Data/Volumes/media:
	Server search enabled.

When I downgrade to samba-4.11.3-3 and restart the daemon searching in Spotlight works again and local indexing is active:

$ sudo mdutil -s /Volumes/media
/System/Volumes/Data/Volumes/media:
	Indexing enabled.

I couldn't find any configuration change on the newer samba to fix this behavior and I don't want to setup server side searching right now.

Is this a bug in samba? Is there some configuration change I missed? Should I report this to samba or arch?

Any help is appreciated.

Offline

#2 2020-04-30 16:13:14

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,672

Re: Upgrading to samba-4.12.1 breaks client-side indexing on Mac

From the changelog for 4.12

Samba 4.12 changelog wrote:

New Spotlight backend for Elasticsearch
---------------------------------------

Support for the macOS specific Spotlight search protocol has been enhanced
significantly. Starting with 4.12 Samba supports using Elasticsearch as search
backend. Various new parameters have been added to configure this:

  spotlight backend = noindex | elasticsearch | tracker
  elasticsearch:address = ADDRESS
  elasticsearch:port = PORT
  elasticsearch:use tls = BOOLEAN
  elasticsearch:index = INDEXNAME
  elasticsearch:mappings = PATH
  elasticsearch:max results = NUMBER

Samba also ships a Spotlight client command "mdfind" which can be used to search
any SMB server that runs the Spotlight RPC service. See the manpage of mdfind
for details.

Note that when upgrading existing installations that are using the previous
default Spotlight backend Gnome Tracker must explicitly set "spotlight backend =
tracker" as the new default is "noindex".

https://www.samba.org/samba/history/samba-4.12.0.html

Offline

#3 2020-04-30 16:15:29

spatz
Member
Registered: 2013-01-08
Posts: 2

Re: Upgrading to samba-4.12.1 breaks client-side indexing on Mac

Yeah, I saw that but I didn’t enable it and it seems to be enabled anyway with no way I can find to disable, which is why I think it’s a bug.

Offline

#4 2020-04-30 18:40:10

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,672

Re: Upgrading to samba-4.12.1 breaks client-side indexing on Mac

You need to set the spotlight backend option to tracker to restore previous behavior, is what I'm reading out of that.

Offline

#5 2021-05-17 07:11:36

ankx7
Member
Registered: 2021-05-17
Posts: 1

Re: Upgrading to samba-4.12.1 breaks client-side indexing on Mac

Hi to all!
I've samba 4.12.3 and elasticsearch + fscrawler.
Indexing is ok, i've tested with this command

curl -H 'Content-Type: application/json' -X GET http://localhost:9200/myjob/_search?pretty

and i see all my file but from mac it dosn't do
mdfind don't match anything!
my smb.conf:

[global]
        workgroup = TESTSAMBA
        security = user
        netbios name  = REDHAT8
        passdb backend = tdbsam

        printing = cups
        printcap name = cups
        load printers = yes
        cups options = raw

        spotlight backend = elasticsearch
        elasticsearch:address = localhost
        elasticsearch:port = 9200

[testfolder]
        comment = folder di test
        path = /srv/samba/test
        valid users = testuser
        browseable = Yes
        read only = No
        spotlight = yes

any ideas?

thanks in advance

Last edited by ankx7 (2021-05-17 07:12:02)

Offline

Board footer

Powered by FluxBB