磁盘 inode 一般用于大量小文件的存储中消耗较快
#>umount /data0
#>mkfs.ext3 /dev/sda6 -N ”inode节点数“
#>vi /etc/fstab
/dev/sda6 /data0 ext3 defaults 1 2
#>mount -a
#>dumpe2fs -h /dev/sda6 | grep node
[注意]调整inode数会格式化磁盘,执行前应确定磁盘上没有重要数据或是先备份数据
mkfs.ext3的与inode相关的参数介绍
-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?? be smaller than the blocksize of
the filesystem, since then too many inodes will be made. Be
warned that is not possible to expand the number of inodes on a
filesystem after it is created, so be careful deciding the cor-
rect value for this parameter.
-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.
dumpe2fs /dev/mapper/myvg01-lv01 有inode相关参数可以查看inode总数,剩余数,以及inode size的大小
解决方法有:
1、备份文件系统的内容,重新创建分区,扩展容量
2、减小inode size参数,这样inode数量将增加
卸载硬盘分区:[root@localhost ~]# umount /dev/hda7
2.调整inode参数[root@localhost ~]# mkfs.ext3 -i 1024 -b 8192 /dev/hda7
-i即为inode size
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)