对于ext4没有默认值,它取决于设备的大小和创建时选择的选项.您可以使用检查现有限制
tune2fs -l /path/to/device
例如,
root@xwing:~# tune2fs -l /dev/sda1
tune2fs 1.42 (29-Nov-2011)
Filesystem volume name:
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.