Hide Forgot
Trying to edit the file over nfs mount corrupts the extended attribute, 1. create a dist vol 2. enable quota, set limit on volume 3. mount it over nfs 4. create a file 5. edit it, try remove some lines from the file. Result:- xattr of the brick in which the file is residing gets corrupted. logs, over nfs and when quota is enabled. [root@centos-qa-client-3 mnt]# getfattr -m . -d -e hex /mnt/dist2/ getfattr: Removing leading '/' from absolute path names # file: mnt/dist2 trusted.gfid=0x00000000000000000000000000000001 trusted.glusterfs.dht=0x000000010000000000000000ffffffff trusted.glusterfs.quota.dirty=0x3000 trusted.glusterfs.quota.size=0xfffffffffffff32f [root@centos-qa-client-3 mnt]# ############################# though didn't find it over fuse, ########################## from client end, [root@centos-qa-client-1 nfs-test]# touch file [root@centos-qa-client-1 nfs-test]# vi file E72: Close error on swap file[root@centos-qa-client-1 nfs-test]# ls -li total 8 6800889746227272631 -rw-r--r-- 1 root root 93 Apr 7 05:43 file [root@centos-qa-client-1 nfs-test]# vi file E72: Close error on swap file[root@centos-qa-client-1 nfs-test]# vi file [root@centos-qa-client-1 nfs-test]# ls -li total 8 14644898392211223440 -rw-r--r-- 1 root root 79 Apr 7 05:44 file [root@centos-qa-client-1 nfs-test]#
The culprit is in the way vim is creating backup files (files postfixed with ~). It creates a hardlink to existing file and does an unlink on the original name. Now, in marker there would be only one contribution node for both the links (since both links have same parent) and hence during link, file-size corresponding to new-link will not be added to parents. However during unlink, file size is subtracted, there by resulting in negative values.
PATCH: http://patches.gluster.com/patch/6942 in master (features/marker-quota: remove contribution xattrs from oldloc in rename.)
PATCH: http://patches.gluster.com/patch/6943 in master (features/marker-quota: reduce contributions to parents during unlink only if it is the last link.)
used vi to edit a file over nfs mount, and the extended attributes were not corrupted.