Skip to main content
1 of 2
Stephen Kitt
  • 482.8k
  • 60
  • 1.2k
  • 1.4k

It isn’t possible to resize a file system without adding more inodes: that would require changing the number of bytes per inode (as a ratio of the storage size over the number of inodes), and that’s not possible in Ext4. As explained in man mke2fs:

-i bytes-per-inode
Specify the bytes/inode ratio. mke2fs creates an inode for every bytes-per-inode bytes of space on the disk. The larger the bytes-per-inode ratio, the fewer inodes will be created. This value generally shouldn't be smaller than the blocksize of the file system, since in that case more inodes would be made than can ever be used. Be warned that it is not possible to change this ratio on a file system after it is created, so be careful deciding the correct value for this parameter. Note that resizing a file system changes the number of inodes to maintain this ratio.

Instead of resizing the existing volume, you could create a new volume using the available free space, with a much lower number of inodes, then move the data across and resize the new volume. You might have to do this in several steps if the free space isn’t large enough to store all the data currently on the volume.

Stephen Kitt
  • 482.8k
  • 60
  • 1.2k
  • 1.4k