Score:0

How ZFS avoids inodes' number exhaustion and why wasn't it implemented in previous filesystems (e.g. ext4)?

ec flag

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.

anx avatar
fr flag
anx
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).
Daniel Krajnik avatar
ec flag
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.
anx avatar
fr flag
anx
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".
Score:4
ca flag

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.