posix locking on OCFS2
steve at steve-ss.com
Fri Nov 21 04:05:59 MST 2014
On 21/11/14 11:47, Ralph Böhme wrote:
> On Fri, Nov 21, 2014 at 09:31:27PM +1100, Amitay Isaacs wrote:
>> [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.
> possibly a documentation bug? Few lines below it states:
> Cluster aware POSIX file locks (fcntl(), lockf())
> * Required Kernel: Linux 2.6.28
> * Required Tools: Any - userspace cluster stack required
Is CTDB a, 'userspace cluster stack'?
> POSIX locks are now cluster aware. Locks taken on one node will
> interact with those taken on another node. Due to the group
> communication required to make these locks coherent, a userspace
> cluster is required.
> This resembles my memory from back then when I was testing a Netatalk
> cluster with ocfs2. :)
Ah, so it does work. But it doesn't. Or at least it's supposed to. Does
it? It doesn't work for us and Chan at least.
More information about the samba-technical