<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <br>
    <div class="moz-cite-prefix">On 01/08/2015 05:31 PM, Andreas Mather
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAPue7=Hyoay3_t9Adv-keyfcScy6=83bVYuA6dM3_OXShGJ6ZA@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hello!<br>
        <br>
        I'm setting up a qemu/KVM cluster with glusterfs as shared
        storage. While testing the cluster, I constantly hit a
        split-brain situation on VM image files which I cannot explain.
        <div><br>
        </div>
        <div>Setup:</div>
        <div>2 bare metal servers running glusterfs (replica 2), having
          the volume mounted and one virtual machine which is located on
          the volume.</div>
        <div><br>
        </div>
        <div>Steps:</div>
        <div>1.) host1 runs VM, host2 is idle (but fully connected, i.e.
          replicating)</div>
        <div>2.) issue writes in VM &nbsp;(about 10 MB, so nothing big)</div>
        <div>3.) live migrate VM from host1 to host2</div>
        <div>4.) issuing writes in VM&nbsp;</div>
        <div>5.) sleep 120</div>
        <div>6.) umount volume, shut down glusterfs reboot host1</div>
        <div>7.) start glusterfs, wait 30 sec, mount volume on host1</div>
        <div>8.) sleep 120</div>
        <div>9.) migrate VM from host2 to host1</div>
        <div><br>
        </div>
        <div>Sometimes this works, but usually after I redo the whole
          operation a second time or with changed roles (i.e. reboot
          host2 after the VM was migrated away) I end up with a
          split-brained image file.&nbsp;</div>
        <div><br>
        </div>
        <div>According to:</div>
        <div>gluster volume heal vol1 statistics<br>
        </div>
        <div>split-brain is there after step 6.&nbsp;</div>
        <div><br>
        </div>
        <div>Now, I think waiting for replication isn't enough, i.e.
          when I reboot one node, even though there weren't many writes,
          these writes weren't fully replicated yet. At least that's the
          simplest explanation to me.</div>
        <div><br>
        </div>
        <div>So what I want to ensure is that, after I migrated a VM
          from host1 to host2, all previous writes from host1 are fully
          replicated to host2 (which I would take as an indicator that
          it is safe to reboot host1). How can I accomplish this?</div>
        <div><br>
        </div>
        <div>My first guess was gluster volume heal vol1 info, but I'm
          not sure if I understand the output correctly (e.g. after
          resolving the split-brain by removing the image from one brick
          and seeing it replicated over the network, heal info still
          reports both nodes which makes no sense to me, since writes
          occur only from one node...)</div>
      </div>
    </blockquote>
    Andreas,<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I am sorry I took long to respond to your query. I do not
    see why a split-brain will happen after step-6. Most probably you
    may not have the logs because I am responding so late, but if you
    do, could you give me the logs of the setup?<br>
    <br>
    Pranith<br>
    <blockquote
cite="mid:CAPue7=Hyoay3_t9Adv-keyfcScy6=83bVYuA6dM3_OXShGJ6ZA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>Thanks,</div>
        <div><br>
        </div>
        <div>Andreas</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>&nbsp;</div>
        <div><br>
        </div>
      </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://www.gluster.org/mailman/listinfo/gluster-users">http://www.gluster.org/mailman/listinfo/gluster-users</a></pre>
    </blockquote>
    <br>
  </body>
</html>