Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 636157

Summary: gfs2_convert doesn't resume after interrupted conversion
Product: Red Hat Enterprise Linux 5 Reporter: Abhijith Das <adas>
Component: gfs2-utilsAssignee: Abhijith Das <adas>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: low    
Version: 5.6CC: adrew, edamato, rpeterso, ssaha, swhiteho
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: gfs2-utils-0.1.62-27.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 637913 (view as bug list) Environment:
Last Closed: 2011-01-13 23:21:36 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:
Bug Depends On:    
Bug Blocks: 637913    
Attachments:
Description Flags
Patch to not convert jindex, rindex inodes none

Description Abhijith Das 2010-09-21 15:15:16 UTC
[root@shell-02 ~]# mkfs.gfs -j20 -p lock_dlm -t shell:gfs /dev/no_clu_vg/cust -O
Device:                    /dev/no_clu_vg/cust
Blocksize:                 4096
Filesystem Size:           4025584664
Journals:                  20
Resource Groups:           15358
Locking Protocol:          lock_dlm
Lock Table:                shell:gfs

Syncing...
All Done


[root@shell-02 ~]# gfs2_convert -vy /dev/no_clu_vg/cust
gfs2_convert version 2 (built Sep 20 2010 15:51:35)
Copyright (C) Red Hat, Inc.  2004-2006  All rights reserved.

Examining file system.........................................................................................................................................................
This program will convert a gfs1 filesystem to a gfs2 filesystem.
WARNING: This can't be undone.  It is strongly advised that you:

   1. Back up your entire filesystem first.
   2. Run gfs_fsck first to ensure filesystem integrity.
   3. Make sure the filesystem is NOT mounted from any node.
   4. Make sure you have the latest software versions.
Converting resource groups..........................................................................................................................................................
Converting inodes.
6 inodes from 15358 rgs converted.
Fixing file and directory information.
0 cdpn symlinks moved to empty directories.
Converting journals.
Converting journal space to rg space.
Addr 77fb0000 comes after rg at addr 77f70009
Addr 77fb8000 comes after rg at addr 77fb0000
Addr 77fc0000 comes after rg at addr 77fb8000
Addr 77fc8000 comes after rg at addr 77fc0000
Addr 77fd0000 comes after rg at addr 77fc8000
Addr 77fd8000 comes after rg at addr 77fd0000
Addr 77fe0000 comes after rg at addr 77fd8000
Addr 77fe8000 comes after rg at addr 77fe0000
Addr 77ff0000 comes after rg at addr 77fe8000
Addr 77ff8000 comes after rg at addr 77ff0000
Addr 78000000 comes after rg at addr 77ff8000
Addr 78008000 comes after rg at addr 78000000
Addr 78010000 comes after rg at addr 78008000
Addr 78018000 comes after rg at addr 78010000
Addr 78020000 comes after rg at addr 78018000
Addr 78028000 comes after rg at addr 78020000
Addr 78030000 comes after rg at addr 78028000
Addr 78038000 comes after rg at addr 78030000
Addr 78040000 comes after rg at addr 78038000
Addr 78048000 comes after rg at addr 78040000
Writing journal #1...
<---------- killed here -------------->

[root@shell-02 ~]# gfs2_convert -vy /dev/no_clu_vg/cust
gfs2_convert version 2 (built Sep 20 2010 15:51:35)
Copyright (C) Red Hat, Inc.  2004-2006  All rights reserved.

Unable to fill in resource group information.
Examining file system

<---- restarted convert above fails --->

There's also another instance where the jindex inode (when height > 0) is converted to gfs2 format and committed to disk midway during the conversion process. When gfs2_convert is interrupted after this, the subsequent gfs2_convert is unable to read the already converted jindex (expecting gfs1 format) and convert fails. Interrupted gfs2_converts need revisiting.

Comment 2 Abhijith Das 2010-09-27 16:53:03 UTC
Created attachment 449970 [details]
Patch to not convert jindex, rindex inodes

This patch causes the inode conversion routine to skip over the jindex and rindex inodes. Without this patch, the jindex and rindex inodes are converted to gfs2 format and once converted, there's no way to go back to gfs1 for these two inodes were the convert to be interrupted somehow. In the eyes of the subsequent gfs2_convert run, these two inodes would be corrupt and gfs2_convert would bail out of the conversion.
Skipping conversion of these two inodes doesn't affect gfs2_convert as these two inodes are freed from disk towards the end of the conversion process. New jindex and rindex inodes are created for gfs2 separately in the master directory.

Note: This issue with reconversion failing occurs only when the jindex/rindex inodes are unstuffed. When stuffed, gfs1 and gfs2 inodes have a similar structure, so it doesn't matter if these inodes are converted or not, however with inode height > 0 the structures of gfs1 and gfs2 differ.

Comment 3 Abhijith Das 2010-09-27 18:13:46 UTC
Checked in above patch to RHEL56 git branch

Comment 4 Robert Peterson 2010-09-27 20:53:26 UTC
Build 2783404 successful.  Changing status to Modified.
This fix is in gfs2-utils-0.1.62-27.el5.

Comment 7 errata-xmlrpc 2011-01-13 23:21:36 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-0135.html