微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

linux – ext4文件系统最大inode限制 – 任何人都可以解释一下吗?

最近我们遇到一个问题,其中一个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.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐