[Samba] A samba locking question

Jeremy Allison jra at samba.org
Wed Feb 4 17:38:42 GMT 2004

On Wed, Feb 04, 2004 at 11:14:31AM +0100, Patrik Gustavsson wrote:
> 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

This won't work unless you have some method of propagating
the open file table (found in locking.tdb) which tells clients
what the current open share modes are.

You need to solve this basic problem before you get to esoterica
like byte range locks across the cluster.


More information about the samba mailing list