Bug 829239 - Resizing an Ext4 File System should use ext4 tools instead of ext2 tools
Resizing an Ext4 File System should use ext4 tools instead of ext2 tools
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: doc-Storage_Admin_Guide (Show other bugs)
6.4
Unspecified Linux
unspecified Severity medium
: rc
: ---
Assigned To: Jacquelynn East
ecs-bugs
: Documentation
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-06 05:54 EDT by mertensb
Modified: 2015-07-26 18:10 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-10-14 22:59:14 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)

  None (edit)
Description mertensb 2012-06-06 05:54:20 EDT
Description of problem:
Chapter "9.3. Resizing an Ext4 File System" describes resizig an ext4 partition using the tool resize2fs.

This should be resize4fs instead.

Version-Release number of selected component (if applicable):
Tested on RHEL5.8, using resize2fs fails while resize4fs works.

How reproducible:
always

Steps to Reproduce:
1. Create new partition /dev/sdb2
2. create Physical volume of that partiton (sudo /usr/sbin/pvcreate /dev/sdb2)
3. extend volume group with this PV (sudo /usr/sbin/vgextend VGora /dev/sdb2)
4. extend logical volume with all available extents (sudo /usr/sbin/lvextend /dev/mapper/VGora-oradata -l +20479)
5. Attempt to resize the ext4 partition using resize2fs

Actual results:
$ sudo /sbin/resize2fs /dev/mapper/VGora-oradata
resize2fs 1.39 (29-May-2006)
/sbin/resize2fs: Filesystem has unsupported feature(s) while trying to open /dev/mapper/VGora-oradata
Couldn't find valid filesystem superblock.

Using e2fsck also returns unexpected results:
[mertensb@ccebsdb ~]$ sudo umount /u01/
[mertensb@ccebsdb ~]$ sudo /sbin/e2fsck -f /dev/mapper/VGora-oradata
e2fsck 1.39 (29-May-2006)
/sbin/e2fsck: Filesystem has unsupported feature(s) while trying to open /dev/mapper/VGora-oradata

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>


Expected results:
File system extended (online) withot errors.

Additional info:

Using e4 tools works:
[mertensb@ccebsdb ~]$ sudo /sbin/resize4fs /dev/mapper/VGora-oradata
resize4fs 1.41.12 (17-May-2010)
Please run 'e4fsck -f /dev/mapper/VGora-oradata' first.

[mertensb@ccebsdb ~]$ sudo /sbin/e4fsck -f /dev/mapper/VGora-oradata
e4fsck 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/mapper/VGora-oradata: 11/9830400 files (0.0% non-contiguous), 664949/39320576 blocks
[mertensb@ccebsdb ~]$ sudo /sbin/resize4fs /dev/mapper/VGora-oradata
resize4fs 1.41.12 (17-May-2010)
Resizing the filesystem on /dev/mapper/VGora-oradata to 60291072 (4k) blocks.
The filesystem on /dev/mapper/VGora-oradata is now 60291072 blocks long.
Comment 5 mertensb 2012-09-14 03:41:40 EDT
Not sure if this question is directed at me but I'll add what I can.

The errors above are from a RHEL5 system.

On a RHEL6 system sudo yum install e4fsprogs gives:
[mertensb@buildsrv ~]$ sudo yum install e4fsprogs
[sudo] password for mertensb:
Loaded plugins: product-id, rhnplugin, security, subscription-manager
Updating certificate-based repositories.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package e2fsprogs.x86_64 0:1.41.12-11.el6 will be updated
---> Package e2fsprogs.x86_64 0:1.41.12-12.el6 will be an update
--> Processing Dependency: libss = 1.41.12-12.el6 for package: e2fsprogs-1.41.12-12.el6.x86_64
--> Processing Dependency: libcom_err = 1.41.12-12.el6 for package: e2fsprogs-1.41.12-12.el6.x86_64
--> Processing Dependency: e2fsprogs-libs = 1.41.12-12.el6 for package: e2fsprogs-1.41.12-12.el6.x86_64
--> Running transaction check
---> Package e2fsprogs-libs.x86_64 0:1.41.12-11.el6 will be updated
---> Package e2fsprogs-libs.x86_64 0:1.41.12-12.el6 will be an update
---> Package libcom_err.x86_64 0:1.41.12-11.el6 will be updated
---> Package libcom_err.x86_64 0:1.41.12-12.el6 will be an update
---> Package libss.x86_64 0:1.41.12-11.el6 will be updated
---> Package libss.x86_64 0:1.41.12-12.el6 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================================
 Package                                   Arch                              Version                                   Repository                                       Size
=============================================================================================================================================================================
Updating:
 e2fsprogs                                 x86_64                            1.41.12-12.el6                            rhel-x86_64-server-6                            551 k
Updating for dependencies:
 e2fsprogs-libs                            x86_64                            1.41.12-12.el6                            rhel-x86_64-server-6                            119 k
 libcom_err                                x86_64                            1.41.12-12.el6                            rhel-x86_64-server-6                             36 k
 libss                                     x86_64                            1.41.12-12.el6                            rhel-x86_64-server-6                             40 k

Transaction Summary
=============================================================================================================================================================================
Upgrade       4 Package(s)

Total download size: 746 k

[mertensb@buildsrv ~]$ rpm -ql e2fsprogs|grep resize
/sbin/resize2fs
/usr/share/man/man8/resize2fs.8.gz
Comment 6 Jacquelynn East 2012-09-17 19:32:20 EDT
So, correct me if I'm wrong, but this should have been for the RHEL5 Online Storage Reconfiguration Guide, not the RHEL6 Storage Administration Guide?
Comment 7 Jacquelynn East 2012-10-01 21:08:47 EDT
Setting NeedInfo deadline to October 9th. Please clarify this issue before then, otherwise the change will be reverted based on comment 4 and the bug moved to 6.5
Comment 8 Eric Sandeen 2012-10-14 22:18:05 EDT
> Description of problem:
> Chapter "9.3. Resizing an Ext4 File System" describes resizig an ext4 partition > using the tool resize2fs.

> This should be resize4fs instead.

Only for RHEL5.  But this bug is filed against RHEL6, which makes it NOTABUG I think.

For RHEL6, resize2fs is correct (there is no resize4fs on RHEL6, rhel5 had copies of newer e2fsprogs just for ext4 administration).
Comment 10 Jacquelynn East 2012-10-14 22:59:14 EDT
Thanks for that Eric. Reverting changes and closing the bug.

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