I suppose the problem you have is not the partition filling up with inodes per se, but running out of the number of inodes in the filesystem. ext4 reserves the inodes statically when the filesystem is created, but you can set the number with options to mkfs.ext4:
-i bytes-per-inode
Specify the bytes/inode ratio. mke2fs creates an inode for
every bytes-per-inode bytes of space on the disk. The larger the
bytes-per-inode ratio, the fewer inodes will be created.
-N number-of-inodes
Overrides the default calculation of the number of inodes that
should be reserved for the filesystem (which is based on the number
of blocks and the bytes-per-inode ratio). This allows the
user to specify the number of desired inodes directly.
The manual states explicitly that the bytes per inode ratio cannot be changed after the FS is created, but the total number will scale to meet the ratio if the FS is resized.
You can also set the size of each inode. The default is 256 bytes on "most" filesystems, but can be reduced to 128 (the default for "small" filesystems). The extra space is used for storing extended attributes (e.g. SELinux labels), so if you don't need those, it should be safe to reduce the size to the minimum.
-I inode-size
Specify the size of each inode in bytes. The
inode-size value must be a power of 2 larger or equal to 128.
df -i should show the number of inodes allocated and used. With default options, one 30 GB partition I looked at had one inode for every 16 kB, but if your files are very small, you could set, say, -i 4096 to have one inode for every data block on the system.
If your files are smaller than 4096, you may want to reduce the file system block size too, since all regular files will require one full data block anyway. (That is, on ext4. I don't know if other current filesystems do packing of small files.)
-b block-size
Specify the size of blocks in bytes. Valid block-size values are 1024, 2048 and 4096 bytes per block. If omitted,
block-size is heuristically determined by the filesystem size and
the expected usage of the filesystem (see the -T option).
mkfs.ext4 also has the -T <type> option that can be used as a shorthand for some or all of these. The settings are in /etc/mke2fs.conf, which on my Debian makes e.g. mkfs.ext4 -T small equivalent to
mkfs.ext4 -b 1024 -I 128 -i 4096
Which might not be a bad set of options for lots of small files (and no xattrs.)
If your files are even smaller than one kB, a file system may not be the best way to save the data, but something like a database or an application specific system should perhaps be considered.
mkfs.ext4 -t newsfor best results. Also, I'd suggest testing - create (on lvm, or loopback device for example) each of the filesytems in turn, and start copying your real files to it until it fills up. When it fills, dodf -i(orfind | wc -l) to find which one managed to store most of your files - that way you'll know for sure.-Twith an uppercase T. The config file has some other useful-looking choices toomkfs.ext4 -T news