<div dir="ltr"><div><div><div><div><div>Hi Anuradha,<br><br></div>To enable the c-time (consistent time) feature. Please enable following two options.<br><br></div>gluster vol set &lt;volname&gt; utime on<br></div>gluster vol set &lt;volname&gt; ctime on<br><br></div>Thanks,<br></div>Kotresh HR<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 14, 2018 at 12:18 PM, Rafi Kavungal Chundattu Parambil <span dir="ltr">&lt;<a href="mailto:rkavunga@redhat.com" target="_blank">rkavunga@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Anuradha,<br>
<br>
We have an xlator to provide consistent time across replica set. You can enable this xlator to get the consistent mtime,atime, ctime. <br>
<br>
<br>
Regards<br>
Rafi KC<br>
<span class=""><br>
----- Original Message -----<br>
From: &quot;Anuradha Talur&quot; &lt;<a href="mailto:atalur@commvault.com">atalur@commvault.com</a>&gt;<br>
To: <a href="mailto:gluster-devel@gluster.org">gluster-devel@gluster.org</a><br>
Cc: <a href="mailto:amarts@redhat.com">amarts@redhat.com</a>, &quot;Ram Ankireddypalle&quot; &lt;<a href="mailto:areddy@commvault.com">areddy@commvault.com</a>&gt;, &quot;Sachin Pandit&quot; &lt;<a href="mailto:sachinpandit@commvault.com">sachinpandit@commvault.com</a>&gt;<br>
Sent: Thursday, September 13, 2018 7:19:26 AM<br>
Subject: [Gluster-devel] Cloudsync with AFR<br>
<br>
<br>
<br>
Hi, <br>
<br>
We recently started testing cloudsync xlator on a replica volume. <br>
And we have noticed a few issues. We would like some advice on how to proceed with them. <br>
<br>
<br>
<br>
1) As we know, when stubbing a file cloudsync uses mtime of files to decide whether a file should be truncated or not. <br>
<br>
If the mtime provided as part of the setfattr operation is lesser than the current mtime of the file on brick, stubbing isn&#39;t completed. <br>
<br>
</span>This works fine in a plain distribute volume. B ut i n case of a replica volume, the mtime could be different for the files on each of the replica brick. <br>
<span class=""><br>
<br>
During our testing we came across the following scenario for a replica 3 volume with 3 bricks: <br>
<br>
We performed `setfattr -n &quot;trusted.glusterfs.csou.<wbr>complete&quot; -v m1 file1` from our gluster mount to stub the files. <br>
It so happened that on brick1 this operation succeeded and truncated file1 as it should have. But on brick2 and brick3, mtime found on file1 <br>
was greater than m1, leading to failure there. <br>
<br>
>From AFR&#39;s perspective this operation failed as a whole because quorum could not be met. But on the brick where this setxattr succeeded, truncate was already performed. So now we have one of the replica bricks out of sync and AFR has no awareness of this. This file needs to be rolled back to its state before the <br>
<br>
<br>
setfattr. <br>
<br>
Ideally, it appears that we should add intelligence in AFR to handle this. How do you suggest we do that? <br>
<br>
<br>
The case is also applicable to EC volumes of course. <br>
<br>
2) Given that cloudsync depends on mtime to make the decision of truncating, how do we ensure that we don&#39;t end up in this situation again? <br>
<br>
Thanks, <br>
Anuradha <br>
***************************<wbr>Legal Disclaimer********************<wbr>******* <br>
&quot;This communication may contain confidential and privileged material for the <br>
sole use of the intended recipient. Any unauthorized review, use or distribution <br>
by others is strictly prohibited. If you have received the message by mistake, <br>
please advise the sender by reply email and delete the message. Thank you.&quot; <br>
******************************<wbr>******************************<wbr>********** <br>
<br>
</span>______________________________<wbr>_________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a><br>
<a href="https://lists.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">https://lists.gluster.org/<wbr>mailman/listinfo/gluster-devel</a><br>
______________________________<wbr>_________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a><br>
<a href="https://lists.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">https://lists.gluster.org/<wbr>mailman/listinfo/gluster-devel</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Thanks and Regards,<br></div>Kotresh H R<br></div></div>
</div>