Bug 676311

Summary: gfs2_convert never ends on i686
Product: Red Hat Enterprise Linux 5 Reporter: Jaroslav Kortus <jkortus>
Component: gfs2-utilsAssignee: Abhijith Das <adas>
Status: CLOSED DUPLICATE QA Contact: Cluster QE <mspqa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 5.6CC: bmarzins, edamato, rpeterso, swhiteho
Target Milestone: rc   
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-10 18:30:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jaroslav Kortus 2011-02-09 13:31:14 UTC
Description of problem:
gfs2_convert process never ends on i686

Version-Release number of selected component (if applicable):
gfs2-utils-0.1.62-28.el5

How reproducible:
100%


Steps to Reproduce:
1. gfs2_edit restoremeta /net/z2/shared/gfs1-90001files.dat.metadata /dev/loop0
2. gfs2_convert /dev/loop0
3.
  
Actual results:
Probably endless loop, inodes count way above the real inodes in the FS.

Expected results:
Successful meta save

Additional info:
The FS tested was really small one (2G), 512b block size, 90000 files in one dir, i686.

(05:43:26) [root@z1:/mnt/tmpfs]$ gfs2_convert /dev/loop0
gfs2_convert version 2 (built Oct 14 2010 14:56:11)
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.
Convert /dev/loop0 from GFS1 to GFS2? (y/n)y
Converting resource groups.
Converting inodes.
44279362 inodes from 1 rgs converted. <<-- CTRL-C pressed here

Compare to rhel6 (gfs2-utils-3.0.12-23.el6_0.6.x86_64):
[root@z2 experiments]# time gfs2_convert /dev/loop0 
gfs2_convert version 3.0.12 (built Dec  1 2010 13:41:37)
Copyright (C) Red Hat, Inc.  2004-2010  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.
Convert /dev/loop0 from GFS1 to GFS2? (y/n)y
Converting resource groups.

Converting inodes.
90008 inodes from 8 rgs converted.
Fixing file and directory information.
0 cdpn symlinks moved to empty directories.
Converting journals.
Converting journal space to rg space.
Writing journal #1...done.
Writing journal #2...done.
Writing journal #3...done.
Building GFS2 file system structures.
Removing obsolete GFS1 file system structures.
Committing changes to disk.
/dev/loop0: filesystem converted successfully to gfs2.

real    4m7.753s
user    3m23.823s
sys     0m8.582s

Comment 1 Robert Peterson 2011-02-10 14:00:52 UTC
I tried to recreate this with the latest cluster.git repo
for 5.7.  It did not recreate.  Then again, I did not use
a loopback device.  This may be a duplicate of bug #667769
because that fix is now in the repo.

[root@trin-10 ../gfs2/convert]# gfs2_edit restoremeta /home/bob/metadata/gfs1-90001files.dat.metadata /dev/VolGroup01/LogVol00
There are 77930496 blocks of 512 bytes in the destination file system.

448083 metadata blocks (218MB) restored.    
File /home/bob/metadata/gfs1-90001files.dat.metadata restore successful.
[root@trin-10 ../gfs2/convert]# ./gfs2_convert /dev/VolGroup01/LogVol00 
gfs2_convert version 2 (built Feb  9 2011 21:05:39)
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.
Convert /dev/VolGroup01/LogVol00 from GFS1 to GFS2? (y/n)y
Converting resource groups.
Converting inodes.
90006 inodes from 8 rgs converted.
Fixing file and directory information.
0 cdpn symlinks moved to empty directories.
Converting journals.
Converting journal space to rg space.
Writing journal #1...done.
Writing journal #2...done.
Writing journal #3...done.
Building GFS2 file system structures.
Removing obsolete GFS1 file system structures.
Committing changes to disk.
/dev/VolGroup01/LogVol00: filesystem converted successfully to gfs2.
[root@trin-10 ../gfs2/convert]# 
[root@trin-10 ../gfs2/convert]# uname -a
Linux trin-10 2.6.18-164.11.1.el5 #1 SMP Wed Jan 6 13:26:31 EST 2010 i686 i686 i386 GNU/Linux

I tried the older version on this system, and it was also
successful:
[root@trin-10 ../gfs2/convert]# gfs2_edit restoremeta /home/bob/metadata/gfs1-90001files.dat.metadata /dev/VolGroup01/LogVol00
There are 77930496 blocks of 512 bytes in the destination file system.

448083 metadata blocks (218MB) restored.    
File /home/bob/metadata/gfs1-90001files.dat.metadata restore successful.
[root@trin-10 ../gfs2/convert]# gfs2_convert /dev/VolGroup01/LogVol00 
gfs2_convert version 2 (built Jul 27 2009 16:19:28)
(successful conversion with the same output)

We might have to borrow Jaroslav's machine to debug it.

Comment 2 Abhijith Das 2011-02-10 18:30:37 UTC
I saw the same things as Bob did, but with a real device on Jaroslav's machine. And, I agree with Bob that this is likely a duplicate of bug 667769. I could hit it with gfs2-utils-0.1.62-28.el5 installed there, but with the RHEL57 git branch of the cluster.git tree, gfs2_convert completed successfully. I'm marking this a duplicate of bug 667769.

*** This bug has been marked as a duplicate of bug 667769 ***