[Samba] Samba4 oplocks: LibreOffice and Word file locking

Jeremy Allison jra at samba.org
Thu May 3 11:16:28 MDT 2012


On Thu, May 03, 2012 at 11:08:49AM +0200, steve wrote:
> Hi
> Lan with S4 and built-in file server for Windows clients. nfs for
> Linux clients.
> 
> We are using LibreOffice to share documents and file locking works
> fine. The first guy to open the doc gets the lock and a message is
> displayed on other clients (windows or Linux) that the file is open.
> 
> Fine
> 
> Some users must however use Word 2010 to edit documents. Then file
> locking doesn't work: anyone can open it. Any combination of clients
> and any combination of LO or Word.
> 
> I'm told to turn off client oplocks:
> 
> HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MRXSmb\Parameters
> OplocksDisabled = 1
> 
> However, our win7 clients do not have \Parameters
> 
> At HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services I see the folders:
> 
> mrxsmb, mrxsmb10 and ,rxsmb20
> 
> opening any of them gives another folder called Enum with
> 
> Default  REG_SZ  (value not set)
> 0        REG_SZ  Root\LEGACY_MRXSMB\0000
> Count    REG_DWORD  0x00000001 (1)
> NextInstance REG_DWORD  0x00000001 (1)
> 
> Any ideas how to turn off oplocks? Or WHY.

Does this work (Word 2010 sees other opens) if you run the clients
against an S3 server ? I'm guessing it will. The current recommended
setup is to use S4 as an AD-DC, but S3 joined to the domain as a
fileserver.

The S3 fileserver code will replace the S4 fileserver before
official S4 release.

Jeremy.


More information about the samba mailing list