Ravishankar N
2018-Nov-15 12:41 UTC
[Gluster-users] Self-healing not healing 27k files on GlusterFS 4.1.5 3 nodes replica
On 11/15/2018 02:11 PM, mabi wrote:> > Sure, you will find below the getfattr output of all 3 directories from all 3 nodes. >Thanks, noted. One more query. Are there files inside each of these directories? Or is it just empty directories?> >> 2. Do you know the file (or directory) names corresponding to the other >> 2 gfids? in heal info output, i.e >> gfid:aae4098a-1a71-4155-9cc9-e564b89957cf >> gfid:3c92459b-8fa1-4669-9a3d-b38b8d41c360 >> Please share the getfattr output of them as well. > Unfortunately no. I tried the trick of mounting the volume with the mount option "aux-gfid-mount" in order to find the filename corresponding to the GFID and then using the following getfattr command: > > getfattr -n trusted.glusterfs.pathinfo -e text /mnt/g/.gfid/aae4098a-1a71-4155-9cc9-e564b89957cf > > this gave me the following output: > > trusted.glusterfs.pathinfo="(<DISTRIBUTE:myvol-pro-dht> (<REPLICATE:myvol-pro-replicate-0> <POSIX(/srv/glusterfs/myvol-pro/brick):node3:/srv/glusterfs/myvol-pro/brick/.glusterfs/aa/e4/aae4098a-1a71-4155-9cc9-e564b89957cf> <POSIX(/data/myvol-pro/brick):node1:/data/myvol-pro/brick/.glusterfs/aa/e4/aae4098a-1a71-4155-9cc9-e564b89957cf>))" > > then if I check the ".../brick/.glusterfs/aa/e4/aae4098a-1a71-4155-9cc9-e564b89957cf" on node 1 or node 3 it does not have any symlink to a file. Or am I looking at the wrong place maybe or there is another trick in order to find the GFID->filename?symlinks are only for dirs. For files, they would be hard links to the actual files. So if stat ../brick/.glusterfs/aa/e4/aae4098a-1a71-4155-9cc9-e564b89957cf gives you a file, then you can use find -samefile to get the other hardlinks like so: #cd /brick/.glusterfs/aa/e4/aae4098a-1a71-4155-9cc9-e564b89957cf #find /brick -samefile aae4098a-1a71-4155-9cc9-e564b89957cf If it is a hardlink, then you can do a getfattr on /brick/.glusterfs/aa/e4/aae4098a-1a71-4155-9cc9-e564b89957cf itself. -Ravi> Regards, > Mabi
mabi
2018-Nov-15 15:47 UTC
[Gluster-users] Self-healing not healing 27k files on GlusterFS 4.1.5 3 nodes replica
??????? Original Message ??????? On Thursday, November 15, 2018 1:41 PM, Ravishankar N <ravishankar at redhat.com> wrote:> Thanks, noted. One more query. Are there files inside each of these > directories? Or is it just empty directories?You will find below the content of each of these 3 directories taken the brick on node 1: i)/data/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dir10 drwxr-xr-x 4 www-data www-data 4 Nov 5 14:19 . drwxr-xr-x 31 www-data www-data 31 Nov 5 14:23 .. drwxr-xr-x 3 www-data www-data 3 Nov 5 14:19 dir11 drwxr-xr-x 3 www-data www-data 3 Nov 5 14:19 another_dir ii)/data/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dir10/dir11/ drwxr-xr-x 3 www-data www-data 3 Nov 5 14:19 . drwxr-xr-x 4 www-data www-data 4 Nov 5 14:19 .. drwxr-xr-x 2 www-data www-data 4 Nov 5 14:19 oc_dir iii)/data/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dir10/dir11/oc_dir drwxr-xr-x 2 www-data www-data 4 Nov 5 14:19 . drwxr-xr-x 3 www-data www-data 3 Nov 5 14:19 .. -rw-r--r-- 2 www-data www-data 32 Nov 5 14:19 fileKey -rw-r--r-- 2 www-data www-data 512 Nov 5 14:19 username.shareKey so as you see from the output above only the "oc_dir" directory has two files inside.> symlinks are only for dirs. For files, they would be hard links to the > actual files. So if stat > ../brick/.glusterfs/aa/e4/aae4098a-1a71-4155-9cc9-e564b89957cf gives you > a file, then you can use find -samefile to get the other hardlinks like so: > #cd /brick/.glusterfs/aa/e4/aae4098a-1a71-4155-9cc9-e564b89957cf > #find /brick -samefile aae4098a-1a71-4155-9cc9-e564b89957cf > > If it is a hardlink, then you can do a getfattr on > /brick/.glusterfs/aa/e4/aae4098a-1a71-4155-9cc9-e564b89957cf itself. > -RaviThank you for explaining this important part. So yes with your help I could find the filenames associated to these 2 GFIDs and guess what? they are the 2 files which listed in the output above of the "oc_dir" directory. Have a look at this: # find /data/myvol-pro/brick -samefile aae4098a-1a71-4155-9cc9-e564b89957cf /data/myvol-pro/brick/.glusterfs/aa/e4/aae4098a-1a71-4155-9cc9-e564b89957cf /data/myvol-pro/brick/data/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dir10/dir11/oc_dir/fileKey # find /data/myvol-pro/brick -samefile 3c92459b-8fa1-4669-9a3d-b38b8d41c360 /data/myvol-pro/brick/.glusterfs/3c/92/3c92459b-8fa1-4669-9a3d-b38b8d41c360 /data/myvol-pro/brick/data/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dir10/dir11/oc_dir/username.shareKey I hope that helps the debug further else let me know if you need anything else.