Bug 483799
Summary: | GFS2: gfs2_edit fixes for 5.4 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Robert Peterson <rpeterso> | ||||||||||
Component: | gfs2-utils | Assignee: | Robert Peterson <rpeterso> | ||||||||||
Status: | CLOSED ERRATA | QA Contact: | Cluster QE <mspqa-list> | ||||||||||
Severity: | low | Docs Contact: | |||||||||||
Priority: | low | ||||||||||||
Version: | 5.3 | CC: | edamato | ||||||||||
Target Milestone: | rc | ||||||||||||
Target Release: | --- | ||||||||||||
Hardware: | All | ||||||||||||
OS: | Linux | ||||||||||||
Whiteboard: | |||||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||||
Doc Text: | Story Points: | --- | |||||||||||
Clone Of: | Environment: | ||||||||||||
Last Closed: | 2009-09-02 11:02:47 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: | |||||||||||||
Attachments: |
|
Description
Robert Peterson
2009-02-03 17:27:40 UTC
Created attachment 331049 [details]
First patch
This RHEL5 patch adds some of the functionality described.
Here is some sample output:
[root@roth-01 ../gfs2/edit]# ./gfs2_edit -p 0x8000 blocktype /dev/roth_vg/roth_lv
8 (Block 32768 is type 8: Log Header)
[root@roth-01 ../gfs2/edit]# ./gfs2_edit -p 25 blocktype /dev/roth_vg/roth_lv
4 (Block 25 is type 4: Dinode)
[root@roth-01 ../gfs2/edit]# ./gfs2_edit -p 25 blockalloc /dev/roth_vg/roth_lv
3 (Metadata)
[root@roth-01 ../gfs2/edit]# ./gfs2_edit -p 25 blockalloc 1 /dev/roth_vg/roth_lv
1
[root@roth-01 ../gfs2/edit]# ./gfs2_edit -p 25 blockalloc /dev/roth_vg/roth_lv
1 (Data)
[root@roth-01 ../gfs2/edit]# ./gfs2_edit -p 25 blockalloc 3 /dev/roth_vg/roth_lv
3
[root@roth-01 ../gfs2/edit]# ./gfs2_edit -p 25 blockalloc /dev/roth_vg/roth_lv
3 (Metadata)
[root@roth-01 ../gfs2/edit]# ./gfs2_edit -p 25 field di_size /dev/roth_vg/roth_lv
17152
[root@roth-01 ../gfs2/edit]# ./gfs2_edit -x -p 25 field di_size /dev/roth_vg/roth_lv
0x4300
[root@roth-01 ../gfs2/edit]# ./gfs2_edit -x -p 25 field di_size 0x4300 /dev/roth_vg/roth_lv
0x4300
[root@roth-01 ../gfs2/edit]# ./gfs2_edit -x -p 25 field di_size /dev/roth_vg/roth_lv
0x4300
[root@roth-01 ../gfs2/edit]# ./gfs2_edit -p 0x11000 blockrg /dev/roth_vg/roth_lv
65555
[root@roth-01 ../gfs2/edit]# ./gfs2_edit -x -p rg 1 /dev/roth_vg/roth_lv
RG #1 located at: 65555 (0x10013)
mh_magic 0x01161970(hex)
mh_type 2 0x2
mh_format 200 0xc8
rg_flags 0 0x0
rg_free 65528 0xfff8
rg_dinodes 0 0x0
[root@roth-01 ../gfs2/edit]# ./gfs2_edit -x -p 0x27017 blockbits /dev/roth_vg/roth_lv
0x20013
[root@roth-01 ../gfs2/edit]# ./gfs2_edit -x -p 0x21017 blockbits /dev/roth_vg/roth_lv
0x20012
[root@roth-01 ../gfs2/edit]# ./gfs2_edit -x -p 0x28017 blockbits /dev/roth_vg/roth_lv
0x20014
[root@roth-01 ../gfs2/edit]# ./gfs2_edit -x -p 0x28017 blockrg /dev/roth_vg/roth_lv
0x20012
Created attachment 331475 [details]
Second patch
This patch adds all of the functionality I described above, except
it does not highlight fields. This one adds the metadata find feature
for both -p and interactive mode. Example output:
[root@roth-01 ../gfs2/edit]# ./gfs2_edit -x -p 0 find none /dev/roth_vg/roth_lv
0x1efc7
[root@roth-01 ../gfs2/edit]# ./gfs2_edit -p rg 0 find di /dev/roth_vg/roth_lv
23
[root@roth-01 ../gfs2/edit]# ./gfs2_edit -x -p rg 0 find rg /dev/roth_vg/roth_lv
0xa09b
Created attachment 332259 [details]
Latest RHEL5 patch
This patch allows gfs2_edit to print on the interactive screen whether
the block is free, data, metadata, unlinked, or reserved (==metadata not
associated with bitmaps, like the RG space, bitmaps and superblock).
Also, I fixed a bug whereby "-p size" would also try to dump block info.
Also, I ported some relatively minor upstream fixes back to RHEL5.
Created attachment 332260 [details]
Latest upstream patch
This is the upstream version of the patch
I made one minor correction to the above patches, then committed them to the master branch of the gfs2-utils git tree, and the RHEL5 branch of the cluster git tree for inclusion into 5.4. The patch was tested on system roth-01. Changing status to MODIFIED. Changing status temporarily back to assigned because I have one more improvement to gfs2_edit to slip in. This patch does basically two things to improve debugging of indirect pointer problems such as bug #490136 (for which I developed it). First, I improved the color scheme and made it differentiate zero-data from non-zero data for some metadata block types. This allows you to easily see where a pointer is located on the screen rather than staring into a sea of zeroes. Second, I made gfs2_edit tell you what pointer number your cursor is at for dinodes and indirect blocks. That way, you can easily check your metapath information against what's on disk. I transposed the "red" and "pink" sections so that the cursor is red and therefore easier to see. This may all be lumped into item number 4 from the problem description above, which is the only fix I had not included with the previous commits. The additional patch has been pushed to the RHEL5 branch for inclusion into 5.4. Changing status back to Modified. 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-2009-1337.html |