posix locking on OCFS2

Rowland Penny repenny241155 at gmail.com
Sun Nov 23 11:23:55 MST 2014


On 23/11/14 17:34, Michael Adam wrote:
> On 2014-11-23 at 12:28 +0000, Rowland Penny wrote:
>> OK, getting confused now
>>
>> Amitay posted this link:
>>
>> https://oss.oracle.com/osswiki/OCFS2/NewFeaturesList.html
>>
>> Which has this:
>>
>> 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.
>>
>> It also has this:
>>
>> 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.
>>
>> What is the difference between fcntl() & fcntl(2), also lockf() & lockf(3)
>> ???? Which is required ???
> If you want ctdbd to do split brain prevention via a recovery lock
> on a cluster file system, the file system needs to support the
> byte range locking calls of fcntl (F_SETLK, F_UNLCK, ...). See
> the manual page of fcntl. For the differences of the other calls,
> you can also consult their man pages. Basically variants of doing
> locks.
>
> The number in parentheses is the manual page section.
> For instance, there is a command line tool called flock
> (section 1). And the C-function flock (section 2).
> This parenthesis notation is just a convenient way to
> identify one, i.e. flock(1) refers to the command line tool
> and flock(2) refers to the C-function. You can look at the
> corresponding man pages with "man 1 flock" and "man 2 flock".
> And so on.

I understand about the numbers in parentheses (brackets for lesser 
mortals like me) ;-) but what about when the brackets are empty?

>> According to Steve, CTDB does not work,
> Since those who should know confirmed that OCFS2
> has sufficient support for fcntl locks to support
> ctdb's recovery lock, I assume that steve has
> a misconfiguration of some kind. Just stating that
> it does not work is by the way not precise enough.

OK, I understand what you are saying, but I seem to remember Steve 
asking for help with this some time ago.

>
> Until we get
>
> - precise versions of software used (file system, ctdb, ...)
> - exact description of what fails
> - configuration (ctdb, file system, ...)
> - logs (ctdb, syslog/file system ...)
>
> we can't say what is going wrong.
>

Well, over to you Steve, can you provide the info that Michael is asking 
for ?

>> if this is so and I have no reason to believe he is lying
>> (I mean, why would he, what would he gain???),
>> the problem needs to be identified
> Right, and for that we need the above data (at least).

>> and documented until it is fixed.
> ... or hints how to amend steve's setup.

All I want to do is get the documentation on the wiki updated correctly, 
so that users can follow it and end up with the results they require.

Rowland
> Cheers - Michael



More information about the samba-technical mailing list