最近我们遇到一个问题,其中一个ext4文件系统似乎无法处理非常大量的文件,在这种情况下超过6mln,尽管有足够的空间.最大数量是6mln,ext4文件系统在使用所有默认设置进行格式化时可以使用吗?我试图谷歌它,但没有得到任何确定的答案.这里的任何一个人都可以对此有所了解吗?干杯!!
解决方法
对于ext4没有默认值,它取决于设备的大小和创建时选择的选项.您可以使用检查现有限制
tune2fs -l /path/to/device
例如,
root@xwing:~# tune2fs -l /dev/sda1 tune2fs 1.42 (29-Nov-2011) Filesystem volume name: <none> Last mounted on: / [lots of stuff snipped] Inode count: 1277952 Free inodes: 1069532 Inodes per group: 8192 Inode blocks per group: 512 [lots of stuff snipped]
按照男人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. This value generally shouldn’t be smaller than the blocksize of the filesystem,since in that case more inodes would be made than can ever be used. Be warned that it is not possible to expand the number of inodes on a filesystem after it is created,so be careful deciding the correct value for this parameter.