IBM Support

resize2fs failed while extending ext4 filesystem

Troubleshooting


Problem

While increasing filesystem over resize2fs, it failed complainig max inodes number

Symptom

[root@prod~]# resize2fs -p /dev/vg_san_backup/lv_san_backup
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/vg_san_backup/lv_san_backup is mounted on /SAN/Backup; on-line resizing required
old desc_blocks = 512, new_desc_blocks = 1536
inodes (6442450944) must be less than 4294967295resize2fs: Cannot create filesystem with requested number of inodes while trying to resize /dev/vg_san_backup/lv_san_backup
Please run 'e2fsck -fy /dev/vg_san_backup/lv_san_backup' to fix the filesystem
after the aborted resize operation.


Cause


ext2/ext3/ext4 have inode number limit as 2^32 (4294967296), and combined with bytes-per-inodes the maximum size of the filesystem is defined.

In this case, when the filesystem was created, bytes-per-inodes was set to 1024.

Therefore, The max of fiesystem was around 4TB

Diagnosing The Problem

1. run command as follow to have information

># tune2fs <filesystem>

example:

># tune2fs /dev/vg_san_backup/lv_san/backup

2. calculate bytes-per-inodes from the information

"bytes-per-inode" = "block count" x "block size" / "inode count"

3. calculate maximum size

"maximum size" = 2^32 * "bytes-per-inode"

4. compare it to the size to increase if the new size is bigger than maximum size

Resolving The Problem

1. Normally default bytes-per-inode is enough, so check default value

># grep inode_ratio /etc/mke2fs.conf | head -1

2. compare the maximum size with the inode_ratio to new size

3. If it's bigger than new size, recreate filesystem.

># mkfs.ext4 /dev/vg_san_backup/lv_san/backup

# recreating new filesystem is only way to set new bytes-per-inode, make backup plan properly before recreating filesystem

[{"Product":{"code":"SSULQD","label":"IBM PureData System"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"--","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.0.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

More support for:
IBM PureData System

Software version:
1.0.0

Document number:
544233

Modified date:
17 October 2019

UID

swg21978449