Bug 659137

Summary: GFS2: Kernel changes necessary to allow growing completely full filesystems.
Product: Red Hat Enterprise Linux 6 Reporter: Ben Marzinski <bmarzins>
Component: kernelAssignee: Ben Marzinski <bmarzins>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: low    
Version: 6.1CC: djansa, kzhang
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: kernel-2.6.32-91.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 661904 (view as bug list) Environment:
Last Closed: 2011-05-23 20:29:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 659123, 707091    
Attachments:
Description Flags
patch to make gfs2 reread the rindex when necessary, and to allow truncating it. none

Description Ben Marzinski 2010-12-02 00:31:36 UTC
There are two kernel changes necessary to allow gfs2 to grow completely full filesystems.  First, gfs2 needs to reread the rindex file if it runs out of room while trying to grow the rindex file.  This allows gfs2 to use space allocated earlier in the grow to complete growing the filesystem. Second, gfs2 needs to support truncating the rindex file, so it can truncate any partially written rindex entries, if the grow fails.

Comment 2 RHEL Program Management 2010-12-02 04:19:57 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux maintenance release. Product Management has 
requested further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed 
products. This request is not yet committed for inclusion in an Update release.

Comment 3 Ben Marzinski 2010-12-03 02:58:53 UTC
Posted.

Comment 4 Ben Marzinski 2010-12-03 03:03:27 UTC
Created attachment 464482 [details]
patch to make gfs2 reread the rindex when necessary, and to allow truncating it.

This is the patch that was submitted to for 6.1

Comment 5 Nate Straz 2010-12-06 21:54:40 UTC
What procedures will you be using to test these patches?

Comment 6 Ben Marzinski 2010-12-07 15:17:03 UTC
I was reproducing this by

1. create a 10Gig filesystem on an LV (using the latest userspace tools.)
2. fill it completely up, so every block is used
3. extend the LV to 20Gig
4. run gfs2_grow (you need to use the latest user tools. Without them, you'll
still fail, but it will be because the tools didn't allocate the space for the
next RG, not because gfs2 couldn't use it)

This will fail, since there is not enough space to grow the filesystem with out using some of the recently allocated space. Then gfs2_grow will try to truncate the partially written rindex entry, which will cause gfs2 to throw a BUG() since it tries to recursively lock the rindex file during trunacte.

With the fix, the grow will work correctly.  You can also use an older version of mkfs.gfs2 to make the filesystem without an extra rindex block reserved. In this case the new latest version of gfs2_grow will still fail, but it will be able to
truncate the file without the BUG.

Comment 7 Aristeu Rozanski 2010-12-15 16:07:34 UTC
Patch(es) available on kernel-2.6.32-91.el6

Comment 10 Nate Straz 2011-04-26 15:25:28 UTC
Verified as part of testing for 659123

Comment 11 errata-xmlrpc 2011-05-23 20:29:59 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/RHSA-2011-0542.html