Mac OSX 10.6 leaves open files on Windows Server

mac-osxserver-message-blockwindows-server-2003

We've got several Mac OS X 10.6 clients who connect to our Windows 2000 & 2003 File Servers – No Active Dir, just file shares.

I'm finding that the Mac clients keep lots of connections open on our server, even when they have no files open. My tests show that just browsing the folders using Finder keeps all of the folders open. Windows "Computer Management" shows these sessions with 15-20 open files, and these are causing us to reach our connection limit and locking down the server.

I've disabled the creation of DS_Store, thinking that was the problem, but it was not.
Also, tried disabling named streams – no luck.

I ran a test –
A Mac client browsed to a folder called "AFolder" with one file called "Program.doc", then navigated to another folder, and recorded the activity with ProcMon on the server (W2K):

http://www.thelifechurch.com/pete/10.6.jpg

From computer manager, you can see that the folder “D:\Shared\AFolder” is still open, and thus dozens of folders stay open when they browse around (even after closing finder):

http://www.thelifechurch.com/pete/cm.jpg

I tested the same thing with Mac OS X 10.5.7 and it did not have that problem. Here is the ProcMon results:

http://www.thelifechurch.com/pete/10.5.jpg

I'm not too familiar with these file operations, can anyone tell whats causing this?

The best I can tell by comparing the 10.5 and 10.6 logs, is that 10.6 does a
CreateFile D:\Shared\AFolder,
and then never closes it, even after I navigate out to a different folder. Whereas, 10.5 does close the folder.

Best Answer

It could be as simple as Spotlight (the MacOS Search mechanism) is indexing those files once the shares are mounted. I believe that there is a preference to turn off the indexing of network shares.

I don't have facilities to test right now, but you could try:

  • Try running mdutil -i off /path/to/volume to turn off indexing for the relevant volume. If that works you could set it up as a script to run at startup or login.

  • You could also try creating an empty file called ".metadata_never_index" and placing that at the root of the network mount point. It should prevent spotlight from indexing the folder and subfolders (at least under that mountpoint.)

Related Topic