<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix"><tt>When you directly sync files using
        rsync, rsync creates a file in slave if not exists. Due to this,
        rsync creates a file in slave with different GFID than the one
        available in master. This is a problem for geo-rep to continue
        syncing to slave.</tt><tt><br>
      </tt><tt><br>
      </tt><tt>Before starting geo-replication as a prerequisite steps
        you can do the following to fix the GFID changes,</tt><tt><br>
      </tt><tt><br>
      </tt><tt>Run this in a master node,</tt><tt><br>
      </tt><tt>If you downloaded glusterfs source directory,</tt><tt><br>
      </tt><tt><br>
      </tt><tt>    </tt><tt>cd $GLUSTER_SRC/extras/geo-rep</tt><tt><br>
      </tt><tt><span class="author-g-1ye5yqhbr9ttow80">    sh
          generate-gfid-file.sh</span></tt><tt><span
          class="author-g-1ye5yqhbr9ttow80"> localhost:&lt;MASTER VOL
          NAME&gt; $PWD/get-gfid.sh</span></tt><tt><span
          class="author-g-1ye5yqhbr9ttow80"> 
          /tmp/master-gfid-values.txt</span></tt><tt><br>
      </tt><tt><br>
      </tt><tt>Copy the generated file to slave </tt><tt><br>
      </tt><tt>    scp </tt><tt><span class="author-g-1ye5yqhbr9ttow80">
          /tmp/master-gfid-values.txt root@slavehost:/tmp/<br>
          <br>
          Run this script in slave,<br>
        </span></tt><tt>    cd $GLUSTER_SRC/extras/geo-rep</tt><tt><br>
      </tt><tt><span class="author-g-1ye5yqhbr9ttow80">    sh
          slave-upgrade.sh localhost:&lt;SLAVE VOL NAME&gt;</span></tt><tt><span
          class="author-g-1ye5yqhbr9ttow80"> /tmp/master-gfid-values.txt
          $PWD/gsync-sync-gfid</span></tt><tt><br>
      </tt><tt><br>
      </tt><tt>Once all these steps complete, GFID in master volume </tt><tt>matches
        with GFID in slave.</tt><tt><br>
      </tt><tt><br>
      </tt><tt>Now update the stime xattr in each brick root in master
        volume. Enclosed a Python script to update stime of each brick
        root to current time, run it in each master node for each brick.</tt><tt><br>
      </tt><tt><br>
      </tt><tt>    sudo python set_stime.py &lt;MASTER VOLUME ID&gt;
        &lt;SLAVE VOLUME ID&gt; &lt;BRICK PATH&gt;</tt><tt><br>
      </tt><tt><br>
      </tt><tt>For example,</tt><tt><br>
      </tt><tt><br>
      </tt><tt>    sudo python set_stime.py
        f8c6276f-7ab5-4098-b41d-c82909940799
        563681d7-a8fd-4cea-bf97-eca74203a0fe /exports/brick1</tt><tt><br>
      </tt><tt><br>
      </tt><tt>You can get master volume ID and slave volume ID using
        gluster volume info command,</tt><tt><br>
      </tt><tt><br>
      </tt><tt>    gluster volume info &lt;MASTER VOL&gt; | grep -i
        "volume id"</tt><tt><br>
      </tt><tt>    gluster volume info &lt;SLAVE VOL&gt; | grep -i
        "volume id"</tt><tt><br>
      </tt><tt><br>
      </tt><tt>Once this is done, create the geo-rep session using force
        option,</tt><tt><br>
      </tt><tt><br>
      </tt><tt>    gluster volume geo-replication &lt;MASTERVOL&gt;
        &lt;SLAVEHOST&gt;::&lt;SLAVEVOL&gt;</tt><tt> create push-pem
        force</tt><tt><br>
      </tt><tt><br>
      </tt><tt>Start geo-replication,</tt><tt><br>
      </tt><tt><br>
      </tt><tt>    gluster volume geo-replication &lt;MASTERVOL&gt;
        &lt;SLAVEHOST&gt;::&lt;SLAVEVOL&gt; start force</tt><tt><br>
      </tt><tt><br>
      </tt><tt>Now onwards, geo-rep picks only new changes and syncs to
        slave.</tt><tt><br>
      </tt><tt><br>
      </tt><tt>Let me know if you face any issues.</tt><tt><br>
      </tt><tt><br>
      </tt><tt>--</tt><tt><br>
      </tt><tt>regards</tt><tt><br>
      </tt><tt>Aravinda</tt><tt><br>
      </tt><tt><a class="moz-txt-link-freetext" href="http://aravindavk.in">http://aravindavk.in</a></tt><tt><br>
      </tt><br>
      <br>
      On 12/14/2014 12:32 AM, Nathan Aldridge wrote:<br>
    </div>
    <blockquote
      cite="mid:9F48F272C892964DBBA84CB7C773B6AA11AB19FB@exbermd01.ds.mda.ca"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <meta name="Generator" content="Microsoft Word 14 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span lang="EN-CA">Hi,<o:p></o:p></span></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I have a large volume that I want to
          geo-replicate using Gluster (&gt; 1Tb). I have the data
          rsynced on both servers and up to date. Can I start a
          geo-replication session without having to send the whole
          contents over the wire to the slave, since it’s already there?
          I’m running Gluster 3.6.1.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I’ve read through all the various on-line
          documents I can find but nothing pops out that describes this
          scenario.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Thanks in advance,<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Nathan Aldridge<o:p></o:p></p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Gluster-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a>
<a class="moz-txt-link-freetext" href="http://supercolony.gluster.org/mailman/listinfo/gluster-users">http://supercolony.gluster.org/mailman/listinfo/gluster-users</a></pre>
    </blockquote>
    <br>
  </body>
</html>