create test file
Mount gluster volume and create a file
1 | [root@client-1 ~]# mount -t glusterfs gluster-node-1:/vol /mnt |
Get GFID of a file in Gluster volume
From brick directory
Login to gluster node and locate file in brick directory.
1 | [root@gluster-node-1 ~]# gluster volume info vol |
confirm the file path in the brick, GFID can be checked by “trusted.gfid”
1 | [root@gluster-node-1 ~]# ls /gluster/brick-vol/hoge/hello-gluster/file |
From client side
Mount gluster volume with -o aux-gfid-mount
option1
[root@gluster-node-1 ~]# mount -t glusterfs -o aux-gfid-mount gluster-node-1:/vol /mnt
confirm the file path in the mount point, GFID can be checked by glusterfs.gfid.string
1 | [root@gluster-node-1 ~]# getfattr -n glusterfs.gfid.string /mnt/hoge/hello-gluster/file |
Convert GFID to path name
By tool
Use https://gist.github.com/semiosis/4392640.
NOTE, GFID must be the format of XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
1 | bash gfid-resolver.sh -h |