e2fsprogs
e2fsprogs copied to clipboard
Error when running resize2fs on a filesystem from 180TB to 360TB?
I created a filesystem with size 180TB, and I try to resize it to size 360TB. resize2fs fails with the error "New size results in too many block group descriptors".
However, creating a 360TB filesystem from scratch works.
Given the parameters of the 180TB filesystem, the error is triggered because the new Block count (96636764160) divided by Blocks per group (32768) divided by Group descriptor size (64), would exceed Blocks per group.
Since the value of Blocks per group cannot be higher than 8 * block_size (32768) in mke2fs, is this an absolute limitation of resize2fs?
As far as I can see, the check is too strict.
Enlarging the filesystem past that limit should be okay when the META_BG feature is enabled (in which case the group descriptors do not need to fit in the first block group), and the on-line resizing code can enable META_BG as needed. So only offline resize without META_BG should be restricted.
I've submitted a patch suggestion: https://lore.kernel.org/linux-ext4/[email protected]/T/#u
It is worth noting that at these filesystem sizes it is also easy to bump into the 2^32 inode limit if the bytes-per-inode ratio (mke2fs -i option) is not high enough.