1

I know that it isn't possible to change the inode count of an ext filesystem after its creation, but I haven't been able to find any explanation on why it isn't.

Can anyone enlighten me?

  • 1
    To change the inode count you need to either change the block size or the filesystem size. That means reformatting. – casey Mar 27 '14 at 19:59
  • @casey So growing the filesystem (provided there's space on the partition) would linearly increase the number of inodes? – n.st Mar 27 '14 at 20:27
  • Yes – Bratchley Mar 27 '14 at 20:27
  • 1
    @n.st yes, using resize2fs would have that effect. – casey Mar 27 '14 at 20:31
  • Shrinking does not decrease, however. – Erkin Alp Güney Jan 22 '17 at 11:37
1

Why? Because no one has written a tool that does it. And that's probably because it's a not entirely trivial change to the filesystem metadata.

There are other issues like this; for example you can't resize ext4 to >16TB. That needs 64bit structures which aren't used by default.

Same with other filesystems, for example you can't shrink XFS.

None of these things are impossible, but it seems that no tools exist to do it either, at least not directly. Someone would have to develop them... and that usually requires in depth knowledge of the specific filesystem.

  • I'm surprised that noone has written a tool to do that — given how many questions I've found about increasing the number of inodes, it would definitely be worthwhile. – n.st Mar 29 '14 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.