Locking with GlusterFS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/09/13 06:57, Olivier Desport wrote:
> Le 09/09/2013 10:50, Xavier Hernandez a ?crit :
>> Al 09/09/13 09:59, En/na Olivier Desport ha escrit:
>>> Hello,
>>>
>>> I've created a distribued volume with two bricks. The shares are
>>> partitioned in XFS. Locking doesn't seem to be activated : when I
>>> write in the same file with two different clients, no error occurs.
>>>
>>> What option should I enable on the volume to enable locking ?
>>>
>> Locking is active always, however POSIX (the standard used by
>> GlusterFS) does not impose an exclusive access to files. Under POSIX,
>> it is the responsibility of the application to coordinate concurrent
>> accesses to files using explicit calls to fcntl() to coordinate them.
>> Even using this, another application can read/write the file if it
>> does no use an explicit call to fcntl().
>>
>> Since GlusterFS is POSIX-compliant, it is the expected behavior that
>> two clients could write to the same file at the same time. The
>> resulting file may have a mix of writes from both clients.
>>
>> Best regards,
>>
>> Xavi
>
>
> Thanks for your answer.

BTW, the POSIX locking as described is called "Advisory Locking."

The locking you were originally expecting is called "Mandatory Locking."

-- 
Mr. Flibble
King of the Potato People


[Index of Archives]     [Gluster Development]     [Linux Filesytems Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux