[Gluster-users] Bitrot - Restoring bad file

Aravinda avishwan at redhat.com
Wed Apr 18 03:59:28 UTC 2018


On 04/17/2018 06:25 PM, Omar Kohl wrote:
> Hi,
>
> I have a question regarding bitrot detection.
>
> Following the RedHat manual (https://access.redhat.com/documentation/en-us/red_hat_gluster_storage/3.3/html/administration_guide/bitrot-restore_corrupt_file) I am trying out bad-file-restoration after bitrot.
>
> "gluster volume bitrot VOLNAME status" gets me the GFIDs that are corrupt and on which Host this happens.
>
> 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).
>
> 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?
>
> 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?
>
> 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.
>
> Any thoughts?

Another getfattr can give brick details where that file is residing

     getfattr -n glusterfs.pathinfo <path of file>

where path can be <mount>/.gfid/<gfid> or absolute path of file.

>
> Thanks!
> Omar
> _______________________________________________
> Gluster-users mailing list
> Gluster-users at gluster.org
> http://lists.gluster.org/mailman/listinfo/gluster-users


-- 
regards
Aravinda VK



More information about the Gluster-users mailing list