Bug 352841 - GFS2: Evaluate and implement missing gfs2_tool features
Summary: GFS2: Evaluate and implement missing gfs2_tool features
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gfs2-utils
Version: 5.1
Hardware: All
OS: Linux
low
low
Target Milestone: ---
: ---
Assignee: Chris Feist
QA Contact: GFS Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-10-25 17:35 UTC by Robert Peterson
Modified: 2010-01-12 03:40 UTC (History)
1 user (show)

Fixed In Version: RHBA-2008-0350
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-21 17:20:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch to add the "df" functionality (9.47 KB, patch)
2007-11-13 22:22 UTC, Robert Peterson
no flags Details | Diff
Better patch (9.42 KB, patch)
2007-11-14 17:16 UTC, Robert Peterson
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2008:0350 0 normal SHIPPED_LIVE gfs2-utils bug fix update 2008-05-20 12:44:56 UTC

Description Robert Peterson 2007-10-25 17:35:25 UTC
Description of problem:
This is an offshoot of bug #349601 comment #3:
The gfs2_tool command has a bunch of commands that were commented out
for RHEL5.  That was done mostly because there were numerous ioctls
pulled out of GFS2 in order to satisfy the upstream community.
Most of these, however, have commands in gfs2_edit that do nearly
the same thing.  For example, gfs2_edit -p rindex can be said to replace
gfs2_tool rindex and gfs2_edit -p jindex can be said to replace
gfs2_tool jindex.  However, I won't say that the gfs2_edit command prints
the exact same format as the gfs2_tool.

We should probably go through all those gfs2_tool commands, evaluate
which ones are adequately covered by gfs2_edit and re-implement the
ones that aren't.  That is, if they can be done without
re-implementing new ioctl code in gfs2 kernel code.
Case in point: gfs2_tool df.

Version-Release number of selected component (if applicable):
RHEL5.1

How reproducible:
Always

Steps to Reproduce:
gfs2_tool df
 
Actual results:
gfs2_tool: unknown action: df

Expected results:
Should work

Additional info:

Comment 2 Robert Peterson 2007-11-08 20:10:08 UTC
I've gone through the options that are missing from gfs2_tool and
here is my analysis.  The following is a list of "missing" options
and where we stand:

1. Option: flush
   Description: Sync out dirty data for a file and drop its glock.
   Status: There's no good way to implement this today, except open
           and fsync.

2. Option: stat
   Description: Print gfs2_dinode for a file.
   Status: There's no good way to implement this today.  The gfs2_edit
           command can do this, give the inode address.  Right now
           you can't give it a path.

3. Option: getsb
   Description: Print out the gfs2 superblock
   Status: There is a command equivalent in gfs2_edit: gfs2_tool -p sb
           so I don't see the need to implement this.

4. Option: jindex
   Description: Print out the journal index
   Status: There is a command equivalent in gfs2_edit: gfs2_tool -p jindex
           so I don't see the need to implement this.

5. Option: rindex
   Description: Print out the resource group index file
   Status: There is a command equivalent in gfs2_edit: gfs2_tool -p rindex
           so I don't see the need to implement this.

6. Option: quota
   Description: Print out the quota file details
   Status: There is a command equivalent in gfs2_edit: gfs2_tool -p quota
           so I don't see the need to implement this.

7. Option: layout
   Description: Print out the layout of a file
   Status: There is a separate bugzilla record to implement this feature.

8. Option: df
   Description: Print out a bunch of information about the file system
   Status: Some customer might be using this.  It might be nice to
           implement this.

Conclusion:

IMHO, the only missing option we should consider implementing at this
time is the "df" command.


Comment 3 Robert Peterson 2007-11-13 22:22:11 UTC
Created attachment 257481 [details]
Patch to add the "df" functionality

This is my initial attempt to add the "df" function back to gfs2_tool.

Comment 4 Robert Peterson 2007-11-14 17:16:04 UTC
Created attachment 258441 [details]
Better patch

This version of the patch is the one I'm planning to commit.
It has a few small improvements, such as the "df" help printing
in the alphabetically correct section of the gfs2_tool -h output.
I also eliminated some cruft from the previous patch.

Comment 5 Robert Peterson 2007-11-14 17:22:06 UTC
The code was tested on system roth-01 including the man page, -h option,
and new df options for both single and multiple file systems (both HEAD
and RHEL5 versions).  The code was committed to the HEAD and RHEL5 branches
of CVS.  I'm therefore changing the status to modified.


Comment 8 errata-xmlrpc 2008-05-21 17:20:22 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 the 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-2008-0350.html



Note You need to log in before you can comment on or make changes to this bug.