10.6: Fix a file copy issue with SMB, XBMC, and Xbox

Feb 16, '10 07:30:01AM

Contributed by: nathanh

Snow Leopard only hintSnow Leopard works pretty well for Windows File Sharing (aka SMB), but sometimes, clients can't copy files larger than 2GB. My setup is Mac OS X 10.6.2 (desktop) with a bunch of EyeTV recordings, and an Xbox modified to run XBMC. OS X shares the recordings using Windows Sharing (SMB). Large recordings will abruptly stop playing at the 2GB mark. Oddly, these same recordings can be copied entirely to Linux clients, so it's definitely the combination of XBMC and Xbox and OS X.

The problem is due to 64-bit locks on 32-bit filesystems. Take a look at /var/log/samba/log.smbd for messages like this:

posix_fcntl_getlock: WARNING: lock request at offset 49543704, length 65534 returned an Invalid argument error. This can happen when using 64 bit lock offsets on 32 bit NFS mounted file systems.

The easy fix is to edit /etc/smb.conf (or /private/etc/smb.conf; they're the same thing) and at the bottom change these lines:

; Site-specific parameters can be added below this comment.
; END required configuration.
Into these lines:
; Site-specific parameters can be added below this comment.
[MyShareName]
    strict locking = no
; END required configuration.
Now turn File Sharing off and back on in the Sharing System Preferences panel. If you don't know your MyShareName, take a look at /var/db/samba/smb.shares, because your entry must match what's listed there.

Comments (5)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20100212135148675