All of lore.kernel.org
 help / color / mirror / Atom feed
* ext4: a tool to modify the inode count
@ 2025-12-17 18:04 Daniel Mazon
  2025-12-18  8:05 ` Andreas Dilger
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Mazon @ 2025-12-17 18:04 UTC (permalink / raw)
  To: linux-ext4@vger.kernel.org

Hello,

I wrote a small tool to modify the inode count of an existing ext4 
filesystem. It is largely based on the resize2fs tool from e2fsprogs. 
Previously, the inode count was selected at filesystem creation and 
could not be modified afterwards.

It provides a way to increase or reduce the inode count. I developed it 
because I had a 3.5 TiB ext4 partition created with a default 16384 
bytes-per-inode ratio. This created over 200 million inodes, allocating 
over 50GiB to inode tables. However, I was using less than 0.1% of 
inodes, so I wanted to reallocate those unused GiB from inode tables to 
free space.

To test the program, I created testcases trying to cover all possible 
ext4 options that could be impacted by a change on the inode count. 
After some time, I think it works well: no fsck errors after the 
change, and all data is still there. Please bear in mind that this has 
only been tested by one person.

I think this tool could be useful to someone else, as it adds 
flexibility on a parameter which was previouly unmodifiable. The code 
can be found here: https://github.com/danim7/inode_count_modifier

Please don't hesitate to let me know if you give it a try. I hope this 
mailing list is the right place to communicate this, if not, please 
excuse me for the noise.

Regards,
Daniel


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-12-23  4:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-17 18:04 ext4: a tool to modify the inode count Daniel Mazon
2025-12-18  8:05 ` Andreas Dilger
2025-12-22 23:15   ` Daniel Mazon
2025-12-23  4:45     ` Theodore Tso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.