[Gluster-users] Locking with GlusterFS

Xavier Hernandez
2013-09-09T08:50:03Z

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
>
>
>
>
> _______________________________________________
> Gluster-users mailing list
> Gluster-users at gluster.org
> http://supercolony.gluster.org/mailman/listinfo/gluster-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://supercolony.gluster.org/pipermail/gluster-users/attachments/20130909/fdb35fec/attachment.html>