<div dir="ltr"><div>Hi There,<br><br></div><div>I&#39;d like to test and understand the self heal feature of glusterfs. This is what I did with 3.3.1-ubuntu1~precise4 on Ubuntu 12.04.1 LTS.<br><br><pre>gluster volume create gtest replica 2 gluster3:/zfs-test gluster4:/zfs-test</pre>
where zfs-test is a zfs pool on partition /dev/sda6 in both nodes.<br><br></div><div>To simulate a random corruption on node gluster3<br><br><tt class="">dd if=/dev/urandom of=/dev/sda6 bs=1024 count=20480<br><br></tt></div>
<div><tt class="">Now zfs detected the corrupted files<br><br></tt><pre>  pool: zfs-test
<span class="" id="line-25"></span> state: ONLINE
<span class="" id="line-26"></span>status: One or more devices has experienced an error resulting in data
<span class="" id="line-27"></span>        corruption.  Applications may be affected.
<span class="" id="line-28"></span>action: Restore the file in question if possible.  Otherwise restore the
<span class="" id="line-29"></span>        entire pool from backup.
<span class="" id="line-30"></span>   see: <a href="http://zfsonlinux.org/msg/ZFS-8000-8A">http://zfsonlinux.org/msg/ZFS-8000-8A</a>
<span class="" id="line-31"></span> scan: none requested
<span class="" id="line-32"></span>config:
<span class="" id="line-33"></span>
<span class="" id="line-34"></span>        NAME        STATE     READ WRITE CKSUM
<span class="" id="line-35"></span>        zfs-test   ONLINE       0     0 2.29K
<span class="" id="line-36"></span>          sda6     ONLINE       0     0 4.59K
<span class="" id="line-37"></span>
<span class="" id="line-38"></span>errors: Permanent errors have been detected in the following files:
<span class="" id="line-39"></span>
<span class="" id="line-40"></span>        /zfs-test/&lt;xattrdir&gt;/trusted.gfid
<span class="" id="line-41"></span>        /zfs-test/.glusterfs/b0/1e/b01ec17c-14cc-4999-938b-b4a71e358b46
<span class="" id="line-42"></span>        /zfs-test/.glusterfs/b0/1e/b01ec17c-14cc-4999-938b-b4a71e358b46/&lt;xattrdir&gt;/trusted.gfid
<span class="" id="line-43"></span>        /zfs-test/.glusterfs/dd/8c/dd8c6797-18c3-4f3b-b1ca-86def2b578c5/&lt;xattrdir&gt;/trusted.gfid</pre><br></div><div>Now the gluster log file shows the self heal can&#39;t fix the corruption<br>
[2013-01-08 12:46:03.371214] W [afr-common.c:1196:afr_detect_self_heal_by_iatt] 2-gtest-replicate-0: /K.iso: gfid different on subvolume<br>[2013-01-08 12:46:03.373539] E [afr-self-heal-common.c:1419:afr_sh_common_lookup_cbk] 2-gtest-replicate-0: Missing Gfids for /K.iso<br>
[2013-01-08 12:46:03.385701] E [afr-self-heal-common.c:2160:afr_self_heal_completion_cbk] 2-gtest-replicate-0: background  gfid self-heal failed on /K.iso<br>[2013-01-08 12:46:03.385760] W [fuse-bridge.c:292:fuse_entry_cbk] 0-glusterfs-fuse: 11901: LOOKUP() /K.iso =&gt; -1 (No data available)<br>
<br>where K.iso is one of the sample files affected by the dd command. <br><br></div><div>So could anyone tell me what is the best way to repair the simulated corruption?<br></div><div><br></div><div>Thank you.<br><br></div>
<div>Liang<br></div></div>