Red Hat Bugzilla – Bug 659137
GFS2: Kernel changes necessary to allow growing completely full filesystems.
Last modified: 2011-05-23 22:21:04 EDT
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.
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.
Posted.
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
What procedures will you be using to test these patches?
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.
Patch(es) available on kernel-2.6.32-91.el6
Verified as part of testing for 659123
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