Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.6: Fix a file copy issue with SMB, XBMC, and Xbox Other Hardware
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.
    •    
  • Currently 2.61 / 5
  You rated: 2 / 5 (28 votes cast)
 
[14,401 views]  

10.6: Fix a file copy issue with SMB, XBMC, and Xbox | 5 comments | Create New Account
Click here to return to the '10.6: Fix a file copy issue with SMB, XBMC, and Xbox' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.6: Fix a file copy issue with SMB, XBMC, and Xbox
Authored by: rjcchan1 on Feb 17, '10 07:46:31AM

I ran into this 2gig problem trying to copy files to my Linux install on my netbook but not to XP (it is dual boot). This hint worked.



[ Reply to This | # ]
10.6: Fix a file copy issue with SMB, XBMC, and Xbox
Authored by: loren_ryter on Feb 17, '10 11:19:15AM
I haven't tested the results yet but thanks, I was having this issue and related thread on the XBMC forums was too Linux specific.

to make this easier, to view your shares file in terminal, type:

sudo cat /var/db/samba/smb.shares

then to edit the config file in terminal using pico, type:

sudo pico /etc/smb.conf

When done, write-out with CTRL-O.

[ Reply to This | # ]
10.6: Fix a file copy issue with SMB, XBMC, and Xbox
Authored by: loren_ryter on Feb 17, '10 01:44:52PM

tested and good to go. sorry about the double post.



[ Reply to This | # ]
10.6: Fix a file copy issue with SMB, XBMC, and Xbox
Authored by: loren_ryter on Feb 17, '10 11:20:39AM
I haven't tested the results yet but thanks, I was having this issue and related thread on the XBMC forums was too Linux specific.

to make this easier, to view your shares file in terminal, type:

sudo cat /var/db/samba/smb.shares

then to edit the config file in terminal using pico, type:

sudo pico /etc/smb.conf

Then when finished, write out with CTRL-O.

[ Reply to This | # ]
10.6: Fix a file copy issue with SMB, XBMC, and Xbox
Authored by: qrulf on Feb 18, '10 05:29:10AM
From man smb.conf:
strict locking (S)
This is an enumerated type that controls the handling of file locking in the server. When this is set to yes, the server will check every read and write access for file locks, and deny access if locks exist. This can be slow on some systems.

When strict locking is set to Auto (the default), the server performs file lock checks only on non-oplocked files. As most Windows redirectors perform file locking checks locally on oplocked files this is a good trade off for inproved performance.

When strict locking is disabled, the server performs file lock checks only when the client explicitly asks for them.

Well-behaved clients always ask for lock checks when it is important. So in the vast majority of cases, strict locking = Auto or strict locking = no is acceptable.

Default: strict locking = Auto


[ Reply to This | # ]