Bug 536902 - quota file size not a multiple of struct gfs2_quota
Summary: quota file size not a multiple of struct gfs2_quota
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gfs2-utils
Version: 5.4
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: 5.5
Assignee: Abhijith Das
QA Contact: Cluster QE
URL:
Whiteboard:
: 568119 (view as bug list)
Depends On:
Blocks: 546455 589813
TreeView+ depends on / blocked
 
Reported: 2009-11-11 18:37 UTC by Abhijith Das
Modified: 2010-05-07 00:09 UTC (History)
9 users (show)

Fixed In Version: gfs2-utils-0.1.62-20.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 546455 (view as bug list)
Environment:
Last Closed: 2010-03-30 08:53:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
compressed quota file (4.14 KB, text/plain)
2009-11-11 18:37 UTC, Abhijith Das
no flags Details
gzipped quota file (17.13 KB, application/gzip)
2009-11-11 19:12 UTC, 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 18:14 UTC, Abhijith Das
no flags Details | Diff
RHEL5 userland patch (15.98 KB, patch)
2009-12-03 18:15 UTC, 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 22:04 UTC, Abhijith Das
no flags Details | Diff
missed a spot (16.73 KB, patch)
2009-12-10 22:58 UTC, Abhijith Das
no flags Details | Diff
userland upstream patch (16.15 KB, patch)
2009-12-10 22:58 UTC, Abhijith Das
no flags Details | Diff
RHEL5.5 userland part 2 patch (7.81 KB, patch)
2010-03-03 20:11 UTC, Abhijith Das
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2010:0287 0 normal SHIPPED_LIVE gfs2-utils bug fix update 2010-03-29 14:05:15 UTC

Description Abhijith Das 2009-11-11 18:37:02 UTC
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 19:12:48 UTC
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 18:14:21 UTC
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 18:15:07 UTC
Created attachment 375865 [details]
RHEL5 userland patch

Comment 6 Abhijith Das 2009-12-10 22:04:14 UTC
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 22:58:07 UTC
Created attachment 377612 [details]
missed a spot

Comment 8 Abhijith Das 2009-12-10 22:58:30 UTC
Created attachment 377613 [details]
userland upstream patch

Comment 9 Abhijith Das 2009-12-10 23:10:39 UTC
Pushed fix in comment #8 to STABLE3 in cluster.git and HEAD of gfs2-utils.git

Comment 10 Abhijith Das 2009-12-14 22:33:22 UTC
Pushed fix in comment #7 to RHEL55 branch in cluster.git

Comment 11 Robert Peterson 2009-12-21 22:41:49 UTC
Build 2163188 complete and successful.  This is fixed in
gfs2-utils-0.1.62-14.el5.

Comment 17 Abhijith Das 2010-03-03 20:11:29 UTC
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 21:49:40 UTC
Build 2298701 complete and successful. This is fixed in version gfs2-utils-0.1.62-20.el5

Comment 19 Abhijith Das 2010-03-08 16:01:27 UTC
*** Bug 568119 has been marked as a duplicate of this bug. ***

Comment 20 Jaroslav Kortus 2010-03-09 17:15:35 UTC
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 08:53:49 UTC
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.