Attn Apple Spotlight Users - good times to come

Status
Not open for further replies.

DataMover

Explorer
Joined
Feb 18, 2014
Messages
50
Reading the Release Notes for Samba 4.3 I happily stumbled over Spotlight support!

I hope Samba 4.3 and Gnome Tracker will be integrated in FreeNAS as soon as possibile.

Kind regards
Carsten
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Yeah.. someone else was asking about Samba updates. Unfortunately every time the devs have updated Samba lately, it broke something. So we're opting to not update Samba on 9.3 again until there is a security vulnerability that justifies updating.
 

everyman

Dabbler
Joined
Jun 24, 2016
Messages
14
For a small user base, enabling Spotlight indexing turns out to be relatively simple. Have the end-user open Automator and create a "Folder Action" attached to /Volumes. Drag "Run Shell Script" to the workflow and modify the model (bash) script:

for f in "$@"
do
mdutil -i on "$f"​
done​

This will enable Spotlight indexing on any new volume (including FreeNAS network volumes) that is attached. Save the Automator workflow, quit Automator, and you're done -- for that user.

In our environment we've only got about half a dozen users and workstations, so re-creating this for each one isn't much of a chore.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
@everyman

Can you confirm that this actually worked? If this works, does this enable server-side searching? Or is this client-side only?

I'm not a Mac user, so I have no way of proving/disproving this. Asking for someone else. :P
 

everyman

Dabbler
Joined
Jun 24, 2016
Messages
14
@everyman

Can you confirm that this actually worked? If this works, does this enable server-side searching? Or is this client-side only?

I'm not a Mac user, so I have no way of proving/disproving this. Asking for someone else. :p

Yes, this actually worked to pretty much instantly enable client-side searching. I asked one user to log in and run a couple of test searches for me; there was a quiet "Wow!" on the other end of the phone when his search results popped up immediately. I haven't heard a single complaint about this not working since July 1.

There are other ways of doing this, and I thought through a few of them before settling on this. Many virtues (besides being free): it's easy, it's fast, it works, and it's not going to break between macOS releases.

I'm not entirely sure what "server-side" would look like in this context, but this definitely works for us -- it was probably the single biggest pain-point when we switched from OS X Server to FreeNAS for file service.
 

everyman

Dabbler
Joined
Jun 24, 2016
Messages
14
Well, yes. The question was whether it enabled "server-side searching." This does nothing to enable server-side indexing, but I'm more interested in enabling the search than where the indexing occurs.
 

DataMover

Explorer
Joined
Feb 18, 2014
Messages
50
I'm glad that this works for you. For me, there is way toooo much data on my shares and I have several clients, which get fresh macOS installs from time to time - client side Spotlight indexing would be such a waste of time, resources and a little bit old school ;-))

I don't wanna put all this data on the line, while there is (ehm, should be) a better way.
 

everyman

Dabbler
Joined
Jun 24, 2016
Messages
14
Yup. There should be a better way. For what it's worth, the overhead appears to be minimal: We have tens of thousands of documents (Word, Excel, PDF, among others) going back fifteen years or more, for thousands of court cases, and the indexing doesn't adversely affect workstation performance. Searches (even right after login) are exactly what you'd expect Spotlight searches to be: fast and accurate.

As always, YMMV.... ;)
 

DataMover

Explorer
Joined
Feb 18, 2014
Messages
50
Yes, that's the way it should be. But still I am too stuck-up to go this route;)

And one more thing - last week I met a bunch of people who are hit even harder by their desktop search: Windows users:D
 

DataMover

Explorer
Joined
Feb 18, 2014
Messages
50
One more question about your environment:

- is your share AFP or SMB

If it is SMB
- what are your lower and upper SMB protocol versions
- is your FreeNAS a DC, domain member or neither (regarding Active Directory)
- what is your macOS / OS X version

Apple has done a lot to make their SMB implementation more compatible and up to date. And although I like Macs as desktop machines, at the heart and backend I am still a Windows guy :cool:, suffering the sweet FreeNas pain (at the moment it is more samba pain, for I would like to use a SMB share as a central storage point for my Hyper-V machines, which is not quite possible at the time being).
 

everyman

Dabbler
Joined
Jun 24, 2016
Messages
14
One more question about your environment:

- is your share AFP or SMB
AFP-only. Our workstations are all at 10.11.x (El Capitan); our macOS server is now at Sierra -- until last week, it was still on 10.9 (Mavericks). As a rule I don't upgrade the server OS until I'm at least three releases behind and in imminent danger of losing support (rarely necessary, but when it is it's usually weird enough to escalate to L3).

We have about a half-dozen AFP shares. We authenticate against the macOS Server's Open Directory, and it works a treat. Adding SMB authentication to OD is possible, but way too much work to be worthwhile in this environment. (Server 5 reportedly restores some of the nice AD integration that existed back in the Server 10.x days, but until someone wants to plug his Windows laptop into the network and access any of the shares, I'll probably ignore it.)

Except for home folders, we've ditched file service on macOS Server. (Still using it for authentication, mail, and calendar.) For operations we care about -- file reads and writes, not so much open/close/delete -- our FreeNAS server (a repurposed Mac Pro from 2005) slightly outperforms the 2012 Mac Mini server and attached Thunderbolt RAID that replaced it.
 

JohnFLi

Contributor
Joined
Sep 26, 2016
Messages
139
Whenever I try to get spotlight to work (AFP or SMB) and I do the mdutil -i on /Volumes/name it just tells me "index disabled" was there anything special you had to do?

Code:
Build FreeNAS-9.10.2-U1 (86c7ef5)
Platform Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz
Memory 65392MB
System Time Fri Jan 20 10:54:51 PST 2017
Uptime 10:54AM up 6 days, 18:52, 0 users
 

lopr

Explorer
Joined
Mar 19, 2015
Messages
71
Whenever I try to get spotlight to work (AFP or SMB) and I do the mdutil -i on /Volumes/name it just tells me "index disabled" was there anything special you had to do?

When upgrading to Sierra there is a good chance that indexing will be broken beyond repair. you can backup, wipe the disk, install a virgin sierra and import back the backup.
 

JohnFLi

Contributor
Joined
Sep 26, 2016
Messages
139
When upgrading to Sierra there is a good chance that indexing will be broken beyond repair. you can backup, wipe the disk, install a virgin sierra and import back the backup.


Personally, I would like to just wipe the apple stain out of my datacenter. But at least iScsi works fine and dandy...... I have 1 crapple machine with the iScsi, and share it would to the others from there.
 
Status
Not open for further replies.
Top