RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1285227 - un backport for the bug resize2fs: fix off-line resize of file systems with flex_bg && !resize_inode
Summary: un backport for the bug resize2fs: fix off-line resize of file systems with f...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: e2fsprogs
Version: 6.7
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Eric Sandeen
QA Contact: Boyang Xue
URL:
Whiteboard:
Depends On:
Blocks: 1269194 1324930
TreeView+ depends on / blocked
 
Reported: 2015-11-25 09:17 UTC by sieutruc
Modified: 2020-05-14 15:03 UTC (History)
7 users (show)

Fixed In Version: e2fsprogs-1.41.12-23.el6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-21 11:54:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
resize2fs: fix off-line resize of file systems with flex_bg && !resize_inode (15.21 KB, text/plain)
2015-11-25 09:17 UTC, sieutruc
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0790 0 normal SHIPPED_LIVE e2fsprogs bug fix update 2017-03-21 12:50:21 UTC

Description sieutruc 2015-11-25 09:17:22 UTC
Created attachment 1098635 [details]
resize2fs: fix off-line resize of file systems with flex_bg && !resize_inode

Description of problem:
When trying to resize the new partition from very small size to a size bigger than the origin 1000 times, i got the problem when using the command fsck.

For example: creating a new logical volume of 16M, after that, resizing it to 20G. 

I found that it came from the command "resize2fs"

Version of e2fsprogs that cause the problem : 1.41.12 -> 1.42.7 

Version OS: RHEL 6 (6.7) or Centos 6 (6.7)


How reproducible:


Steps to Reproduce:
1.  export VG=vg_centos6
2.  lvcreate -L16M -n test $VG
3.  mkfs.ext4 /dev/$VG/test
4.  fsck -fn /dev/$VG/test   // no problem 
5.  lvresize -L20G /dev/$VG/test
6.  resize2fs /dev/$VG/test  
7.  fsck -fn /dev/$VG/test  // check again and this command shows a lot of errors

Actual results:

2fsck 1.41.12 (17-May-2010)
fsck.ext4: Group descriptors look bad... trying backup blocks...
Pass 1: Checking inodes, blocks, and sizes
Group 2's block bitmap at 84 conflicts with some other fs block.
Relocate? no

Group 14's block bitmap at 81 conflicts with some other fs block.
Relocate? no

Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Block bitmap differences:  -(16385--20621) -114689 -(114707--114710) -114713 -114721 -114725 -(114739--114742) -114745 -114753 -114758 -(114771--114774) -114777 -(114790--114796) -114812 -114833 -114835 -114929 -114931 -114934 -114936 -(114943--114944) -114946 -(114963--114966) -114969 -114978 -114981 -(114995--114998) -115001 -115009 -115014 -115017 -(115027--115030) -115033 -115054 -115068 -(115089--115091) -(115186--115189) -115191 -115195 -115199 -(115201--115202) -(115219--115222) -115225 -(115233--115234) -115237 -(115251--115254) -115257 -115265 -115270 -115274 -(115283--115286) -115289 -115310 -115324 -(115345--115347) -115443 -115445 -(115448--115452) -115454 -115456 -115459 -(115475--115478) -115481 -115491 -115493 -(115507--115510) -115513 -115521 -11552 
....
(15869953--15876096) -(16001025--16007168) -(16132097--16138240) -(16263169--16269312) -(16394241--16400384) -(16525313--16531456) -(16656385--16662528)
Fix? no

Free blocks count wrong for group #2 (8192, counted=3955).
Fix? no

Free blocks count wrong for group #14 (8192, counted=6932).
Fix? no

Free blocks count wrong for group #177 (8192, counted=2048).
Fix? no

Free blocks count wrong for group #193 (8192, counted=2048).
Fix? no

......
Free blocks count wrong (20308626, counted=19590425).
Fix? no


/dev/mapper/datavg-test: ***** FILE SYSTEM WAS MODIFIED *****

/dev/mapper/datavg-test: ********** WARNING: Filesystem still has errors **********

/dev/mapper/datavg-test: 11/5242880 files (9.1% non-contiguous), 662894/20971520 blocks
Error writing block 2 (Attempt to write block from filesystem resulted in short write).  Ignore error? no

Error writing block 3 (Attempt to write block from filesystem resulted in short write).  Ignore error? no

Error writing block 4 (Attempt to write block from filesystem resulted in short write).  Ignore error? no

Error writing block 5 (Attempt to write block from filesystem resulted in short write).  Ignore error? no

Expected results:

fsck does pass all the check like the following :

e2fsck 1.41.12 (17-May-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/vg_centos6/test: 11/5242880 files (9.1% non-contiguous), 662896/20971520 blocks


Additional info:

i have already created a patch for this bug. Actually, this bug has been fixed in version 1.42.8 of e2fsprogs on centos 7 but it is not backported to centos 6.7.

What i did in the patch is to bring the modification from the commit "f026f1a37061a021f7188c9e45d0fbff1bde9e60" and ajust some places in order to make it work with the current version of e2fsprogs.

You can find my patch in file attachment.

Comment 10 errata-xmlrpc 2017-03-21 11:54:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2017-0790.html


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