xfs文件系统inode扩容
某文件系统的inode快满了, 里面存的全是小碎文件,因此inode消耗的很快,不过默认xfs的20%inode空间也确实少点。
决定增加inode空间占比。
#xfs_info /recordfile
meta-data=/dev/mapper/datavg-lv_tmarc01 isize=256 agcount=10, agsize=13041664 blks
= sectsz=512 attr=2, projid32bit=0
data = bsize=4096 blocks=128447488, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal bsize=4096 blocks=25472, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
‘imaxpct’ 是inode空间最大百分比,意思是用多少空间座位inode空间。
#xfs_growfs -m 30 /recordfile
meta-data=/dev/mapper/datavg-lv_tmarc01 isize=256 agcount=10, agsize=13041664 blks
= sectsz=512 attr=2, projid32bit=0
data = bsize=4096 blocks=128447488, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal bsize=4096 blocks=25472, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
inode max percent changed from 25 to 30
修改为30%
# xfs_info /recordfile
meta-data=/dev/mapper/datavg-lv_tmarc01 isize=256 agcount=10, agsize=13041664 blks
= sectsz=512 attr=2, projid32bit=0
data = bsize=4096 blocks=128447488, imaxpct=30
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal bsize=4096 blocks=25472, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
检查一下inode, ok
# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/datavg-lv_tmarc01
15950176 30628 15919548 1% /recordfile