<div dir="ltr"><br><div>Hi,</div><div><br></div><div>Patch [1] has been sent for review. The path also prints the brick to which the corrupted object (file) belongs to.</div><div><br></div><div>With the patch the output of the scrub status command looks like this.</div><div><br></div><div><div>"</div><div># gluster volume bitrot repl scrub status</div><div><br></div><div>Volume name : repl</div><div><br></div><div>State of scrub: Active (Idle)</div><div><br></div><div>Scrub impact: lazy</div><div><br></div><div>Scrub frequency: biweekly</div><div><br></div><div>Bitrot error log location: /var/log/glusterfs/bitd.log</div><div><br></div><div>Scrubber error log location: /var/log/glusterfs/scrub.log</div><div><br></div><div><br></div><div>=========================================================</div><div><br></div><div>Node: localhost</div><div><br></div><div>Number of Scrubbed files: 0</div><div><br></div><div>Number of Skipped files: 0</div><div><br></div><div>Last completed scrub time: Scrubber pending to complete.</div><div><br></div><div>Duration of last scrub (D:M:H:M:S): 0:0:0:0</div><div><br></div><div>Error count: 2</div><div><br></div><div>Corrupted object's [GFID]:</div><div><br></div><div>0f9818b8-b762-4e5b-b3c9-bdd53b5fb1cb ==> BRICK: /export1/repl</div><div><br></div><div>7ce298fb-290f-4c2b-abaf-1dd0fca9bbb1 ==> BRICK: /export2/repl</div><div><br></div><div>=========================================================</div></div><div>"</div><div><br></div><div>Still some effort is needed to find the file to which the gfid (shown in the corrupted objects field of scrub status command) belongs to. </div><div>But in situations where there are multiple bricks running on the same node for a particular volume, then checking in all the bricks is not</div><div>needed.</div><div><br></div><div>Please check whether it is something which makes things better compared to now.</div><div><br></div><div>[1] <a href="https://review.gluster.org/#/c/19901/1">https://review.gluster.org/#/c/19901/1</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 17, 2018 at 11:59 PM, Aravinda <span dir="ltr"><<a href="mailto:avishwan@redhat.com" target="_blank">avishwan@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 04/17/2018 06:25 PM, Omar Kohl wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I have a question regarding bitrot detection.<br>
<br>
Following the RedHat manual (<a href="https://access.redhat.com/documentation/en-us/red_hat_gluster_storage/3.3/html/administration_guide/bitrot-restore_corrupt_file" rel="noreferrer" target="_blank">https://access.redhat.com/doc<wbr>umentation/en-us/red_hat_glust<wbr>er_storage/3.3/html/administra<wbr>tion_guide/bitrot-restore_<wbr>corrupt_file</a>) I am trying out bad-file-restoration after bitrot.<br>
<br>
"gluster volume bitrot VOLNAME status" gets me the GFIDs that are corrupt and on which Host this happens.<br>
<br>
As far as I can tell the preferred way of finding out what file maps to that GFID is using "getfattr" (assuming all Gluster and mount options were set as described in the link).<br>
<br>
My problem is that "getfattr" does not tell me what Brick contains the corrupt file. It only gives me the path according to the FUSE mount. So how do I find out what brick the file is on?<br>
<br>
If we assume that every brick is on a distinct host then we have no problem because "bitrot status" gave us the hostname. So we can infer what brick is meant. But in general you can't assume there are not several bricks per host, right?<br>
<br>
With "find" (as described in the link above) it is possible to find the correct brick. But the command is possibly expensive and I get the feeling that "getfattr" is the recommended way.<br>
<br>
Any thoughts?<br>
</blockquote>
<br></span>
Another getfattr can give brick details where that file is residing<br>
<br>
getfattr -n glusterfs.pathinfo <path of file><br>
<br>
where path can be <mount>/.gfid/<gfid> or absolute path of file.<span class="im HOEnZb"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thanks!<br>
Omar<br>
______________________________<wbr>_________________<br>
Gluster-users mailing list<br>
<a href="mailto:Gluster-users@gluster.org" target="_blank">Gluster-users@gluster.org</a><br>
<a href="http://lists.gluster.org/mailman/listinfo/gluster-users" rel="noreferrer" target="_blank">http://lists.gluster.org/mailm<wbr>an/listinfo/gluster-users</a><br>
</blockquote>
<br>
<br></span><span class="HOEnZb"><font color="#888888">
-- <br>
regards<br>
Aravinda VK</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
______________________________<wbr>_________________<br>
Gluster-users mailing list<br>
<a href="mailto:Gluster-users@gluster.org" target="_blank">Gluster-users@gluster.org</a><br>
<a href="http://lists.gluster.org/mailman/listinfo/gluster-users" rel="noreferrer" target="_blank">http://lists.gluster.org/mailm<wbr>an/listinfo/gluster-users</a></div></div></blockquote></div><br></div>