Ubuntu – How to create an EXT4 partition with an extra large number of inodes


About inodes

In Ubuntu, each file and directory is a so-called inode. You can use df -i to check the number of inodes in use and available for all mounted filesystems.


If you create a new EXT4-partition, it uses the default number of inodes, which under normal conditions should be sufficient. However, if you run a system that produces millions of small files, how do you need to create a new EXT4 partition with an extra large number of inodes? What is the maximum?


  • You can NOT change the number of available inodes AFTER the EXT4-partition has been created

Best Answer

Using mkfs -t ext4 -N iNumberOfINodes /dev/XdY where iNumberOfINodes is a 32-bit number so the maximum possible number of inodes on any ext2/3/4 file system is 2^32-1, or 4,294,967,295 (~4 billion).