Bug 982871
| Summary: | cannot online enlarge over 16T ext4 to larger if mkfs with -O 64bit option | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Eryu Guan <eguan> |
| Component: | e2fsprogs | Assignee: | Lukáš Czerner <lczerner> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Eryu Guan <eguan> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.0 | CC: | lczerner |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | e2fsprogs-1.42.9-4.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-06-13 10:02:11 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Agreed; thanks for finding this. I also need to take Lukas' patch which enables 64bit by default. We should re-check with both of those patches in place to make sure everything works properly... Verified with e2fsprogs-1.42.9-4.el7, resize2fs could do online-enlarge on a over-16T ext4, and e2fsck finds nothing error.
For the enable 64bit feature by default in mke2fs, I'll do full xfstests test and regression test on ext4.
[root@hp-dl388g8-01 resize]# truncate -s 50t fs.img
[root@hp-dl388g8-01 resize]# mkfs -t ext4 -O 64bit -F fs.img 17t
mke2fs 1.42.9 (28-Dec-2013)
Discarding device blocks: done
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
285212672 inodes, 4563402752 blocks
228170137 blocks (5.00%) reserved for the super user
First data block=0
139264 block groups
32768 blocks per group, 32768 fragments per group
2048 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848, 512000000, 550731776, 644972544, 1934917632,
2560000000, 3855122432
Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
[root@hp-dl388g8-01 resize]# losetup -f
/dev/loop4
[root@hp-dl388g8-01 resize]# losetup -f fs.img
[root@hp-dl388g8-01 resize]# mount /dev/loop4 /mnt/ext4
[root@hp-dl388g8-01 resize]# resize2fs /dev/loop4
resize2fs 1.42.9 (28-Dec-2013)
Filesystem at /dev/loop4 is mounted on /mnt/ext4; on-line resizing required
old_desc_blocks = 2176, new_desc_blocks = 6400
The filesystem on /dev/loop4 is now 13421772800 blocks long.
[root@hp-dl388g8-01 resize]# umount /mnt/ext4
[root@hp-dl388g8-01 resize]# e2fsck -nf /dev/loop4
e2fsck 1.42.9 (28-Dec-2013)
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/loop4: 11/838860800 files (0.0% non-contiguous), 53347872/13421772800 blocks
[root@hp-dl388g8-01 resize]#
This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. |
Description of problem: resize2fs cannot do online enlarge if 64bit feature is enabled explicitly at mkfs time. [root@ibm-x3690x5-01 resize]# uname -a Linux ibm-x3690x5-01.rhts.eng.nay.redhat.com 3.10.0-0.rc7.64.el7.x86_64 #1 SMP Tue Jun 25 10:00:04 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux [root@ibm-x3690x5-01 resize]# rpm -q e2fsprogs e2fsprogs-1.42.7-2.el7.x86_64 [root@ibm-x3690x5-01 resize]# truncate -s 50t fs.img [root@ibm-x3690x5-01 resize]# mkfs -t ext4 -O 64bit -F fs.img 17t mke2fs 1.42.7 (21-Jan-2013) Discarding device blocks: done Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 285212672 inodes, 4563402752 blocks 228170137 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=6710886400 139264 block groups 32768 blocks per group, 32768 fragments per group 2048 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 102400000, 214990848, 512000000, 550731776, 644972544, 1934917632, 2560000000, 3855122432 Allocating group tables: done Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done [root@ibm-x3690x5-01 resize]# losetup -f /dev/loop0 [root@ibm-x3690x5-01 resize]# losetup /dev/loop0 fs.img [root@ibm-x3690x5-01 resize]# mount /dev/loop0 /mnt/ext4 [root@ibm-x3690x5-01 resize]# resize2fs /dev/loop0 resize2fs 1.42.7 (21-Jan-2013) Filesystem at /dev/loop0 is mounted on /mnt/ext4; on-line resizing required old_desc_blocks = 2176, new_desc_blocks = 6400 resize2fs: Invalid argument While checking for on-line resizing support And dmesg shows: [270491.166051] EXT4-fs (loop0): mounted filesystem with ordered data mode. Opts: (null) [270491.173946] SELinux: initialized (dev loop0, type ext4), uses xattr [270500.004850] EXT4-fs (loop0): resizing filesystem from 4563402752 to 13421772800 blocks [270510.011347] EXT4-fs (loop0): resized to 4710727680 blocks [270520.045883] EXT4-fs (loop0): resized to 4852809728 blocks [270530.058412] EXT4-fs (loop0): resized to 4991746048 blocks [270540.097639] EXT4-fs (loop0): resized to 5123866624 blocks [270550.131691] EXT4-fs (loop0): resized to 5256511488 blocks [270560.133524] EXT4-fs (loop0): resized to 5383389184 blocks [270570.137817] EXT4-fs (loop0): resized to 5509218304 blocks [270580.151840] EXT4-fs (loop0): resized to 5629804544 blocks [270590.167257] EXT4-fs (loop0): resized to 5748293632 blocks [270594.974925] EXT4-fs warning (device loop0): verify_reserved_gdb:700: reserved GDT 2769 missing grp 177147 (5804755665) [270594.985813] EXT4-fs (loop0): resized filesystem to 6710886400 [270595.738493] EXT4-fs warning (device loop0): ext4_group_extend:1710: can't shrink FS - resize aborted Version-Release number of selected component (if applicable): e2fsprogs-1.42.7-2.el7 How reproducible: always Steps to Reproduce: 1. truncate -s 50t fs.img 2. losetup /dev/loop0 fs.img 3. mkfs -t ext4 -O 64bit /dev/loop0 4. mount /dev/loop0 /mnt/ext4 5. resize2fs /dev/loop0 Actual results: resize2fs reports "resize2fs: Invalid argument While checking for on-line resizing support" Expected results: resize2fs could enlarge fs Additional info: I proposed a patch for mke2fs upstream to disable resize_inode feature when creating >16T ext4 with 64bit feature enabled http://www.spinics.net/lists/linux-ext4/msg38920.html