<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 08/21/2014 08:23 AM,
<a class="moz-txt-link-abbreviated" href="mailto:everybody_enjoy@163.com">everybody_enjoy@163.com</a> wrote:<br>
</div>
<blockquote cite="mid:201408211053042976622@163.com" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<style>body { line-height: 1.5; }body { font-size: 10.5pt; font-family: 微软雅黑; color: rgb(0, 0, 0); line-height: 1.5; }</style>
<div><span></span><br>
</div>
<div>
<div style="font-family: 微软雅黑, Tahoma;">hi all:</div>
<div style="font-family: 微软雅黑, Tahoma;"><br>
</div>
<div style="font-family: 微软雅黑, Tahoma;">I have a problem about
split-brain, <span style="background-color: rgba(255, 255,
255, 0.8); color: rgb(51, 51, 51); font-family: Tahoma,
Arial; font-size: 12px; line-height: 24px; text-align:
justify;">details as below:</span></div>
<div style="font-family: 微软雅黑, Tahoma;"><span
style="background-color: rgba(255, 255, 255, 0.8); color:
rgb(51, 51, 51); font-family: Tahoma, Arial; font-size:
12px; line-height: 24px; text-align: justify;"><br>
</span></div>
<div style="font-family: 微软雅黑, Tahoma;"><img
src="cid:part1.04010105.01060201@redhat.com"
style="max-width: 100%; height: auto !important;" border="0"></div>
<div style="font-family: 微软雅黑, Tahoma;">PC1 and PC2 is AFR,
stored a file 1.txt</div>
<div style="font-family: 微软雅黑, Tahoma;"><br>
</div>
<div style="font-family: 微软雅黑, Tahoma;">1. write "123" to 1.txt,
then 1.txt in pc1 is same with 1.txt in PC2, content is "123"</div>
<div style="font-family: 微软雅黑, Tahoma;"><br>
</div>
<div style="font-family: 微软雅黑, Tahoma;">2. PC1 network
disconnect, write "45" to 1.txt, then <span style="font-size:
10.5pt; line-height: 1.5; background-color: window;"> content
of </span><span style="font-size: 10.5pt; line-height: 1.5;
background-color: window;">1.txt in pc1 is "123", </span></div>
<div style="font-family: 微软雅黑, Tahoma;"><span style="font-size:
10.5pt; line-height: 1.5; background-color: window;"> </span></div>
<div style="font-family: 微软雅黑, Tahoma;"><span style="font-size:
10.5pt; line-height: 1.5; background-color: window;"> </span><span
style="font-size: 10.5pt; line-height: 1.5;
background-color: window;">content of </span><span
style="font-size: 10.5pt; line-height: 1.5;
background-color: window;">1.txt in pc2 is "12345"</span></div>
<div style="font-family: 微软雅黑, Tahoma;"><span style="font-size:
10.5pt; line-height: 1.5; background-color: window;"><br>
</span></div>
<div style="font-family: 微软雅黑, Tahoma;"><span style="font-size:
10.5pt; line-height: 1.5; background-color: window;">3. </span><span
style="font-size: 10.5pt; line-height: 1.5;
background-color: window;">PC2 network disconnect, but PC1
network is good, </span><span style="font-size: 10.5pt;
line-height: 1.5; background-color: window;">write "67" to
1.txt,</span><span style="font-size: 10.5pt; line-height:
1.5; background-color: window;"> then </span><span
style="font-size: 10.5pt; line-height: 1.5;
background-color: window;"> content of </span><span
style="font-size: 10.5pt; line-height: 1.5;
background-color: window;">1.txt in pc1 is "12367", </span></div>
<div style="font-family: 微软雅黑, Tahoma;"><span style="font-size:
10.5pt; line-height: 1.5; background-color: window;"> </span></div>
<div style="font-family: 微软雅黑, Tahoma;"><span style="font-size:
10.5pt; line-height: 1.5; background-color: window;"> </span><span
style="font-size: 10.5pt; line-height: 1.5;
background-color: window;">content of </span><span
style="font-size: 10.5pt; line-height: 1.5;
background-color: window;">1.txt in pc1 is "12345"</span></div>
<div style="font-family: 微软雅黑, Tahoma;"><br>
</div>
<div style="font-family: 微软雅黑, Tahoma;">4. so split brain occur</div>
<div style="font-family: 微软雅黑, Tahoma;"><br>
</div>
<div style="font-family: 微软雅黑, Tahoma;">is this a bug or design
this?</div>
<div style="font-family: 微软雅黑, Tahoma;"><br>
</div>
</div>
</blockquote>
<br>
The steps you have described is exactly how data split-brain occurs.<br>
<br>
<blockquote cite="mid:201408211053042976622@163.com" type="cite">
<div>
<div style="font-family: 微软雅黑, Tahoma;">how glusterfs avoid
this? Have some ways to solve? this is my questions. thank you</div>
</div>
<div><br>
</div>
</blockquote>
<br>
As of today, glusterfs gives EIO (input/output error) when you try
to access a split-brained file. You need to resolve the split-brain
[1] before the file becomes accessible again. If you want to *avoid*
split-brain, you need to enable quorum [2].<br>
<br>
[1]
<a class="moz-txt-link-freetext" href="https://github.com/gluster/glusterfs/blob/master/doc/split-brain.md">https://github.com/gluster/glusterfs/blob/master/doc/split-brain.md</a><br>
[2]
<a class="moz-txt-link-freetext" href="https://access.redhat.com/documentation/en-US/Red_Hat_Storage/2.1/html/Administration_Guide/ch10s10.html">https://access.redhat.com/documentation/en-US/Red_Hat_Storage/2.1/html/Administration_Guide/ch10s10.html</a><br>
<a class="moz-txt-link-freetext" href="https://access.redhat.com/documentation/en-US/Red_Hat_Storage/2.0/html/Administration_Guide/sect-User_Guide-Managing_Volumes-Quorum.html">https://access.redhat.com/documentation/en-US/Red_Hat_Storage/2.0/html/Administration_Guide/sect-User_Guide-Managing_Volumes-Quorum.html</a><br>
<br>
Hope this helps.<br>
<br>
<blockquote cite="mid:201408211053042976622@163.com" type="cite">
<div><br>
</div>
<hr style="WIDTH: 210px; HEIGHT: 1px" color="#b5c4df" align="left"
size="1">
<div><span>
<div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE:
10pt">
<div><a class="moz-txt-link-abbreviated" href="mailto:everybody_enjoy@163.com">everybody_enjoy@163.com</a></div>
</div>
</span></div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Gluster-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a>
<a class="moz-txt-link-freetext" href="http://supercolony.gluster.org/mailman/listinfo/gluster-devel">http://supercolony.gluster.org/mailman/listinfo/gluster-devel</a>
</pre>
</blockquote>
<br>
</body>
</html>