[Samba] A samba locking question

Patrik Gustavsson Patrik.Gustavsson at Sun.COM
Wed Feb 4 10:14:31 GMT 2004


Let me be more specific of what I am trying to do.

I am the engineer at Sun that wrote the cluster agent for
Samba, a standard HA agent.
This works as a dream and is deployed on several clusters
around the world.

Now, I am doing study to see if the standard samba can be run
as a scalable service (Several smbd's on different nodes accessing
the same data).
I know the issue with oplocks, so they are disable duering this
tests.

The Sun Cluster has the feature GFS (Global File system) as
what True Cluster has.
And the GFS will propagate all fcntl(), lockf() calls to all the
nodes in the cluster.

This has been tested by issuing a fcntl() locks on file, both local and
remote, and having pc trying open that file and it's fail because it is
locked.

The issue I have with Samba locks is that, when a client open
file I can have put a fcntl() write lock on that file.

That shouldn't be possible if the file or part of that file
had been looked with a fcntl() call.

The output from smbstatus for that file:
6696   DENY_WRITE 0x2019f     RDWR       NONE
/global/mnt1/datadir/TEST.sxw   Wed Feb  4 10:50:44 2004

The samba version I am using is 3.0.1

/Patrik



On ons, 2004-02-04 at 10:45, Andrew Bartlett wrote:
> On Wed, 2004-02-04 at 20:29, Patrik Gustavsson wrote:
> > Hi,
> > 
> > If I get this wright is that Samba will not use
> > a direct call to fcnl() to lock the file.
> > 
> > IE:
> > If a PC open a file and do lock that file, will that
> > lock be propagated so other application on the server can see that
> > file is locked by calling fcntl().
> 
> Yes.
> 
> Samba will, to the best of it's ability, use fcntl() locks to indicate
> SMB locks to other applications (be they local unix apps, or NFS clients
> etc)
> 
> Andrew Bartlett
-- 
"In a world without fences who needs Gates"
Patrik Gustavsson, Senior Technical Consultant
patrik.gustavsson at sun.com     Telephone: +46 60 671540
http://glen.sweden            Mobile: +46 70 3551040
SUN MICROSYSTEMS              Fax: +46 60 671550
--------------------------------------------------------------




More information about the samba mailing list