0

Chapter 1 of Oracle's ZFS Guide states that

all metadata is allocated dynamically, so no need exists to preallocate inodes

which was a positive surprise, but makes me wonder why the methods ZFS uses to achieve that weren't implemented in other file systems, for example ext4. Problems some mails servers faced with inode number exhaustion for example comes to mind as a rationale for adding this feature.

I'm not sure where to find details on reasons behind having to limit number of inodes in ext4 (for example) or what compromises ZFS had to make to achieve practically unlimited number of inodes.

  • 1
    How about: Because there are about 3 people on the planet who can maintain file system OS code at the desired level of quality, and 4 of them did not believe that anything beyond `resize_inode` was worth the hassle so far, given how rarely taking this one item off a storage specialists workload makes a significant difference. (please [edit] your question to move a bit closer to the *practical problem* you are facing, so that a good answer can be more than historical anecdotes). – anx Oct 16 '22 at 18:33
  • Thanks, that makes sense. Perhaps it's not an appropriate question then, because I'm not faced with a practical problem. It was out of sheer curiosity as it seemed to me like a serious limitation that should have had a solid rationale behind it that I just couldn't find. Or perhaps nowadays it's a more pressing issue than it was before zfs. Happy to remove this question though if I was wrong. – Daniel Krajnik Oct 16 '22 at 18:52
  • 1
    I do not object to "why is it like this" question in principle. I just suspect that in a too open-ended fashion the best answer you can get is "number of affected users and incentives to serve their use case" which is not a very useful answer, at least in comparison to "calculate this to determine if you will even have to worry about this, and execute this command to optimize for your usage". – anx Oct 16 '22 at 19:05

1 Answers1

4

XFS has effectively unlimited inodes (see maxpct option on mkfs.xfs man page or -m on xfs_growfs), so it is not a ZFS-only features.

EXT4 is a direct descendant of EXT2, which implemented inodes as static structures. In the various upgrades to EXT3 and EXT4, this core idea was left unchanged.

shodanshok
  • 47,711
  • 7
  • 111
  • 180