Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
When mkfs.gfs2 built the resource group index for a new GFS2 file system, it used all the space it allocated. If the file system filled up completely, there was no room left over to write a new rindex entry, which made gfs2_grow unable to expand the file system. Code was added to mkfs.gfs2 to allocate enough space for the entire rindex file plus one extra rindex entry. The gfs2_grow code was changed to utilize that unused rindex space. As a result, gfs2_grow is now able to expand a completely full GFS2 file system.
Created attachment 500549[details]
Patch to allow gfs2_grow to use fallocate to grow full filesystems.
This patch makes mkfs.gfs2 add enough space for an extra resource group entry to the rindex when in creates the filesystem. It also uses fallocate to make sure that there is enough space for an additional resource group entry in the rindex file whenever the filesystem is grown with gfs2_grow.
Created attachment 500971[details]
Patch to allow gfs2_grow to grow full filesystems. Also handles stuffed rindex.
This is a new version of the patch. With the old version, there was still an issue with stuffed rindex files, and filesystems where the blocksize was not equal to the page size. Since gfs2_grow was writing all the rindex entries at once, there needed to be enough space to at least write the first page of data. If there wasn't, gfs2_grow would fail, even if fallocate guaranteed that there was enough space to write another rindex entry. Now gfs2_grow first writes one rindex entry, to grow the filesystem by one resource group's worth of space. Then it writes the rest. Since the fallocate and mkfs code in the patch guarantees that there will always be enough space for at least one more rindex entry, this should always work.
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
New Contents:
When mkfs.gfs2 built the resource group index for a new GFS2 file system, it used all the space it allocated. If the file system filled up completely, there was no room left over to write a new rindex entry, which made gfs2_grow unable to expand the file system. Code was added to mkfs.gfs2 to allocate enough space for the entire rindex file plus one extra rindex entry. The gfs2_grow code was changed to utilize that unused rindex space. As a result, gfs2_grow is now able to expand a completely full GFS2 file system.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
http://rhn.redhat.com/errata/RHBA-2011-1516.html
Created attachment 500549 [details] Patch to allow gfs2_grow to use fallocate to grow full filesystems. This patch makes mkfs.gfs2 add enough space for an extra resource group entry to the rindex when in creates the filesystem. It also uses fallocate to make sure that there is enough space for an additional resource group entry in the rindex file whenever the filesystem is grown with gfs2_grow.