How to spotlight-index an AFP share - best methods?

  • I inadvertently hijacked another thread as my issue was related to a side point that was mentioned - indexing an AFP share. See (post 37 to 64; AFP transfer sometimes very(!) slow) for several methods that have been tried to spotlight-index an AFP share hosted on OMV3.


    So far, the only method which works for me is to store my data in a sparse bundle which is formatted in HFS+, which I then mount within OSX. And then enabling indexing on the mounted sparsebundle with: mdutil /Volumes/<share> -i on


    Unfortunately, the mdutil command doesn't work natively on an AFP share (for me). It would be ideal to index the AFP share natively.

    NAS OMV 3.0.59 Rig: DFI Lanparty nForce4 SLI-DR | Opteron 165 Dual Core (no overclock) | 4GB Corsair Non-ECC DDR400 RAM | OMV3: 1x100GB IDE | Data: 2x 250GB WD 7200rpm, 2x 3TB WD Red, 1x 4TB Samsung 5400rpm

  • Just did the steps I gave you, and I am able to index my shares just fine. The indexing started right away and a progress bar now shows up in Spotlight. Did you try to use sudo before enabling it? The first line was enough to get mine rolling. Pasting the command here for future reference:



    Code
    mdutil -i on /Volumes/MyOMVshare/

    It just seems bizarre that is only indexing sparse volumes and not the share directly.

    Absolutely no support through PMs!!
    I work for the HPE R&D division. Have tech questions about ProLiant servers? Ask me!
    Learn more about HPE's iLO included in all ProLiant servers.

  • That is so strange. Do you think you'd be able to create a Test share? Are you running OMV3 and MacOs Sierra or configured the AFP plugin in any particular way e.g. extra options? I'm just trying to understand how I may essentially 'copy' what you have done in order to get it to work.


    Do you have any additional special ACL's setup? Thanks

    NAS OMV 3.0.59 Rig: DFI Lanparty nForce4 SLI-DR | Opteron 165 Dual Core (no overclock) | 4GB Corsair Non-ECC DDR400 RAM | OMV3: 1x100GB IDE | Data: 2x 250GB WD 7200rpm, 2x 3TB WD Red, 1x 4TB Samsung 5400rpm

  • I've been trying to figure this out (getting nowhere); however, I think that the root cause lies within permissions. As you pointed out, I can index the sparse bundle but not the share. Within OSX, the permissions for the share and sparsebundle respectively are slightly different. Any thoughts?


    Share permissions (as seen within OSX):


    Name Privilege

    (unknown) read and write
    everyone no access


    Sparsebundle permissions (as seen within OSX):


    Name Privilege

    (unknown) read and write
    staff read and write
    everyone read only


    Does this shed any light on the matter?


    Update: Don't know if this is relevant, but when I try to change the permissions of the shared folder within OSX (terminal as root), I receive a permission is denied message. I think this is to be expected, but in case it isn't, I thought I'd mention it.

    NAS OMV 3.0.59 Rig: DFI Lanparty nForce4 SLI-DR | Opteron 165 Dual Core (no overclock) | 4GB Corsair Non-ECC DDR400 RAM | OMV3: 1x100GB IDE | Data: 2x 250GB WD 7200rpm, 2x 3TB WD Red, 1x 4TB Samsung 5400rpm

    Edited once, last by RS1 ().

  • There's nothing other than default for all my shares. Make a new share as public and allow guest to write/read, make sure you can write to it and if you can, try indexing that.

    Absolutely no support through PMs!!
    I work for the HPE R&D division. Have tech questions about ProLiant servers? Ask me!
    Learn more about HPE's iLO included in all ProLiant servers.

  • Just gave it a try via AFP and SMB for good measure. Same result - 'indexing disabled'. I think that I'm going to have to accept defeat on this issue.


    Thank you for taking the time to investigate!

    NAS OMV 3.0.59 Rig: DFI Lanparty nForce4 SLI-DR | Opteron 165 Dual Core (no overclock) | 4GB Corsair Non-ECC DDR400 RAM | OMV3: 1x100GB IDE | Data: 2x 250GB WD 7200rpm, 2x 3TB WD Red, 1x 4TB Samsung 5400rpm

  • Quick update - I had decided to use a sparsebundle to get me over the line re. indexing - however, I experienced some mounting issues out of the blue. Ran first aid in OS X - and it reported that the sparsebundle is corrupt. This has diminished my confidence to say the least. Since then, I have decided to be careful with sparsebundles and make frequent backups - all because of indexing! The ideal solution would be to move away from spotlight altogether.


    I reached out to the original author that @Spy Alelo was kind enough to have posted:


    Quote from Spy Alelo

    OS X does not index network shares by default, but you can make it happen with the little guide I posted below.
    https://discussions.apple.com/thread/130462?tstart=0


    Gerrit returned with a very thoughtful and detailed response which essentially entails exploring 'Gnome Tracker' with an SMB implementation:


    Quote from subzero79

    Sorry to disappoint you but spotlight does not refer to spotlight OS X (took me a while to figure this out). Is a feature intended for gnome tracker (search engine for Linux desktop).


    @subzero79, did you play around with setting up Gnome Tracker at all?
    Is it beyond the scope of any typical OMV installation to get it working?
    From your experience, is it even worth the effort to implement it?


    I am debating in my mind whether implementing Gnome Tracker to work with one SMB share that stores my documents is too large a task or whether it is doable with the right guidance. Perhaps its implementation could be seen as an experiment of sorts?


    I have included Gerrit's response to my email below. Would be great to receive your thoughts (albeit general in nature) @subzero79, @Spy Alelo.


    Thanks!


    NAS OMV 3.0.59 Rig: DFI Lanparty nForce4 SLI-DR | Opteron 165 Dual Core (no overclock) | 4GB Corsair Non-ECC DDR400 RAM | OMV3: 1x100GB IDE | Data: 2x 250GB WD 7200rpm, 2x 3TB WD Red, 1x 4TB Samsung 5400rpm

  • netatalk for omv has not being compiled with spotlight support and you can check yourself by running netatalk -v


    You're using OSX and you want to use now a linux desktop just to search on spotlight network shares? seems a little bit too much doesn't it?


    You can still search from the finder search box is not instant but should work

  • I agree, I do think it is a little much. I was thinking more along the lines of Gnome Tracker/SMB share support. In any event, I managed to get the functionality I needed from sparsebundle/SMB/Spotlight. I found the topic interesting though :)

    NAS OMV 3.0.59 Rig: DFI Lanparty nForce4 SLI-DR | Opteron 165 Dual Core (no overclock) | 4GB Corsair Non-ECC DDR400 RAM | OMV3: 1x100GB IDE | Data: 2x 250GB WD 7200rpm, 2x 3TB WD Red, 1x 4TB Samsung 5400rpm

  • Quicksilver is certainly better than Easyfind which I found to be extremely slow. Thank you for the suggestion. I've also been experimenting with Devonthink - good article here for anyone else concerned with indexing: http://www.macdrifter.com/2015…ng-without-spotlight.html




    netatalk for omv has not being compiled with spotlight support and you can check yourself by running netatalk -v


    I ran this command and you're quite right, netatalk hasn't been compiled accordingly. Is there a reason that OMV has decided to discard Gnome Tracker? Or more to the point, discard Samba and Netatalk spotlight indexing support? Is it considered a significant effort?

    NAS OMV 3.0.59 Rig: DFI Lanparty nForce4 SLI-DR | Opteron 165 Dual Core (no overclock) | 4GB Corsair Non-ECC DDR400 RAM | OMV3: 1x100GB IDE | Data: 2x 250GB WD 7200rpm, 2x 3TB WD Red, 1x 4TB Samsung 5400rpm

  • This binary is provided by omv packages as Debian doesn't have netatalk anymore. The default option was no. I believe the developer grabbed a debianized src package a build it. The default options are sufficient imo,he probably doesn't even know the option exists.

  • Thanks for your thoughts on this. Perhaps Samba spotlight is the better way to go as Apple prefer SMB to AFP. I saw an interesting wiki here : https://wiki.samba.org/index.php/Spotlight


    This doesn't appear to be a priority for many people perhaps, but I think it'd be neat to have server side spotlight indexing. I've submitted a plugin/feature request to just put it out there.. :D

    NAS OMV 3.0.59 Rig: DFI Lanparty nForce4 SLI-DR | Opteron 165 Dual Core (no overclock) | 4GB Corsair Non-ECC DDR400 RAM | OMV3: 1x100GB IDE | Data: 2x 250GB WD 7200rpm, 2x 3TB WD Red, 1x 4TB Samsung 5400rpm

  • I've submitted a plugin/feature request to just put it out there..

    IMO, that won't happen as samba is provided as stable and maintained binary by Debian. Netatalk is a case apart as the package did not made into debian jessie. It took a lot of time to convince to use an out of debian package (the plugin was going probably to disappear).
    Also the name "spotlight" is misleading, as is clearly has nothing to do with OSX search feature, as it doesn't aid at all in the search function, as this is done at the client side in OSX.
    Again "spotlight" for netatalk and samba is to be used only in Gnome linux desktop

  • Again "spotlight" for netatalk and samba is to be used only in Gnome linux desktop


    Okay, understood. The link https://wiki.samba.org/index.php/Spotlight is extremely misleading as it states "compiling and configuring Samba with support for OS X Spotlight support. " Hence the confusion..

    NAS OMV 3.0.59 Rig: DFI Lanparty nForce4 SLI-DR | Opteron 165 Dual Core (no overclock) | 4GB Corsair Non-ECC DDR400 RAM | OMV3: 1x100GB IDE | Data: 2x 250GB WD 7200rpm, 2x 3TB WD Red, 1x 4TB Samsung 5400rpm

  • I am little bit confused about this now. Look at this
    https://www.davidschlachter.com/misc/netatalk3rpi


    This
    http://serverfault.com/questio…-spotlight-indexing-hangs


    Notice in the first page how the guy points out that spotlight works only from the finder, he doesn't mention the global one cmd + space

  • Thanks for the links! Quite interesting. I sent David Schlachter an email re. the global shortcut. But in theory, it should work. The second link is vague, but shows that server side indexing via afp seems to be okay?


    Any thoughts on the samba implementation? Does OMV3 feature the latest samba build (4.3+)?


    At present, since I couldn't get spotlight to work with OMV, I did away with AFP for everything other than Time Machine, solely relying on SMB.

    NAS OMV 3.0.59 Rig: DFI Lanparty nForce4 SLI-DR | Opteron 165 Dual Core (no overclock) | 4GB Corsair Non-ECC DDR400 RAM | OMV3: 1x100GB IDE | Data: 2x 250GB WD 7200rpm, 2x 3TB WD Red, 1x 4TB Samsung 5400rpm

  • Notice in the first page how the guy points out that spotlight works only from the finder, he doesn't mention the global one cmd + space


    The guy got back to me:



    Quote

    "What I'd observed is that Spotlight only gives results from the shared drive if you search with the search box in the top-right of a Finder window while you're browsing the shared drive. I haven't used the Spotlight support in netatalk for a while though (haven't figured it out on Ubuntu 16 on a new server)."


    I think that it would still be worth doing (even if it isn't possible to do a cmd+space search).


    I'd be interested in your thoughts on the samba + OSX spotlight implementation though as this may be more future proof / in the interest of others and OMV3 going forward..

    NAS OMV 3.0.59 Rig: DFI Lanparty nForce4 SLI-DR | Opteron 165 Dual Core (no overclock) | 4GB Corsair Non-ECC DDR400 RAM | OMV3: 1x100GB IDE | Data: 2x 250GB WD 7200rpm, 2x 3TB WD Red, 1x 4TB Samsung 5400rpm

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!