[Bugs] [Bug 1153900] New: Enabling Quota on existing data won't create pgfid xattrs

bugzilla at redhat.com bugzilla at redhat.com
Fri Oct 17 05:41:23 UTC 2014


https://bugzilla.redhat.com/show_bug.cgi?id=1153900

            Bug ID: 1153900
           Summary: Enabling Quota on existing data won't create pgfid
                    xattrs
           Product: GlusterFS
           Version: 3.5.2
         Component: quota
          Assignee: gluster-bugs at redhat.com
          Reporter: kdhananj at redhat.com
                CC: bugs at gluster.org, nbalacha at redhat.com,
                    rgowdapp at redhat.com, sharne at redhat.com,
                    storage-qa-internal at redhat.com, vmallika at redhat.com
        Depends On: 1147378
            Blocks: 1125231 (glusterfs-3.5.3)



+++ This bug was initially created as a clone of Bug #1147378 +++

+++ This bug was initially created as a clone of Bug #1146830 +++

Description of problem:
pgfid xattrs are used to construct the ancestry path in case of nameless
lookups. rhs-2.1 had code to create pgfid xattr in lookup if it is not already
there. However rhs-3.0 doesn't have pgfid healing code and hence pgfid xattrs
won't be created on existing data. Since nfs relies on nameless lookups
heavily, quota enforcement through nfs would be inconsistent.

[root at booradley 6]# gluster volume info

Volume Name: dist
Type: Distribute
Volume ID: 2b1406b1-cdb6-47b5-9d80-1cc035b73c5e
Status: Started
Number of Bricks: 1
Transport-type: tcp
Bricks:
Brick1: booradley:/home/export/dist1

[root at booradley dist1]# mount
localhost:dist on /mnt/glusterfs type fuse.glusterfs
(rw,relatime,user_id=0,group_id=0,default_permissions,allow_other,max_read=131072)

[root at booradley dist1]# ls /mnt/glusterfs/1/2/3/4/5/6/file 
/mnt/glusterfs/1/2/3/4/5/6/file

[root at booradley 6]# getfattr -d -m. -e hex /home/export/dist1/1/2/3/4/5/6/file 
getfattr: Removing leading '/' from absolute path names
# file: home/export/dist1/1/2/3/4/5/6/file
security.selinux=0x756e636f6e66696e65645f753a6f626a6563745f723a686f6d655f726f6f745f743a733000
trusted.gfid=0xa294cb915fd3412ab3ca2a3579e1820b

[root at booradley 6]# gluster volume quota dist enable
volume quota : success

[root at booradley 6]# getfattr -d -m. -e hex /home/export/dist/1/2/3/4/5/6/file 
getfattr: Removing leading '/' from absolute path names
# file: home/export/dist1/1/2/3/4/5/6/file
security.selinux=0x756e636f6e66696e65645f753a6f626a6563745f723a686f6d655f726f6f745f743a733000
trusted.gfid=0xa294cb915fd3412ab3ca2a3579e1820b
trusted.glusterfs.quota.11e18af2-ecda-4445-8fc7-e0f49d847b39.contri=0x0000000000000000

As can be seen above pgfid xattr is missing on file.

Version-Release number of selected component (if applicable):
rhs-3.0 and rhs-3.0.1 (rhs-2.1.x don't have this problem)

How reproducible:
always

Steps to Reproduce:
1. create some data on mount point
2. enable quota
3. check for pgfid xattr on backend

Actual results:
pgfid xattr not present.

Expected results:
xattr should be present.

Additional info:

--- Additional comment from Raghavendra G on 2014-09-26 04:08:15 EDT ---

However, on newly created files, xattr is created as can be seen below:

[root at booradley 6]# touch /mnt/glusterfs/1/2/3/4/5/6/newfile
[root at booradley 6]# ls /mnt/glusterfs/1/2/3/4/5/6/
file  newfile

[root at booradley 6]# getfattr -d -m. -e hex
/home/export/dist1/1/2/3/4/5/6/newfile 
getfattr: Removing leading '/' from absolute path names
# file: home/export/dist1/1/2/3/4/5/6/newfile
security.selinux=0x756e636f6e66696e65645f753a6f626a6563745f723a686f6d655f726f6f745f743a733000

trusted.gfid=0x125f6c9c0a3f4c439baab1721119b1ba

trusted.glusterfs.quota.11e18af2-ecda-4445-8fc7-e0f49d847b39.contri=0x0000000000000000

trusted.pgfid.11e18af2-ecda-4445-8fc7-e0f49d847b39=0x00000001

As can be seen above trusted.pgfid.xxxx xattr is created on newfile.


--- Additional comment from Anand Avati on 2014-09-29 03:36:55 EDT ---

REVIEW: http://review.gluster.org/8878 (glusterd/quota: Heal pgfid xattr on
existing data when the quota is enable) posted (#1) for review on master by
Vijaikumar Mallikarjuna (vmallika at redhat.com)

--- Additional comment from Anand Avati on 2014-09-30 07:51:24 EDT ---

REVIEW: http://review.gluster.org/8890 (glusterd/quota: Heal pgfid xattr on
existing data when the quota is enable) posted (#1) for review on release-3.6
by Vijaikumar Mallikarjuna (vmallika at redhat.com)

--- Additional comment from Anand Avati on 2014-09-30 12:42:05 EDT ---

COMMIT: http://review.gluster.org/8878 committed in master by Vijay Bellur
(vbellur at redhat.com) 
------
commit f95a25c35e1ced6a3c05030d34555b757b14e1c9
Author: vmallika <vmallika at redhat.com>
Date:   Mon Sep 29 13:02:30 2014 +0530

    glusterd/quota: Heal pgfid xattr on existing data when the quota is
    enable

    The pgfid extended attributes are used to construct the ancestry path
    (from the file to the volume root) for nameless lookups on files.
    As NFS relies on nameless lookups heavily, quota enforcement through NFS
    would be inconsistent if quota were to be enabled on a volume with
    existing data.

    Solution is to heal the pgfid extended attributes as a part of lookup
    perfomed by quota-crawl process. In a posix lookup check for pgfid xattr
    and if it is missing set the xattr.

    Change-Id: I5912ea96787625c496bde56d43ac9162596032e9
    BUG: 1147378
    Signed-off-by: vmallika <vmallika at redhat.com>
    Reviewed-on: http://review.gluster.org/8878
    Tested-by: Gluster Build System <jenkins at build.gluster.com>
    Reviewed-by: Vijay Bellur <vbellur at redhat.com>


Referenced Bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=1125231
[Bug 1125231] GlusterFS 3.5.3 Tracker
https://bugzilla.redhat.com/show_bug.cgi?id=1147378
[Bug 1147378] Enabling Quota on existing data won't create pgfid xattrs
-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=r8ixL4xkeG&a=cc_unsubscribe


More information about the Bugs mailing list