Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I'm using a Mac Mini (Mid 2010) with Mountain Lion on (OS X 10.8 12A269 – not OS X Server) as a file server at my home network. The Mac is equipped with an external 2TB USB disk (Western Digital).

The root of the external disk, from here on called extrn, is shared using "File Sharing".

When reading/writing large files from a Windows 7 workstation the entire samba connection seems to freeze for about a minute. It seems like the connection just resets. Sometimes it takes less than a minute.

So my Question is, how do I troubleshoot this problem? What information is needed to solve this? Does anyone have any idea why this is happening?

In the Sharing menu in OS X, the folder is shared as "Read & Write" for my user, my user group and "Everyone". Under Options I've selected Share files and folders using SMB (Windows). And my user is also selected beneath that check box.

Looking at system.log there is a few related lines:

Aug 7 23:01:28 N-Ns-Mac-mini.local digest-service[11674]: label: default
Aug 7 23:01:28 N-Ns-Mac-mini.local digest-service[11674]:     dbname: od:/Local/Default
Aug 7 23:01:28 N-Ns-Mac-mini.local digest-service[11674]:     mkey_file: /var/db/krb5kdc/m-key
Aug 7 23:01:28 N-Ns-Mac-mini.local digest-service[11674]:     acl_file: /var/db/krb5kdc/kadmind.acl
Aug 7 23:01:28 N-Ns-Mac-mini.local digest-service[11674]: digest-request: uid=0
Aug 7 23:01:28 N-Ns-Mac-mini.local digest-service[11674]: digest-request: init request
Aug 7 23:01:28 N-Ns-Mac-mini.local digest-service[11674]: digest-request: init return domain: MACMINI-012345 server: N-NS-MAC-MINI
Aug 7 23:01:28 N-Ns-Mac-mini.local digest-service[11674]: digest-request: uid=0
Aug 7 23:01:28 N-Ns-Mac-mini.local digest-service[11674]: digest-request: init request
Aug 7 23:01:28 N-Ns-Mac-mini.local digest-service[11674]: digest-request: init return domain: MACMINI-012345 server: N-NS-MAC-MINI
Aug 7 23:01:28 N-Ns-Mac-mini.local digest-service[11674]: digest-request: uid=0
Aug 7 23:01:28 N-Ns-Mac-mini.local digest-service[11674]: digest-request: od failed with 2 proto=ntlmv1-with-v2-session
Aug 7 23:01:28 N-Ns-Mac-mini.local digest-service[11674]: digest-request: user=WIN7\username
Aug 7 23:01:28 N-Ns-Mac-mini.local digest-service[11674]: digest-request kdc: ok user=MACMINI-012345\username proto=ntlvm1 flags: NEG_KEYEX, ENC_128, NEG_VERSION, NEG_TARGET_INFO, NEG_NTLM2, NEG_ALWAYS_SIGN, NEG_NTLM, NEG_SIGN, NEG_TARGET, NEG_UNICODE
Aug 7 23:01:28 N-Ns-Mac-mini.local smbd[11591]: MACMINI-012345\username connected to path /Volumes/extrn

Then after about 2 minutes, the same chunck of logs appear again.

Sometimes there is an additional row afterwards:

Aug 7 23:05:10 N-Ns-Mac-mini.local smbd[11591]: MACMINI-012345\username connected to path /var/rpc/ncacn_np

username is the same:

  • MACMINI-012345\username at the server
  • WIN7\username at the client.

The strange thing is that sometimes (about 1 out of 30 times) everything works like a charm. Sometimes the problem is even worse. I can't say that I see any pattern in it.

Any ideas?

UPDATE:

File system is 'Mac OS Extended (Journaled)'. I've also tried to share a folder on the internal drive (320GB included with Mac Mini Mid 2010). The same problem appears there too.

When the system "freeze" I refer to the Windows 7 client. What ever client trying to write the file (e.g. an unzip) gets an error message telling me that the "Path can no longer be found". Or if I'm trying to copy a file the copy progress is aborted due to write error. If I then try to access the drive (or any other samba share at my Mac) nothing happens for a while before everything suddenly works again.

share|improve this question
    
@Qiau can you (for testing purposes) share a folder on the internal drive of the Mac Mini and read/write some large files on it? If this results in the same unwanted behavior we can rule out problems with the external drive (and vice versa). –  patrix Aug 14 '12 at 19:16
    
@GrahamPerrin the freeze is sensed at the Windows client. I can still access the drive at the server during freeze. –  Qiau Aug 14 '12 at 20:37
    
@patrix: Tried that out, same problem. Seems to me like it is a samba issue. –  Qiau Aug 14 '12 at 20:45
    
@GrahamPerrin: Mac OS Extended (Journaled). I've also updated the original question with answers to your comments. –  Qiau Aug 14 '12 at 20:45
    
The username is the same, MACMINI-012345 is the server. Hence MACMINI-012345\username at server and WIN7\username at the client. The folder is shared with write premissions for both "username" and Everyone. –  Qiau Aug 14 '12 at 21:06
add comment

2 Answers

I found in /Library/Preferences/SystemConfiguration/com.apple.smb.server.plist the NetBIOSName  "lion". Not the ServerName. (After I used  lion\userid instead of ServerName\userid I could logon, but it was not what I want).

With serveradmin I found the same:

sudo serveradmin settings smb

...
smb:NetBIOSName = "lion"
...

So I changed

sudo serveradmin setings smb:NetBIOSName = "ServerName"

Now it works like before the upgrade to lion.

I realize this is a solution to a problem in Lion, but you may want to start with it because the same thing could happen to Mountain Lion.

share|improve this answer
    
Thanks for the answer. There is however never a problem to log in and the line you specified is correct (i.e. MACMINI-012345). –  Qiau Aug 8 '12 at 10:00
add comment

 Considerations

For the partition, in its entirety, at the server you grant read and write privileges to everyone:

  • may be comparable to guest access, which does not require authentication.

Consider the following possibilities:

  • some communication, or attempted communication, by Windows 7 may be anonymous, without authentication (whether/how such communications would be logged by the server in a non-Server build of the OS, I don't know)
  • writes, or attempted writes, by Windows 7 are inappropriate for something at/around the root of the partition.

Suggestions

Increase the verbosity of logging for SMB

This may be easier to achieve with a Server build of the OS.

Diagnosis at the server when the client perceives a problem

Enable the stackshot daemon then use the key chord for sysdiagnose

Preparation: enable the daemon

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.stackshot.plist

When the problem occurs: use the key chord for sysdiagnose.

For at least ten seconds after the chord, touch nothing.

After Finder brings to front the result of sysdiagnose: decompress the archive, consider the files that comprise the diagnosis.

References

stackshot(1) OS X Manual Page

sysdiagnose(1) OS X Manual Page

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.