[Gluster-users] Simulate split-brain on gluster 3.6

Ben Turner bturner at redhat.com
Mon Feb 16 20:00:47 UTC 2015

----- Original Message -----
> From: "Félix de Lelelis" <felix.delelisdd at gmail.com>
> To: gluster-users at gluster.org
> Sent: Monday, February 16, 2015 3:59:05 AM
> Subject: [Gluster-users] Simulate split-brain on gluster 3.6
> Hi,
> I am simulating a split brain condition on my cluster but I don't be able it.
> I have disconnected the nodes and creating a file with the same name and
> different contents but always the self-heal process take the last copy of
> the file.
> How can create thos condition?

1.  Kill both brick processes
2.  Edit the changelog on both files on the backend, make them different:

getfattr -d -e hex -m "trusted.afr." <my file>
You should see something like:


Next set them to values that clash:

setfattr -n "trusted.afrGLUSTER-SHARE-client-0" -v 0x000000000000000200000000
setfattr -n "trusted.afrGLUSTER-SHARE-client-1" -v 0x000000000000000300000000

setfattr -n "trusted.afrGLUSTER-SHARE-client-0" -v 0x000000000000000300000000
setfattr -n "trusted.afrGLUSTER-SHARE-client-1" -v 0x000000000000000200000000

3.  Restart both brick processes.

4.  Gluster v heal <my vol> info split-brain

I haven't done this for a while but IIRC those command will get you there.  The -v syntax may not be correct on the setfattr, but this should get you going.

> thanks
> _______________________________________________
> Gluster-users mailing list
> Gluster-users at gluster.org
> http://www.gluster.org/mailman/listinfo/gluster-users

More information about the Gluster-users mailing list