<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:\65B0\7D30\660E\9AD4;
        panose-1:2 2 5 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@\65B0\7D30\660E\9AD4";
        panose-1:2 2 5 0 0 0 0 0 0 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
 /* Page Definitions */
 @page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=ZH-TW link=blue vlink=purple style='text-justify-trim:punctuation'>

<div class=Section1>

<p class=MsoNormal><span lang=EN-US>Hi!<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>I am running gluster 3.4.2 (latest stable)
and have with bricks setup as a replicated volume.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>I am simulating a disaster by wiping out
all the files on one of the brick (storage-1b) while the other one (storage-1a)
holds the complete content<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>What I&#8217;ve done so far to simulate:<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US># Remove storage-1b brick<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>gluster volume remove-brick vol0 replica 1 storage-1b:/mnt/gluster-vol0<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US># On storage-1b, remove all files and reset
attributes<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>rm &#8211;rf /mnt/gluster-vol0/*<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>rm &#8211;rf /mnt/gluster-vol0/.glusterfs<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>setfattr -x trusted.gfid /mnt/gluster-vol0<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>setfattr -x trusted.glusterfs.volume-id /mnt/gluster-vol0<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US># Add the brick back<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>gluster volume add-brick vol0 replica 2 storage-1b:/mnt/gluster-vol0<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US># perform full rehal<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>gluster volume heal vol0 full<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Once the reheal has completed, I&#8217;ve noticed
some of the files have different sizes.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Some of them are short of few KBs, but I
notice there is one falls short of nearly 100MB.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Even I try to force a full re-heal of that
particular file by removing it and together with the hex file in .glusterfs,
the result after a re-heal is the same.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>rm &#8211;f /mnt/gluster-vol0/file<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>rm &#8211;f /mnt/gluster-vol0/.glusterfs/c7/81/c781e91a-4ffa-47a8-ba98-da111d77075b<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>gluster volume heal vol0 full<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>What could be the reason?&nbsp; Most of
these files are sparse files. Can that be a problem?&nbsp; Please advise.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Thanks,<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Adrian<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

</div>

</body>

</html>