Bug 10774 - Windows 7, MS Office 2010 and Samba 4
Windows 7, MS Office 2010 and Samba 4
Status: RESOLVED FIXED
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services
4.1.11
x64 Linux
: P5 major
: ---
Assigned To: Samba QA Contact
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-20 14:15 UTC by Kyriacos Georgiou
Modified: 2014-11-02 20:34 UTC (History)
1 user (show)

See Also:


Attachments
Input-Output operations on shared testfolder (7.19 KB, application/octet-stream)
2014-08-20 14:15 UTC, Kyriacos Georgiou
no flags Details
Samba main configuration file (1.65 KB, text/plain)
2014-08-20 14:16 UTC, Kyriacos Georgiou
no flags Details
Samba log file during testing operation (688.12 KB, text/plain)
2014-08-20 14:19 UTC, Kyriacos Georgiou
no flags Details
Samba small log file during testing operation (28.04 KB, application/octet-stream)
2014-08-20 14:20 UTC, Kyriacos Georgiou
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kyriacos Georgiou 2014-08-20 14:15:34 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.

Thanks
Comment 1 Kyriacos Georgiou 2014-08-20 14:16:30 UTC
Created attachment 10209 [details]
Samba main configuration file
Comment 2 Kyriacos Georgiou 2014-08-20 14:19:01 UTC
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.
Comment 3 Kyriacos Georgiou 2014-08-20 14:20:40 UTC
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.
Comment 4 Jeremy Allison 2014-08-29 23:52:13 UTC
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 ?
Comment 5 Christian Ambach 2014-08-31 20:31:41 UTC
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.
Comment 6 Christian Ambach 2014-08-31 20:34:28 UTC
Sorry, mmfsadm dump config |grep cifs should show you the parameter's name
Comment 7 Kyriacos Georgiou 2014-09-01 10:53:34 UTC
Amazing! Thank you guys so much! 

# mmfsadm dump config |grep -i cifs
cifsBypassShareLocksOnRename 1    <------- set to 1

Documentation: http://www-01.ibm.com/support/docview.wss?uid=ssg1S1004008

Greatly appreciated!!
Comment 8 Kyriacos Georgiou 2014-10-29 17:30:22 UTC
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!
Comment 9 Christian Ambach 2014-11-02 20:34:32 UTC
(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.