Bug 443541

Summary: Online resize2fs error: Invalid argument While trying to add group #15625
Product: Red Hat Enterprise Linux 5 Reporter: Mark Huth <mhuth>
Component: kernelAssignee: Josef Bacik <jbacik>
Status: CLOSED ERRATA QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.1CC: akarlsso, cward, dzickus, emcnabb, imatusov, lyue, rwheeler, syeghiay, tao
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 515759 (view as bug list) Environment:
Last Closed: 2009-09-02 08:46:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 515759    

Description Mark Huth 2008-04-22 04:04:04 UTC
Description of problem:
Can't perform online resize of ext3 filesystem using resize2fs with a block size
of 1024 bytes.  The following error is reported:
resize2fs: Invalid argument While trying to add group #15625
Instead I have to unmount the filesystem and perform offline resize for it to
complete successfully.

Version-Release number of selected component (if applicable):
resize2fs 1.39 (29-May-2006)

How reproducible:
Everytime.  Customer had a 100G filesystem they wished to expand to 150G and the
error occured.  I have been able to reproduce using sparse loopback files.

Steps to Reproduce:
dd if=/dev/zero of=disk1 seek=1024 count=1 bs=100M
losetup /dev/loop1 disk1 
pvcreate /dev/loop1
vgcreate loopvg1 /dev/loop1
lvcreate -l 100%VG loopvg1 -n looplv1
mkfs.ext3 -J size=64 -b 1024 /dev/loopvg1/looplv1 
mount /dev/loopvg1/looplv1 /mnt/loop
dd if=/dev/zero of=disk2 seek=1024 count=1 bs=50M
losetup /dev/loop2 disk2
pvcreate /dev/loop2
vgextend loopvg1 /dev/loop2
lvextend -l 100%VG /dev/loopvg1/looplv1 
resize2fs /dev/loopvg1/looplv1 
... error!

Actual results:
[root@dhcp-109 testing]# resize2fs /dev/loopvg1/looplv1 
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/loopvg1/looplv1 is mounted on /mnt/loop; on-line resizing
Performing an on-line resize of /dev/loopvg1/looplv1 to 157433856 (1k) blocks.
resize2fs: Invalid argument While trying to add group #15625

Additional info:
Might be related to (or fixed with the patch in)
https://bugzilla.redhat.com/show_bug.cgi?id=425955 but the error is slightly
different and the journal is not as small (although the same block size was
being used).

[root@dhcp-109 testing]# dumpe2fs -h /dev/loopvg1/looplv1 
dumpe2fs 1.39 (29-May-2006)
Filesystem volume name:   <none>
Last mounted on:          <not available>
Filesystem UUID:          a0f4ef33-6885-40e9-9709-f6d9fbe06c57
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype
needs_recovery sparse_super
Default mount options:    (none)
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              16000000
Block count:              128000001
Reserved block count:     6398312
Free blocks:              103212033
Free inodes:              13119477
First block:              1
Block size:               1024
Fragment size:            1024
Reserved GDT blocks:      168
Blocks per group:         8192
Fragments per group:      8192
Inodes per group:         1024
Inode blocks per group:   128
Filesystem created:       Tue Apr 22 13:35:30 2008
Last mount time:          Tue Apr 22 13:42:15 2008
Last write time:          Tue Apr 22 13:42:15 2008
Mount count:              1
Maximum mount count:      21
Last checked:             Tue Apr 22 13:35:30 2008
Check interval:           15552000 (6 months)
Next check after:         Sun Oct 19 13:35:30 2008
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               128
Journal inode:            8
Default directory hash:   tea
Directory Hash Seed:      5927e30d-5927-4614-92b4-f96bb5760089
Journal backup:           inode blocks
Journal size:             64M

Problem also occurs for 32M journal (which is the default size if you don't
specify the '-J size=64' switch with mkfs.ext3).  Haven't tried any other size

Comment 1 Bryn M. Reeves 2008-05-09 10:40:19 UTC
Is anything logged to dmesg at the time of the resize2fs error?

Comment 2 Eric Sandeen 2008-05-10 04:21:38 UTC
Thanks for the detailed report, I'll look into this.

Comment 3 Eric Sandeen 2008-05-10 04:51:59 UTC
the problem persists upstream, with e2fsprogs-1.40.7 and kernel 2.6.25

dmesg yields:

EXT3-fs warning (device dm-2): reserve_backup_gdb: reserved block 491 not at
offset 489

Comment 4 Eric Sandeen 2008-05-22 15:54:38 UTC
Gonna punt this one to Josef.

Comment 5 Josef Bacik 2008-06-11 18:03:24 UTC
patch posted and accepted upstream.

Comment 6 RHEL Product and Program Management 2009-02-16 15:40:28 UTC
Updating PM score.

Comment 7 RHEL Product and Program Management 2009-02-24 17:32:34 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update

Comment 9 Don Zickus 2009-04-27 15:57:33 UTC
in kernel-2.6.18-141.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Please do NOT transition this bugzilla state to VERIFIED until our QE team
has sent specific instructions indicating when to do so.  However feel free
to provide a comment indicating that this fix has been verified.

Comment 11 Chris Ward 2009-07-03 18:02:25 UTC
~~ Attention - RHEL 5.4 Beta Released! ~~

RHEL 5.4 Beta has been released! There should be a fix present in the Beta release that addresses this particular request. Please test and report back results here, at your earliest convenience. RHEL 5.4 General Availability release is just around the corner!

If you encounter any issues while testing Beta, please describe the issues you have encountered and set the bug into NEED_INFO. If you encounter new issues, please clone this bug to open a new issue and request it be reviewed for inclusion in RHEL 5.4 or a later update, if it is not of urgent severity.

Please do not flip the bug status to VERIFIED. Only post your verification results, and if available, update Verified field with the appropriate value.

Questions can be posted to this bug or your customer or partner representative.

Comment 23 errata-xmlrpc 2009-09-02 08:46:51 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.


Comment 25 Niels de Vos 2011-05-27 12:48:10 UTC
The URL for the ERRATA seems to be broken. The correct URL is:


Comment 26 Niels de Vos 2011-05-27 12:54:03 UTC
Hmpf... are URLs maybe filtered in Bugzilla now?

http://rhn.redhat.com/errata/ + RHSA + -2009- + 1243.html

Comment 27 yuelinang 2013-07-12 07:37:05 UTC
I encountered this bug on customer's rhel of 5.4, all the same information:

os info :
Linux version 2.6.18-164.el5 (mockbuild@x86-003.build.bos.redhat.com)

resize2fs error info:
16:44:33 mremap(0x2b1f6dd34000, 217088, 245760, MREMAP_MAYMOVE) = 0x2b1f6dd34000 <0.000028>
16:44:33 write(1, "Performing an on-line resize of "..., 85) = 85 <0.000055>
16:44:33 ioctl(4, 0x40086607, 0x7fff8eaa3d1c) = 0 <0.002852>
16:44:33 ioctl(4, 0x40186608, 0x7fff8eaa3cf0) = -1 EINVAL (Invalid argument) <0.027114>
16:44:33 write(2, "resize2fs", 9)       = 9 <0.000101>
16:44:33 write(2, ": ", 2)              = 2 <0.000023>
16:44:33 write(2, "Invalid argument", 16) = 16 <0.000120>
16:44:33 write(2, " ", 1)               = 1 <0.000036>
16:44:33 write(2, "While trying to add group #6656", 31) = 31 <0.000037>
16:44:33 write(2, "\r\n", 2)            = 2 <0.000033>
16:44:33 exit_group(1)                  = ?