Bug 536902 - quota file size not a multiple of struct gfs2_quota
quota file size not a multiple of struct gfs2_quota
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gfs2-utils (Show other bugs)
5.4
All Linux
low Severity medium
: rc
: 5.5
Assigned To: Abhijith Das
Cluster QE
:
: 568119 (view as bug list)
Depends On:
Blocks: 546455 589813
  Show dependency treegraph
 
Reported: 2009-11-11 13:37 EST by Abhijith Das
Modified: 2010-05-06 20:09 EDT (History)
9 users (show)

See Also:
Fixed In Version: gfs2-utils-0.1.62-20.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 546455 (view as bug list)
Environment:
Last Closed: 2010-03-30 04:53:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
compressed quota file (4.14 KB, text/plain)
2009-11-11 13:37 EST, Abhijith Das
no flags Details
gzipped quota file (17.13 KB, application/gzip)
2009-11-11 14:12 EST, Anthony Uk
no flags Details
RHEL5 patch - kernel portion of the patch to remove the quota linked list stuff (2.50 KB, patch)
2009-12-03 13:14 EST, Abhijith Das
no flags Details | Diff
RHEL5 userland patch (15.98 KB, patch)
2009-12-03 13:15 EST, Abhijith Das
no flags Details | Diff
Updated userland patch - Fixes EOF condition where extent was longer than size of file (16.34 KB, patch)
2009-12-10 17:04 EST, Abhijith Das
no flags Details | Diff
missed a spot (16.73 KB, patch)
2009-12-10 17:58 EST, Abhijith Das
no flags Details | Diff
userland upstream patch (16.15 KB, patch)
2009-12-10 17:58 EST, Abhijith Das
no flags Details | Diff
RHEL5.5 userland part 2 patch (7.81 KB, patch)
2010-03-03 15:11 EST, Abhijith Das
no flags Details | Diff

  None (edit)
Description Abhijith Das 2009-11-11 13:37:02 EST
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
>
> and
>
> 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
>     gfs2-utils-0.1.62-1.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.
>
> Thanks!
> --Abhi

Hi Abhi,
    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.

-- scooter
Comment 1 Anthony Uk 2009-11-11 14:12:48 EST
Created attachment 369091 [details]
gzipped quota file

Another erroneous GFS2 quota file as requested in

https://www.redhat.com/archives/linux-cluster/2009-November/msg00090.html

Thank you for your attention.
Comment 2 Abhijith Das 2009-12-03 13:14:21 EST
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.
Comment 3 Abhijith Das 2009-12-03 13:15:07 EST
Created attachment 375865 [details]
RHEL5 userland patch
Comment 6 Abhijith Das 2009-12-10 17:04:14 EST
Created attachment 377604 [details]
Updated userland patch - Fixes EOF condition where extent was longer than size of file
Comment 7 Abhijith Das 2009-12-10 17:58:07 EST
Created attachment 377612 [details]
missed a spot
Comment 8 Abhijith Das 2009-12-10 17:58:30 EST
Created attachment 377613 [details]
userland upstream patch
Comment 9 Abhijith Das 2009-12-10 18:10:39 EST
Pushed fix in comment #8 to STABLE3 in cluster.git and HEAD of gfs2-utils.git
Comment 10 Abhijith Das 2009-12-14 17:33:22 EST
Pushed fix in comment #7 to RHEL55 branch in cluster.git
Comment 11 Robert Peterson 2009-12-21 17:41:49 EST
Build 2163188 complete and successful.  This is fixed in
gfs2-utils-0.1.62-14.el5.
Comment 17 Abhijith Das 2010-03-03 15:11:29 EST
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.
Comment 18 Abhijith Das 2010-03-03 16:49:40 EST
Build 2298701 complete and successful. This is fixed in version gfs2-utils-0.1.62-20.el5
Comment 19 Abhijith Das 2010-03-08 11:01:27 EST
*** Bug 568119 has been marked as a duplicate of this bug. ***
Comment 20 Jaroslav Kortus 2010-03-09 12:15:35 EST
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.
Comment 22 errata-xmlrpc 2010-03-30 04:53:49 EDT
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.

http://rhn.redhat.com/errata/RHBA-2010-0287.html

Note You need to log in before you can comment on or make changes to this bug.