[Gluster-devel] Tool to find directory issues in Gluster Bricks

Aravinda avishwan at redhat.com
Thu Dec 15 09:23:30 UTC 2016


Hi,

Yesterday I created a small utility to scan the brick and find issues 
with directories created by Gluster. Tool can detect following issues

- No GFID: If a directory in brick backend doesn't have `trusted.gfid` xattr
- No Parent GFID: Parent directory doesn't have a `trusted.gfid` xattr
- No Symlink: Gluster maintains a symlink in `$BRICK/.glusterfs` 
directory for each directory, If Symlink file not present for a directory
- Wrong Symlink: If symlink exists but linked to different 
directory(Same GFID assigned to two directories)
- Invalid GFID: Invalid data in `trusted.gfid` xattr
- Invalid Parent GFID: Invalid data in `trusted.gfid` xattr of parent dir

Installation instructions are available in the repo
https://github.com/aravindavk/gluster-dir-health-check

Usage:
     gluster-dir-health-check <brick_path>

Example:

     gluster-dir-health-check /exports/bricks/brick1 > 
~/brick1_dir_status.txt

Grep for "NOT OK" for issues recorded in the above output file.

     grep "NOT OK" ~/brick1_dir_status.txt

More details about this tool is available 
here(https://github.com/aravindavk/gluster-dir-health-check)

This is a super-young project, please let me know if you face any issues 
while using this utility.

Feel free to open issue/feature request here
https://github.com/aravindavk/gluster-dir-health-check/issues

Note: This tool is created using Rust(https://rust-lang.org)

-- 
regards
Aravinda



More information about the Gluster-devel mailing list