posix locking on OCFS2
amitay at gmail.com
Fri Nov 21 03:31:27 MST 2014
[Changed subject line]
On Fri, Nov 21, 2014 at 1:08 PM, Chan Min Wai <dcmwai at gmail.com> wrote:
> Dear Martin,
> Since we have touch the lock.
> I've some experience with it where I'd lock are define.
> I point the lock to the shared ocfs2 cluster.
> CTDB Will not start and kept on asking for lock.
> Which is something I'm not sure.
> I follow this guide.
> The different is that my ocfs2 are shared storage between the 2 node and
> thus no Drbd.
> Does the lock really work on this scenario?
> Thank you.
> Ps sorry to cut in as such.
> Min Wai, Chan
CTDB recovery lock requires posix file locking support on cluster file
system. Looking at the OCFS2 documentation, it seems that OCFS2 does not
support posix file (fcntl) locking yet.
Here is a snippet from OCFS2 wiki, (
Cluster aware flock(2)
*Required Kernel:* Linux 2.6.26
*Required Tools:* Any
The flock(2) system call is now cluster aware. File locks taken on one node
from userspace will interact with those taken on other nodes. All flock(2)
options are supported, including the kernels ability to cancel a lock
request when an appropriate kill signal is recieved by the user.
Unfortunately, POSIX file locks, also known as lockf(3) or fcntl(2) locks
are not yet supported in a cluster manner. We hope to have that ready in an
upcoming version of Ocfs2.
You can run still run CTDB by disabling CTDB_RECOVERY_LOCK. In this mode
CTDB will not be able to do detect split-brain situation where the cluster
is split into disjoint sub-clusters without any communication between
More information about the samba-technical