Bug 1285227 - un backport for the bug resize2fs: fix off-line resize of file systems with flex_bg && !resize_inode
un backport for the bug resize2fs: fix off-line resize of file systems with f...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: e2fsprogs (Show other bugs)
6.7
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: Eric Sandeen
Boyang Xue
: Patch, Reproducer
Depends On:
Blocks: 1269194 1324930
  Show dependency treegraph
 
Reported: 2015-11-25 04:17 EST by sieutruc
Modified: 2017-09-01 14:44 EDT (History)
7 users (show)

See Also:
Fixed In Version: e2fsprogs-1.41.12-23.el6
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-03-21 07:54:47 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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 04:17 EST, sieutruc
no flags Details

  None (edit)
Description sieutruc 2015-11-25 04:17:22 EST
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 07:54:47 EDT
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.