resize2fs fails with a high inode density.
Issue
-
resize2fs fails with a high inode density.
For example, the reproducer is below.1. Prepare 250 GB PV. 2. Create VG and 70GB LV 3. Create a filesystem into the 70GB's LV. 4. Extend the LV to 220GB. 5. Run resize2fs to the volume and the command will fail. The procedure with commands is below. # pvcreate /dev/vdb # vgcreate vg_test # lvcreate -n lv_test --size 70G vg_test # mkfs.ext4 -b 1024 -g 8192 -N 73400320 -j -v -O large_file -E stride=9494 -t ext4 /dev/mapper/vg_test-lv_test 73400320 # lvextend --size +150G /dev/mapper/vg_test-lv_test # resize2fs /dev/mapper/vg_test-lv_testThe sample error output is below
# resize2fs /dev/mapper/test-lv_test resize2fs 1.43.4 (31-Jan-2017) Resizing the filesystem on /dev/mapper/vg_test-lv_test to 230686720 (1k) blocks. resize2fs: Could not allocate block in ext2 filesystem while trying to resize /dev/mapper/vg_test-lv_test Please run 'e2fsck -fy /dev/mapper/vg_test-lv_test' to fix the filesystem after the aborted resize operation.
Environment
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- e2fsprogs package
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.