CIFS + NFS'ing a single filesystem w/ locking

Jeremy Allison jra at samba.org
Thu Jan 12 03:14:33 GMT 2006


On Wed, Jan 11, 2006 at 06:24:12PM -0800, Adam D. Morley wrote:
> Hi,
> 
> I sent the below two emails to the general inquiries list, but I didn't
> get any replies.  I thought since I was discussing locking I might need
> to post here.  The messages follow, my first post discussing Samba'ing
> an NFS-exported UFS on Solaris, while my second email mentions an
> attempt to get Samba to honor/see locks made on a Linux host's console.
> 
> Summary: locking doesn't seem to work.  I may be doing something wrong.
> If so, what?  smb.conf is included for both hosts, in addition to
> references to the code in OpenOffice's source tree.
> 
> Thanks a bunch!
> 
> ----- Forwarded message from "Adam D. Morley" <adam-samba at gmi.com> -----
> I have a Solaris 10 server exporting UFS directories using built-in NFS.
> I've built Samba 3.0.20b from OpenPKG (www.openpkg.org).  I have a
> Solaris 10 (x86) client mounting the NFS share and opening OpenDocument
> files using StarOffice 8 (SO8, aka OO2.0).  I also have a Windows 2003
> Terminal Server mounting the Samba share and opening documents with SO8.
> This is a temporary development environment, so I can screw around with
> it.  I have a similar, production environment using RHEL3 (clients) and
> Solaris 9 (server), with no Samba.  Ie: I would like to export NFS
> shares as CIFS shares using Samba.  But: I want file locking.
> 
> StarOffice 8/OO2.0 support file locking, whereby the first user to open 
> a file will place a lock* on the file, and the other users will get a 
> read-only file.  This works fine with NFS & nlockmgr (cross platform, 
> linux/solaris).  However, when I add Samba to the mix, it doesn't seem 
> to see the locks.  I am under the impression this is because Solaris 
> does not support kernel oplocks.  Here is my smb.conf:

Yes, it's probably because Solaris doesn't support kernel oplocks so
other processes on the box won't ever see the Windows client locks
(they'll never be sent to the server if the client thinks it has an
oplock). For solaris you'll have to turn off oplocks if you want
this to work.

Jeremy.


More information about the samba-technical mailing list