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.

Bug 634623

Summary: GFS2: gfs2_edit enhancements for RHEL6.1
Product: Red Hat Enterprise Linux 6 Reporter: Robert Peterson <rpeterso>
Component: clusterAssignee: Robert Peterson <rpeterso>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: high Docs Contact:
Priority: high    
Version: 6.0CC: adas, bmarzins, cluster-maint, fdinitto, jwest, lhh, rpeterso, ssaha, swhiteho
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: cluster-3.0.12-25.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 656371 (view as bug list) Environment:
Last Closed: 2011-05-19 12:53: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: 656371, 674843    
Attachments:
Description Flags
Latest patch from 06 Jul 2010
none
Patch 2
none
patch 3
none
patch 4
none
patch 5
none
patch 6
none
patch 7
none
patch 8
none
patch 9
none
patch 10
none
patch 11
none
patch 12 none

Description Robert Peterson 2010-09-16 15:05:29 UTC
Description of problem:
The idea behind this bug is to add some enhancements I've been
meaning to add to help with gfs2 problem solving.  This mainly
stems from the gfs2_edit attachment to bug #628013 where I
needed to enhance gfs2_edit in order to solve the bug.
That's fix (1).

Since that time, I've thought of a few more things that I'd
really like to do to gfs2_edit, like (2) making the hex editor
print values in lower-case rather than today's upper-case.

(3) Lon also pointed out that small amounts of customer data
may be saved by accident during gfs2_edit savemeta, when files
are stuffed (data contained in the same block as the dinode).
We have to be careful with this one because stuffed system files
(such as statfs) should have all the data saved regardless.

Version-Release number of selected component (if applicable):
RHEL6.0

How reproducible:
Always

Steps to Reproduce:
1. Use gfs2_edit -p to print a directory dinode
2.
3.
  
Actual results:
Continuation leaf blocks will be missed

Expected results:
Continuation leaf blocks should be printed with the others.

Additional info:

Comment 1 Robert Peterson 2010-09-16 16:49:33 UTC
(4) I want to change restoremeta and savemeta to provide some
meaningful information as to its progress.  Case in point:
The printsavedmeta option reports this size:

[root@west-16 ../gfs2/edit]# gfs2_edit printsavedmeta /home/bob/metadata/gfs2/1773738-metasave 0x09
This is gfs2 metadata
File system size: 439464830 (0x1a31b37e) blocks, aka 1TB
File /home/bob/metadata/gfs2/1773738-metasave print successful.

Yet restoremeta reports this, and fails on a 1TB device:

There are 271056896 blocks of 4096 bytes in the destination file system.

2268215 metadata blocks (8860MB) restored.    Error: File system is too small to restore this metadata.
File system is 271056896 blocks, Restore block = 271110549

Comment 2 Robert Peterson 2010-09-17 20:02:56 UTC
Nate also noted that gfs2_edit restoremeta does not work on
sparse files to be mounted as loopback.  So consider this (5).

Comment 3 Robert Peterson 2010-10-01 03:15:19 UTC
Created attachment 450934 [details]
Latest patch from 06 Jul 2010

Comment 4 Robert Peterson 2010-10-01 03:15:56 UTC
Created attachment 450935 [details]
Patch 2

Comment 5 Robert Peterson 2010-10-01 03:16:22 UTC
Created attachment 450936 [details]
patch 3

Comment 6 Robert Peterson 2010-10-01 03:16:46 UTC
Created attachment 450937 [details]
patch 4

Comment 7 Robert Peterson 2010-10-01 03:17:09 UTC
Created attachment 450938 [details]
patch 5

Comment 8 Robert Peterson 2010-10-01 13:37:49 UTC
Created attachment 451013 [details]
patch 6

Comment 9 Robert Peterson 2010-10-01 16:47:58 UTC
Created attachment 451059 [details]
patch 7

Comment 10 Robert Peterson 2010-10-04 20:10:29 UTC
Created attachment 451522 [details]
patch 8

Comment 11 Robert Peterson 2010-10-04 20:11:00 UTC
Created attachment 451523 [details]
patch 9

Comment 12 Robert Peterson 2010-10-04 20:25:36 UTC
*** Bug 623467 has been marked as a duplicate of this bug. ***

Comment 13 Robert Peterson 2010-10-04 20:28:07 UTC
Created attachment 451525 [details]
patch 10

Comment 14 Robert Peterson 2010-10-04 23:43:55 UTC
Created attachment 451557 [details]
patch 11

Comment 18 Robert Peterson 2010-10-05 14:56:05 UTC
Created attachment 451685 [details]
patch 12

I had this handy little patch squirrelled away in my vault.

Comment 19 Robert Peterson 2010-10-05 14:58:25 UTC
Concise list of patches for this bugzilla:

1. gfs2_edit: better printing of directory leaf information
2. gfs2_edit: print hex numbers in lower-case
3. gfs2_edit: negative block numbers don't jump a negative amount
4. gfs2_edit: tiny (stuffed) files had user data saved with savemeta
5. gfs2_edit: give meaningful feedback for savemeta and restoremeta
6. gfs2_edit: Fix memory leak in savemeta option
7. gfs2_edit: Split extended display functions into extended.c
8. gfs2_edit: Move more functions to extended.c
9. gfs2_edit: Extend individual field printing/editing
10. gfs2_edit: fix page down on rindex
11. gfs2_edit: print field names in right column
12. gfs2_edit: display block allocation on rgrps and bitmaps

Comment 20 Robert Peterson 2010-10-14 14:42:28 UTC
The twelve patches (plus a thirteenth which fixed up extended.h
so it had the standard conditional compile stuff) were pushed to
the master branch of the gfs2-utils git repository and the
RHEL6 branch of the cluster git repository for inclusion into
RHEL6.  Changing status to POST until we start doing 6.1 builds.

Comment 22 Nate Straz 2011-03-25 17:51:17 UTC
Verified all 13 patches are included and applied in gfs2-utils-3.0.12-40.el6.

Comment 23 errata-xmlrpc 2011-05-19 12:53: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/RHBA-2011-0537.html