Red Hat Bugzilla – Bug 345501
GFS2: gfs2 utils uses non-canonicalized names
Last modified: 2010-01-11 22:40:03 EST
+++ This bug was initially created as a clone of Bug #337961 +++
The problem was reported for GFS1, but there are MANY places in the
gfs2 utils where it uses libgfs2 function check_for_gfs2 that has the
same problem. The function can be tripped up by extra slashes and such.
Description of problem:
# gfs_grow /mountpoint/ does not work
Version-Release number of selected component (if applicable):
# gfs_grow -Tv /gfsdata/
GFS Filesystem /gfsdata/ not found
[root@node-1 ~]# gfs_grow -Tv /gfsdata
FS: Mount Point: /gfsdata
FS: Device: /dev/gfs_vg/gfslv
FS: Options: rw,hostdata=jid=0:id=65538:first=1,acl
# gfs_growfs should not care about the last slash!
-- Additional comment from email@example.com on 2007-10-22 11:54 EST --
Created an attachment (id=234211)
Patch to fix the problem
This patch takes care of not only trailing slashes but any extras.
For example, /mnt///roth_vg////roth_lv will be correctly interpreted
-- Additional comment from firstname.lastname@example.org on 2007-10-22 11:55 EST --
Requesting ACK flags so I can ship the fix for RHEL5.2.
*** Bug 350561 has been marked as a duplicate of this bug. ***
Created attachment 236761 [details]
patch to fix the problem--try #1
1. Most code paths have been tested.
2. Many of the changed lines of code won't affect anything because
they're #IFDEFed out in gfs2_tool and therefore ignored by the
compiler. I changed the ignored code to make it easier to implement
in the future.
3. There were several instances in the code where the mount path was
being opened. This was only done as a form of validation.
Since this patch now uses canonical names, there is no longer a
need to do this, since we'll find out anyway if the file system is
mounted. An open of "/mnt////gfs2/" will fail anyway. So many of
these opens were taken out.
4. I need to do a little more testing, but this patch seems to work.
Created attachment 237361 [details]
patch to fix the problem (HEAD)
Slightly revised (forgot to take a declare out of gfs2_tool.h that
was there for the future fix to 349601.)
Created attachment 237371 [details]
patch to fix the problem (RHEL5)
Here is the RHEL5 version of the patch. The only difference is in the
The above patches were both tested on system roth-01.
They were committed to CVS at the HEAD and RHEL5 branches for inclusion
in RHEL5.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.