Hi, I am trying to figure out about locking under ocfs2. I read in the 1.4 ocfs2 pdf doc file that ocfs2 1.4 support flock but not fcntl locks, and in a message, I read that ocfs2 rely on vfs for fcntl, and I read something about being able to get fcntl locks but not with o2cb. What is the current status of the issue? Would programs that rely on fcntl be able to run on a single node? If someone knows about this, and can explain a bit, I would like to know what is the current status of file locking under ocfs2, and if it can be made to work. Sorry for my English ;)
jhonyl wrote:> I am trying to figure out about locking under ocfs2. > > I read in the 1.4 ocfs2 pdf doc file that ocfs2 1.4 support flock but > not fcntl locks, and in a message, I read that ocfs2 rely on vfs for > fcntl, and I read something about being able to get fcntl locks but not > with o2cb. > > What is the current status of the issue? > > Would programs that rely on fcntl be able to run on a single node? > > If someone knows about this, and can explain a bit, I would like to > know what is the current status of file locking under ocfs2, and if it > can be made to work.Support for fcntl locking aka file-range locking aka posix locking is provided by vfs for all file systems. However, that support is appropriate only for local file systems. In ocfs2, we have added support for cluster-aware fcntl locking via the userspace clustering framework that allows one to use ocfs2 with different cluster-stacks. Like pacemaker (novell) and cman (red hat). If you want to use this today, your only option is to use sles11 that is shipping ocfs2+pacemaker. With (rh)el6, expected next year, the same will be supported with cman too. BTW, local fcntl locking support is available as is today.
Thanks for your reply. If I will add pacemaker or cman package to my current OS, since cluster fcntl is probably a new feature, is there a minimum version number for fcntl to be supported? -----Original Message----- From: Sunil Mushran <sunil.mushran at oracle.com> To: jhonyl <jhonyl at netscape.net> Cc: ocfs2-users at oss.oracle.com Sent: Mon, 1 Jun 2009 8:35 pm Subject: Re: [Ocfs2-users] ocfs2 and file locking? jhonyl wrote:> I am trying to figure out about locking under ocfs2. > > I read in the 1.4 ocfs2 pdf doc file that ocfs2 1.4 support flock but > not fcntl locks, and in a message, I read that ocfs2 rely on vfs for > fcntl, and I read something about being able to get fcntl locks butnot> with o2cb. > > What is the current status of the issue? > > Would programs that rely on fcntl be able to run on a single node? > > If someone knows about this, and can explain a bit, I would like to > know what is the current status of file locking under ocfs2, and ifit> can be made to work.Support for fcntl locking aka file-range locking aka posix locking is provided by vfs for all file systems. However, that support is appropriate only for local file systems. In ocfs2, we have added support for cluster-aware fcntl locking via the userspace clustering framework that allows one to use ocfs2 with different cluster-stacks. Like pacemaker (novell) and cman (red hat). If you want to use this today, your only option is to use sles11 that is shipping ocfs2+pacemaker. With (rh)el6, expected next year, the same will be supported with cman too. BTW, local fcntl locking support is available as is today.
jhonyl wrote:> If I will add pacemaker or cman package to my current OS, since > cluster fcntl is probably a new feature, is there a minimum version > number for fcntl to be supported?The support for clustered fcntl in ocfs2 was added in 2.6.27.
Thanks for your reply. Good to know... time to upgrade the kernel. Is there a minimum required pacemaker or cman version too? With pacemaker does it need heartbeat or openais for this? or either? And if it maters what is the minimum version required for openais or heartbeat? -----Original Message----- From: Sunil Mushran <sunil.mushran at oracle.com> To: jhonyl <jhonyl at netscape.net> Cc: ocfs2-users at oss.oracle.com Sent: Mon, 1 Jun 2009 9:03 pm Subject: Re: [Ocfs2-users] ocfs2 and file locking? jhonyl wrote:> If I will add pacemaker or cman package to my current OS, since > cluster fcntl is probably a new feature, is there a minimum version > number for fcntl to be supported?The support for clustered fcntl in ocfs2 was added in 2.6.27.
jhonyl wrote:> Thanks for your reply. > > Good to know... time to upgrade the kernel. > > Is there a minimum required pacemaker or cman version too? > With pacemaker does it need heartbeat or openais for this? or either? > And if it maters what is the minimum version required for openais or > heartbeat?Check sles11 docs.