Description of problem: With the -T option gone from the gfs2_jadd man page, we have lost the easy functionality of determining the number of existing journals with an administrator-level command. To get this info you need to access the gfs2meta filesystem (which is generally not visible or known to the user), or you need to run gfs2_edit -p jindex on the file system (which is something of a workaround and we like to gently shoo people away from the possibly dangerous gfs2_edit command). Bob suggested that this could be an option of gfs2_tool. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
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.
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 open up another bugzilla record so that we can go through all those 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.
Created attachment 237381 [details] Patch to implement gfs2_tool journals This patch implements gfs2_tool journals <mount point>. The output looks something like this: [root@roth-01 ../cluster/gfs2/tool]# ./gfs2_tool journals /mnt/gfs2 journal2 - 128MB journal1 - 128MB journal0 - 128MB 3 journals found.
I'm adding a bunch of gfs2 developers to the cc list so I can get their input on the format of the new command and its output before committing (See comment #4).
I suggest gfs2_tool df. Bring back as much of the 'gfs_tool df' output as is reasonable, and then add new output that seems important, e.g. gfs_tool doesn't show the size of journals, which is probably something new you want to add in gfs2_tool (and consider adding the same to gfs_tool also.)
I think the gfs2_tool df feature is a bit beyond the scope of this bug. The gfs2_jadd man page was suggesting that users run gfs2_jadd -T (Test mode) to get the journal information, but I think an option to gfs2_tool is more appropriate. However, as I mentioned in comment #3, it's probably a good idea to evaluate gfs2_tool and get the missing features, such as df, working. I just opened bug #352841 for that purpose.
This was tested on roth-01 and committed to CVS at HEAD and RHEL5 branches for inclusion in 5.2. Changing status 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 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