<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 08/07/2014 02:09 PM, Pranith Kumar
      Karampuri wrote:<br>
    </div>
    <blockquote cite="mid:53E33B41.5050707@redhat.com" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <br>
      <div class="moz-cite-prefix">On 08/07/2014 02:05 PM, Ravishankar N
        wrote:<br>
      </div>
      <blockquote cite="mid:53E33A56.9060801@redhat.com" type="cite">
        <meta http-equiv="content-type" content="text/html;
          charset=ISO-8859-1">
        <br>
        Manual resolution of split-brains [1] has been a tedious task
        involving understanding and modifying AFR's changelog extended
        attributes. To simplify and to an extent automate this task, we
        are proposing a new CLI command with which the user can&nbsp;
        specify&nbsp; what the source brick/file is, and automatically heal
        the files in the appropriate direction. <br>
        <br>
        Command: gluster volume resolve-split-brain &lt;VOLNAME&gt;
        {&lt;bigger_file&gt;&nbsp; |&nbsp; source-brick &lt;brick_name&gt;
        [&lt;file&gt;] } <br>
      </blockquote>
      enclosing &lt;&gt; means the user will have to provide the input.
      And &lt;file&gt; option should be there for both policies I guess.<br>
      So the command should probably be:<br>
      gluster volume resolve-split-brain &lt;VOLNAME&gt; {bigger-file&nbsp;
      |&nbsp; source-brick &lt;brick_name&gt;} [&lt;file&gt;] <br>
    </blockquote>
    <br>
    <br>
    Yes, that makes sense. So the combinations would be<br>
    a) gluster volume resolve-split-brain &lt;VOLNAME&gt; bigger-file&nbsp;
    [&lt;file&gt;] <br>
    b) gluster volume resolve-split-brain &lt;VOLNAME &gt; source-brick
    &lt;brick_name &gt; [&lt;file&gt;] <br>
    <br>
    <br>
    <blockquote cite="mid:53E33B41.5050707@redhat.com" type="cite">
      Pranith<br>
      <blockquote cite="mid:53E33A56.9060801@redhat.com" type="cite"> <br>
        Breaking up the command into its possible options, we have: <br>
        <br>
        a) gluster volume resolve-split-brain &lt;VOLNAME&gt;
        &lt;bigger_file&gt; <br>
        When this command is executed, AFR will consider the brick
        having the highest file size as the source and heal it to all
        other bricks (including all other sources and sinks) in that
        replica subvolume. If the file size is same in all the bricks,
        it does <b class="moz-txt-star"><span class="moz-txt-tag">*</span>not<span
            class="moz-txt-tag">*</span></b> heal the file. <br>
      </blockquote>
      <blockquote cite="mid:53E33A56.9060801@redhat.com" type="cite"> <br>
        b) gluster volume resolve-split-brain &lt;VOLNAME &gt;
        source-brick &lt;brick_name &gt; [&lt;file&gt;] <br>
        <br>
        When this command is executed, if &lt;file&gt; is specified, AFR
        heals the file from the source-brick &lt;brick_name&gt; to all
        other bricks of that replica subvolume. For resolving multiple
        files, the command must be run iteratively, once per file. <br>
        If &lt;file&gt; is not specified, AFR heals all the files that
        have an entry in .glusterfs/indices/xattrop <b
          class="moz-txt-star"><span class="moz-txt-tag">*</span>and<span
            class="moz-txt-tag">*</span></b> are in split-brain. As
        before, heals happen from source-brick &lt;brick_name&gt; to all
        other bricks. <br>
        <br>
        Future work could also include extending the command to add
        other policies like choosing the file having the latest mtime as
        the source, integration with trash xlator wherein the files
        deleted from the sink are moved to the trash dir etc.<br>
        <br>
        Please give feedback on the above. <br>
        <br>
        Regards,<br>
        Ravi<br>
        <br>
        [1] <a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://github.com/gluster/glusterfs/blob/master/doc/split-brain.mdVOLNAME">https://github.com/gluster/glusterfs/blob/master/doc/split-brain.md</a>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_______________________________________________
Gluster-devel mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://supercolony.gluster.org/mailman/listinfo/gluster-devel">http://supercolony.gluster.org/mailman/listinfo/gluster-devel</a>
</pre>
      </blockquote>
      <br>
    </blockquote>
    <br>
  </body>
</html>