Red Hat Bugzilla – Bug 536902
quota file size not a multiple of struct gfs2_quota
Last modified: 2010-05-06 20:09:18 EDT
Created attachment 369084 [details]
compressed quota file
From linux-cluster mailing list:
> Hi all,
> I'm trying to set up quotas on my gfs2 filesystems, and I'm running
> into some problems. I enabled quotas (quota=on), did a gfs2_quota reset
> and a gfs2_quota init. Now, I'm getting warning messages:
> warning: quota file size not a multiple of struct gfs2_quota
> Warning: This filesystem doesn't seem to have the new quota list format
> or the quota list is corrupt. list, check and init operation performance
> will suffer due to this. It is recommended that you run the 'gfs2_quota
> reset' operation to reset the quota file. All current quota information
> will be lost and you will have to reassign all quota limits and warnings
> I've tried doing a reset/init/check, fsck.gfs2, etc., but I still get
> the same warnings. Am I doing something wrong?
> RHEL 5.4:
> Linux 2.6.18-164.el5
> -- scooter
Abhijith Das wrote:
> Hi Scooter,
> The 'gfs2_quota reset' command should truncate the hidden quota file down to just root uid/gid quotas and these warnings should cease. Seems like that's not happening for you. I'd like to take a look at the hidden quota file (if possible, the filesystem itself) to see what's going on. Please open a RH bugzilla for this problem.
> If the filesystem is not too big and you can share it, please compress+upload it someplace and send me the link to it. If you can't share the filesystem, I'd like to atleast look at the hidden quota file. Please do the following to retrieve that. I must warn you that this *might* hang/crash the filesystem, and you might have to restart your machine.
> 1. Mount the gfs2 filesystem (say at /mnt/gfs2)
> 2. Mount the gfs2meta filesystem - mount -t gfs2meta /mnt/gfs2 /tmp/.gfs2meta
> 3. ls -l /tmp/.gfs2meta/quota
> Check that the above file is not unreasonably large (there used to be a known issue where this file could get huge (100s of GB). It doesn't actually use all that space as it's a sparse file. I believe this was fixed at one point, I just don't know if you have the fix or not)
> 4. If the above file is small, just do 'cp /tmp/.gfs2meta/ /tmp/foo'
> 5. umount /tmp/.gfs2meta && umount /mnt/gfs2
> Please compress and email me foo.
I assume that for the 'cp' you want a 'cp /tmp/.gfs2meta/quota
/tmp/foo', not the entire directory, right? If so, here it is. The
entire filesystem is large (1TB), with about 200GB in use, so it's not
practical to send it to you.
Created attachment 369091 [details]
gzipped quota file
Another erroneous GFS2 quota file as requested in
Thank you for your attention.
Created attachment 375864 [details]
RHEL5 patch - kernel portion of the patch to remove the quota linked list stuff
This is my first bash at fiemap-based reading of the quota file.
This is the kernel part of a 2-part patch set to remove the linked-list implementation of quotas on disk. The linked list was a workaround for listing the sparse quota file, but it was tedious to maintain and made the code complicate as well. Not to mention the annoying warning messages.
This patch rips out the linked-list part from the on disk quota structure and restores it to it's original form prior to the linked-list patch. There is now fiemap support in gfs2 that allows us to read sparse files efficiently.
For this to work correctly, both this kernel patch and the following userland patch to gfs2_quota should be present.
A 'gfs2_quota reset' should not be required for the newer gfs2_quota to work with filesystems that have the linked-list on disk quotas.
Created attachment 375865 [details]
RHEL5 userland patch
Created attachment 377604 [details]
Updated userland patch - Fixes EOF condition where extent was longer than size of file
Created attachment 377612 [details]
missed a spot
Created attachment 377613 [details]
userland upstream patch
Pushed fix in comment #8 to STABLE3 in cluster.git and HEAD of gfs2-utils.git
Pushed fix in comment #7 to RHEL55 branch in cluster.git
Build 2163188 complete and successful. This is fixed in
Created attachment 397652 [details]
RHEL5.5 userland part 2 patch
This patch fixes an error due to uninitialized fiemap flags. Also, while testing, I found a couple of other issues with boundary conditions where some quotas were not being set properly with "gfs2_quota limit/warn" and not being displayed with "gfs2_quota list". This patch fixes these as well.
Build 2298701 complete and successful. This is fixed in version gfs2-utils-0.1.62-20.el5
*** Bug 568119 has been marked as a duplicate of this bug. ***
The utilites no longer produce any warnings nor errors. You may still experience kernel panic during quota reset until bug 569610 is fixed. Marking as verified.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.