[Gluster-users] question about command "getfattr" in replicate volume

songxin songxin_1980 at 126.com
Thu Mar 3 03:28:07 UTC 2016







 Hi,


recondition:
glusterfs version is 3.7.6
A node:128.224.95.140
B node:128.224.162.255

 brick on A node:/data/brick/gv0
 brick on B node:/data/brick/gv0


 reproduce steps:
 1.gluster peer probe 128.224.162.255                                                                                                                                      (on A node)
 2. gluster volume create gv0 replica 2 128.224.95.140:/data/brick/gv0 128.224.162.255:/data/brick/gv0 force                       (on A node)
 3.gluster volume start gv0                                                                                                                                                          (on A node)
 4. mount -t glusterfs 128.224.95.140:/gv0 gluster                                                                                                                     (on A node)
 5.create file 11 in dir gluster                                                                                                                                                       (on A node)

 6.getfattr -m. -d -e hex /data/brick/gv0/11                                                                                                                                   (on A node)


# file: data/brick/gv0/11
trusted.afr.dirty=0x000000000000000000000000
trusted.bit-rot.version=0x00000000000000025696d78700029573

trusted.gfid=0xe696148665c343f7ace19184f0b5e7fa
 6.getfattr -m. -d -e hex /data/brick/gv0/11                                                                                                                                   (on B node)
# file: data/brick/gv0/11 trusted.afr.dirty=0x000000000000000000000000 trusted.bit-rot.version=0x000000000000000256653d270006d953 trusted.gfid=0xe696148665c343f7ace19184f0b5e7fa


My question is following.


Why the file a only has one  trusted.afr.dirty extended attribute about change log in replicate volume?


I know right info by run "getfattr" is like below.


Example:
[root at store3 ~]# getfattr -d -e hex -m. brick-a/file.txt
#file: brick-a/file.txt
security.selinux=0x726f6f743a6f626a6563745f723a66696c655f743a733000
trusted.afr.vol-client-2=0x000000000000000000000000
trusted.afr.vol-client-3=0x000000000200000000000000
trusted.gfid=0x307a5c9efddd4e7c96e94fd4bcdcbd1b



replica pair, i.e.brick-b:
trusted.afr.vol-client-0=0x000000000000000000000000 -->changelog for itself (brick-a)
trusted.afr.vol-client-1=0x000000000000000000000000 -->changelog for brick-b as seen by brick-a

Likewise, all files in brick-b will have:
trusted.afr.vol-client-0=0x000000000000000000000000 -->changelog for brick-a as seen by brick-b
trusted.afr.vol-client-1=0x000000000000000000000000 -->changelog for itself (brick-b)




Above info is getting from link https://github.com/gluster/glusterfs/blob/master/doc/debugging/split-brain.md.




Thanks,

Xin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gluster.org/pipermail/gluster-users/attachments/20160303/1a905c8a/attachment.html>


More information about the Gluster-users mailing list