Bug 688734 - gfs2_convert exits with success without doing anything
Summary: gfs2_convert exits with success without doing anything
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: cluster
Version: 6.1
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: rc
: ---
Assignee: Abhijith Das
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks: 630005
TreeView+ depends on / blocked
 
Reported: 2011-03-17 21:10 UTC by Nate Straz
Modified: 2011-05-19 12:54 UTC (History)
9 users (show)

Fixed In Version: cluster-3.0.12-41.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-19 12:54:55 UTC
Target Upstream Version:


Attachments (Terms of Use)
RHEL6.1 patch to fix this issue (563 bytes, patch)
2011-03-21 16:21 UTC, Abhijith Das
no flags Details | Diff
corrected patch (558 bytes, patch)
2011-03-21 22:21 UTC, Abhijith Das
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0537 0 normal SHIPPED_LIVE cluster and gfs2-utils bug fix update 2011-05-18 17:57:40 UTC

Description Nate Straz 2011-03-17 21:10:14 UTC
Description of problem:

Running GFS2 regression tests shows that gfs2_convert is not working at all.

[root@west-02 ~]# gfs2_convert -vy /dev/wic/bigdir
gfs2_convert version 3.0.12 (built Feb 28 2011 07:00:42)
Copyright (C) Red Hat, Inc.  2004-2010  All rights reserved.

Unable to fill in resource group information.
Examining file system[root@west-02 ~]# echo $?
0
[root@west-02 ~]# ls



Version-Release number of selected component (if applicable):
gfs2-utils-3.0.12-35.el6.x86_64

How reproducible:
Every time

Steps to Reproduce:
1. Try to convert ANY GFS file system
2.
3.
  
Actual results:

GFS remains as GFS

Expected results:

GFS converted to GFS2


Additional info:

Comment 1 Abhijith Das 2011-03-17 22:15:53 UTC
Seems like bob's patch to 576640: "fsck.gfs2: can't repair rgrps resulting from gfs_grow->gfs2_convert" has changed something in libgfs2 that has broken gfs2_convert. I removed that patch from the build and convert seems to be working fine. I haven't figured out a solution yet, but it should be easily fixable

Comment 2 Abhijith Das 2011-03-21 16:21:24 UTC
Created attachment 486636 [details]
RHEL6.1 patch to fix this issue

The patch to bug 576640 mentioned earlier added a sanity check (gfs2_check_range()) to the codepath of gfs1_ri_update() that's used by gfs2_convert. This new check requires the value of sbp->fssize to be initialized to a valid non-zero size, which gfs2_convert does not do. The check fails and gfs2_convert bails out. This patch initializes sbp->fssize to the device size and the check is successful and gfs2_convert runs to completion as expected.

Comment 3 Abhijith Das 2011-03-21 16:44:08 UTC
Pushed above patch to upstream gfs2-utils.git tree:
ae17f725f37fccaf59087994b54ffdcdb782fa81

and to RHEL6 cluster.git tree:
508b868e8c22a4dc454a406d9a1c0a32af94c21e

Comment 4 Nate Straz 2011-03-21 21:36:31 UTC
I tried out gfs2-utils-3.0.12-40.el6.x86_64 and found it did work for 4k block sizes, but when I tried 512 byte block size for our large directory test case, it would exit with a zero exit status and do nothing.

[root@west-02 ~]# gfs2_convert /dev/wic/bigdir; echo $?
gfs2_convert version 3.0.12 (built Mar 21 2011 13:28:41)
Copyright (C) Red Hat, Inc.  2004-2010  All rights reserved.

Unable to fill in resource group information.
Examining file system0

Comment 5 Abhijith Das 2011-03-21 22:21:23 UTC
Created attachment 486700 [details]
corrected patch

The placement of the one-liner in the previous patch was incorrect. Block size was still the default 4K instead of the actual blocksize read from the gfs1 superblock. This is the corrected patch that works for all supported block sizes.

Comment 6 Steve Whitehouse 2011-03-22 09:35:45 UTC
Abhi, the patch should have been posted to cluster-devel for review before pushing to the upstream tree. It looks ok to me though.

Comment 8 Nate Straz 2011-03-22 20:45:34 UTC
Verified -41.el6 rpm is making it through gfs2_convert regression tests.

Comment 9 Nate Straz 2011-03-23 16:05:45 UTC
I found another instance where I can evoke this behavior.  If I grow a file system with gfs_grow before I convert, I get the same result.

Can I get two parts to fixing this?  

1) Make sure gfs2_convert returns non-zero if it hits an error from libgfs
2) fix the new failure with grown file systems.

Thanks,

Nate

Comment 10 Nate Straz 2011-03-23 18:39:10 UTC
Comment #9 was caused by a bug in my test case.  I'm not using clustered lvm so I need to reactivate the LV on the second host so it sees the extended size.

Moving back to verified.

Comment 11 errata-xmlrpc 2011-05-19 12:54:55 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


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