posix locking on OCFS2

Ralph Böhme rb at sernet.de
Fri Nov 21 03:47:54 MST 2014


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.
> >
> > http://linuxcostablanca.blogspot.com/2014/07/samba4-cluster-for-ad-drbd-ocfs2-ctdb.html?m=1
> >
> > 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.
> >
> > Regards,
> > 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, (
> https://oss.oracle.com/osswiki/OCFS2/NewFeaturesList.html)
> 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

  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. :)

-Ralph

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de,mailto:kontakt@sernet.de


More information about the samba-technical mailing list