Unable to search network drives with Lion...

After installing Lion, I have found I am unable to search network drives (Windows network) like I used with Snow Leopard. Any suggestions?

iMac, Mac OS X (10.7)

Posted on Jul 21, 2011 8:01 AM

Reply
504 replies

May 11, 2012 5:30 PM in response to Fugu Agency

I'm having similar problems, but with AFP shares from an older OS X Server. I have:-


1 OS X Server 10.4 tiger, with an AFP shared volume

2 OS X 10.7 lion Mac Pro clients

2 OS X 10.4 tiger G4 clients


The 10.4 clients can search the 10.4 server share just fine, the new 10.7 clients cannot at all.


I've tried deleting the .Spotlight-V100 folder, and using mdutil to disable and re-enable indexing on the shared volume. Interestingly, the lion clients will let me enable indexing (reports as enabled in the mdutil -s status), but won't let me publish the index to the volume (mdutil -p gets error: "datastore publishing not implemented"). When I try to search the volume, I get an error showing in the client's console "mds: ERROR: _MDSChannelInitForAFP: AFPSendSpotLightRPC failed".


Out of curiosity, I set up a shared volume on one of the lion machines. These could be indexed and searched no problem. When I did "mdutil -i on /Volumes/Testshare" then did a "mdutil -s" I found something interesting. Where the 10.4 share reported only "indexing enabled" the 10.7 share reported something like "indexing and searching enabled".


So firstly, it looks to me like Spotlight in 10.7 doesn't work on AFP shares from 10.4.


And secondly (though a more tentative hypothesis) from the nature of that "SpotLightRPC failed" error message, I suspect the way spotlight is set up in 10.7 is that it makes an RPC (remote procedure call) on the server's own spotlight service, relying on the server to maintain it's own index, but that 10.4's spotlight service is not compatible with this.


Any suggestions or comments welcome - could be I'm missing something simple! But if not, I'm going to have to go 3rd party. We can't spend all day manually searching through a terabyte of data!


cheers, Mike

May 12, 2012 11:58 PM in response to pepa_u

I tried the following procedure in terminal on a share from server where the spotlight did not work:


mdutil /Volumes/shareName -i on


To turn the index on. Then I run:


cd /Volumes

mdimport -Vp ./shareName


Spotlight now finds all files I ask for! Please, could you try this to confirm that it's the way to go? Maybe I had just pure luck or maybe it will not work always. I did not try yet what happes if a new file is added. Does it appear in the index automatically?


Btw, I run OS X 10.7.4

May 13, 2012 6:55 AM in response to pepa_u

I have 10.7.4 as well and can confirm this to work on my MBP.

It appears persistent, since it still worked after a reboot.

Just ***** that I have t do this for every "share".


Side note: on all my Mac's it appears that SMB's are much more responsive than AFP shares?

The AFP servers are found much faster, but they are also slower.

SMB servers appear in the finder at random - no idea why it is so much slower in finding these servers (Bonjour?).

But clicking through the SMB's is much faster.


Edit:


After mounting all network volumes try:


mdutil -i on -a


This will enable indexing on all mounted volumes.


Message was edited by: Hans Luijten Added mdutil -i on -a tip.

May 13, 2012 7:33 AM in response to pepa_u

pepa_u wrote:


I tried the following procedure in terminal on a share from server where the spotlight did not work:


mdutil /Volumes/shareName -i on


To turn the index on. Then I run:


cd /Volumes

mdimport -Vp ./shareName


Spotlight now finds all files I ask for! Please, could you try this to confirm that it's the way to go? Maybe I had just pure luck or maybe it will not work always. I did not try yet what happes if a new file is added. Does it appear in the index automatically?


Btw, I run OS X 10.7.4


Nice find! Sadly, pretty useless in practice unless your share remains static. While this command does indeed create a spotlight index and one could think, a quick crontab entry would fix all of our problems, it doesn't, because every run of the command scans the whole share all over again and puts an enormous load on both server and client while it does. Well, thanks anyway, at least people try.

May 13, 2012 7:41 AM in response to Mojo66

That's indeed the bad news. As I see it, the good news is that it can work! As I mentioned before, with the new NAS I bought it works even without this "excercise" in terminal. This I tried only with the old NAS I have. Therefore, now the question is: is there any open source/free plugin for Samba on linux that would create and update the index on the server? Apparently, Synology has something like that. I was looking on web, but I could not find anything (yet).

May 14, 2012 3:35 AM in response to pepa_u

Nice one pepa_u - this seems to have resolved my problem with AFP shares. The database even appears to survive a reboot/remount, and kept track of new additions, so let's hope it holds! I was a bit surprised that it wouldn't let me import when I was logged in as root - you seem to need to do it in the normal user account (I'm so used to doing everything as root in the terminal!). Presumably each local user manages their own metadata?

May 15, 2012 3:38 AM in response to pepa_u

Hello pepa_u


I have entered your commands but get stuck at the mdimport -Vp ./sharename


Here is what I do and the results.


mdimport -Vp /Volumes/ftp.dolby.co.uk


The terminal window just sits there after I press the return key, is this expected? There is no verbosity that sends me feedback indicating whether something is happening.


The same is true if I use mdimport -Vp /Volumes/dvs-san-nl1 (the name of one of our SMB SAN drive)



Could you please clarify as I am excited by some of the positive feedback by MikeAlx68 who seems to have gotten positive results with AFP servers.


I personally connect to SMB and FTP servers most of the day and the commands you propose would be a godsend (hopefully Apple will just fix this). Hope to hear back from you.


Cheers!

May 15, 2012 5:24 AM in response to pepa_u

Yes, it writes error messages (I got quite a lot of them!). You can check if mdimport is running by opening a new terminal window and typing ps (enter), then looking to see if mdimport is one of the processes running (or if you're sensible like pepa you can use Activity Monitor in the utilities folder). In my case it took well over an hour to index about 500 gigs of data across ethernet.

May 16, 2012 4:07 PM in response to Gregory_

Maybe Microsoft hasn't updated its mdimporter (plugin that allows content of office files to be searched by spotlight) to 64 bit. Just sudo rm -rf /Library/Spotlight/Microsoft Office.mdimporter and get rid of that Microsoft crap.


Btw, has anyone been able to confirm this:


MikeAlx68wrote:


Nice one pepa_u - this seems to have resolved my problem with AFP shares. The database even appears to survive a reboot/remount, and kept track of new additions


On all the machines where I tried this so far, none would update the index on its own (Lion Server, Lion/SL clients).

May 16, 2012 4:46 PM in response to Mojo66

The first thing I did was bung some new files and folders across, and it seemed to index them immediately. But these were all created on the client machine. What I've subsequently discovered is that some existing folders don't seem to be indexed (don't appear in search results) - but when I open them on the client machine they get added to the index. Incidentally, folders that haven't yet been indexed take a little while to list their contents, whereas indexed ones display almost instantaneously.


I also got some errors with Microsoft Office files, but am assuming that's because they're probably Windows files and Spotlight is expected Mac ones. Postscript files seem to be a source of errors too. Personally I'm not too bothered about file contents - most of the time we'll be searching for file or folder name patterns.


Gregory, the mdimport command analyses the files and folders on the specified volume and builds the local metadata database. This is a database that holds information about the names and contents of files and folders.

May 23, 2012 7:26 AM in response to Focker

Hi Focker


Thanks for the headsup. As mentioned very early in this thread, someone was nice enough to offer a tip on "EasyFind" — also to be found on the App Store. The cost is Free. So if all you need to do with 10.7 is augment search as it appears to be a bug by some claims made here, then it's a free option and very easy to use.


I should mention that ForkLift is a great app, for 0.79 Euro it is a steal! Note, Forklift is not the same as Forklift 2!


Thanks for the tip!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Unable to search network drives with Lion...

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.