<div dir="ltr">Hello!<br><br>I&#39;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  (about 10 MB, so nothing big)</div><div>3.) live migrate VM from host1 to host2</div><div>4.) issuing writes in VM </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. </div><div><br></div><div>According to:</div><div>gluster volume heal vol1 statistics<br></div><div>split-brain is there after step 6. </div><div><br></div><div>Now, I think waiting for replication isn&#39;t enough, i.e. when I reboot one node, even though there weren&#39;t many writes, these writes weren&#39;t fully replicated yet. At least that&#39;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&#39;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><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> </div><div><br></div></div>