Locking with CTDB

Henning Henkel h.henkel at science-computing.de
Thu Nov 13 11:22:28 GMT 2008


Volker Lendecke schrieb
> For general samba-style locking this would be far, far too
> slow though. Thus the need for ctdb. Ctdb stores its
> databases in normal tdb files that require fcntl locking,
> but this time these files are not stored in the cluster file
> system. They are stored on local ext3 or so where fcntl
> locking is fast. It is the main task of ctdb to work around
> the slowness of the cluster file systems for small requests
> and locking, making use of the fast local file systems.
>   
Thanks for your answer. Trying to dig in a bit deeper, I set up the 
following test scenario:

I have a ctdb installation running samba on two nodes. The ctdb lock 
file and a test share A reside on a shared filesystem that supports 
consistent locking across nodes. When I cifsmount this share from 
several clients through different server nodes in the ctdb cluster and 
try to acquire Posix locks on a shared file, locking works as expected. 
When I set up a second share on a filesystem with (OCFS2-like) locking 
that is locally consistent only, and cifsmount this share to several 
clients via different samba servers in the ctdb cluster, I can acquire 
multiple locks for the same shared file simultaneously.

That's the thing that makes me a little curious, as I would expect, that 
samba/ctdb would handle the locking also in the second case. Still, the 
underlying filesystems locking semantics seem to make the difference, 
and a lock on the shared filesystem is acquired by samba in any case. Is 
this the way ctdb is supposed to work, or is there still a bug lurking 
in my test setup?

Henning

-- 
________________________________creating IT solutions
Henning Henkel                  science + computing ag
IT Service Tübingen 1           Hagellocher Weg 73
phone +49 7071 94 57 623        72070 Tuebingen, Germany
fax   +49 7071 94 57 211        www.science-computing.de

-- 
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Florian Geyer,
Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Prof. Dr. Hanns Ruder
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196 




More information about the samba-technical mailing list