Given the current structure of a directory entry on a ext4 file system on Ubuntu, what is the maximum number of files a file system can contain?
What is the general method of calculating the maximum number of files a file system can contain?
|
Given the current structure of a directory entry on a ext4 file system on Ubuntu, what is the maximum number of files a file system can contain? What is the general method of calculating the maximum number of files a file system can contain? | |||
feedback
|
This question came from our site for professional and enthusiast programmers.
|
Ext4 has a theoretical limit of 4 billion files, which is restricted by the size of inode number it uses to identify each file (ext4 uses 32-bit inode numbers). However, as John says, ext4 allocates inode tables statically, so the actual limit is set when the filesystem is created. The df command shows you a count of free inodes on your filesystem:
Ext4 also supports an unlimited number of sub-directories per directory, though it may default to a limit of 64,000. This is configurable -- see the ext4 article at Kernel Newbies. For more information, see The new ext4 filesystem: current status and future plans from the 2007 Linux Symposium. | |||
|
feedback
|
|
There isn't one, per se; it depends. When you create an ext4 file system, you decide the size of the inode table, which in turn governs the total number of directories or files the file system can hold at once. | |||||||||||||||||
feedback
|