The Samba-Bugzilla – Bug 10774
Windows 7, MS Office 2010 and Samba 4
Last modified: 2014-11-02 20:34:32 UTC
Created attachment 10208 [details]
Input-Output operations on shared testfolder
I am struggling with a rather old (well-known) issue using the latest samba 4 suite. The MS Office 2010 products refuse to save a new (or modified) file on the samba share and display a message of the form:
"There was an error accessing the file \sambashare\smbtest\testfile.pptx".
This particular issue persists only with MS Office 2010 files (docx, pptx, xlsx). Opening and reading the files works just fine, but when it comes to modifying or saving a new file, it doesn't work. Please note that ALL the other file types, including older MS Office products (eg. MS Office 2003) work just fine.
OS (server): CentOS release 6.2 (Final)
OS (client): Windows 7
Samba version: samba-4.1.11
Other similar case: https://lists.samba.org/archive/samba/2011-December/165327.html
I have read lots of "resolved" cases with such kind of error but they all use older samba versions (3.*). The solutions provided to these cases don't work for the new samba version as some of the parameters were deprecated. I was hoping that this issue would have been resolved in samba 4 but it actually did not.
I have attached the smb.conf file along with other log files that you may find useful.
Created attachment 10209 [details]
Samba main configuration file
Created attachment 10210 [details]
Samba log file during testing operation
In order to get sufficient data, I reproduced the issue while the log level of the samba service was set to 10. So the data in this log captures all the operations during the few seconds when the error was reproduced.
Created attachment 10211 [details]
Samba small log file during testing operation
In order to get sufficient data, I reproduced the issue while the log level of the samba service was set to 3. So the data in this log captures the basic operations during the few seconds when the error was reproduced.
You have a strange message NT_STATUS_NETWORK_BUSY, looks oplock related. What does "gpfs:leases = yes" do in your smb.conf ? Can you reproduce this against a regular ext4 backend filesystem ?
You'll need to set a special GPFS parameter to make Samba work properly on top of GPFS when gpfs:leases is turned on.
See http://sambaxp.org/fileadmin/user_upload/SambaXP2012-DATA/thu/track1/Christian_Ambach-Integrating-Samba-and-GFS.pdf, Slide 14
I do not recall the exact name of it, but mmlsconfig -all |grep cifs should enable you to find it.
Sorry, mmfsadm dump config |grep cifs should show you the parameter's name
Amazing! Thank you guys so much!
# mmfsadm dump config |grep -i cifs
cifsBypassShareLocksOnRename 1 <------- set to 1
I have had some other issues with software running on Windows that tries to write directly on the shared (GPFS) filesystem served by the samba servers.
I could not identify any issues within the Samba logs, so I would assume that it is something that has to do with GPFS. I am trying to pin down the issue but it is very difficult so at this point I am going through my configuration again.
From Samba perspective I had to restrict the Samba service to have maximum client protocol supported SMB2_02. I believe that this disables caching which was introduced in SMB2 from the Windows side.
Apart from that I would like to know if there is any other way to tackle these issue.
Christian, in the link you provided you say: "To improve performance, turn off the protocol interoperability features like posix locking and kernel oplocks in the Samba configuration"
I would like to know why would this improve performance since by disabling the locking mechanism, it may introduce file corruption issues?
Much appreciated. Thanks!
(In reply to Kyriacos Georgiou from comment #8)
The advise in my presentation is only valid for environments where the files are accessed only via Samba, not via other protocols like NFS at the same time.
Those options are to let the other protocols know that a Windows client has set a lock or has an oplock for a file. If there are no other protocols around, those options can be turned off.