FĂ©lix de Lelelis
2015-Feb-16 08:59 UTC
[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? thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.gluster.org/pipermail/gluster-users/attachments/20150216/77be083d/attachment.html>
----- 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: trusted.afr.GLUSTER-SHARE-client-0=0x000000000000000000000000 trusted.afr.GLUSTER-SHARE-client-1=0x000000000000000000000000 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. -b> thanks > > _______________________________________________ > Gluster-users mailing list > Gluster-users at gluster.org > http://www.gluster.org/mailman/listinfo/gluster-users