大网数据广告活动
服务器运维问答

Understanding XFS inode limits

· 52CE 我爱测

I reached the inode limit on my XFS partition. There are plenty of questions about this. Some suggest the answer is to increase the maximum percentage of space allocated for inodes. Or, as the xfs_growfs manpage puts it: -m Speci…

问题原文

原帖链接 · Synesso · CC BY-SA 4.0

I reached the inode limit on my XFS partition. There are plenty of questions about this. Some suggest the answer is to increase the maximum percentage of space allocated for inodes. Or, as the xfs_growfs manpage puts it:

-m Specify a new value for the maximum percentage of space in the filesystem that can be allocated as inodes.

I tried this, but I'm not sure what I'm seeing. The default was 25% when I hit the limit. That gave me 409,600,129 inodes on a 781GB disk image.

I increased it to 100%, and it now will allow me 1,566,536,296 inodes.

$ df -i
Filesystem                        Inodes     IUsed      IFree IUse% Mounted on
...
/dev/loop3                    1566536040 409600129 1156935911   27% /mnt/tiles

I expect to write over 2 billion entries (mostly symlinks), so even at 100% it is not sufficient. It was my understanding that XFS can support much greater quantities of files, so I think I'm missing something.

I tried remounting with -o inode64, but there was no difference. (This option should be default anyway).

$ sudo xfs_growfs -m 100 .
meta-data=/dev/loop3             isize=512    agcount=4, agsize=51200000 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=1 spinodes=0 rmapbt=0
         =                       reflink=1
data     =                       bsize=4096   blocks=204800000, imaxpct=100
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal               bsize=4096   blocks=100000, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
inode max pct unchanged, skipping

Is the size of my drive insufficient? Or is there some other configuration or limitation I'm unaware of? Why is 100% allocation for inodes only equal to 1.5GB?

社区高分解答

原帖链接 · shodanshok · CC BY-SA 4.0

While you increased the maximum space inodes can use, you probably have too little free space to support over >1.5B inodes. As each inodes uses about 512 bytes, I estimate you have ~750 GB of free/available space.

Try freeing some space and/or expanding you filesystem.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-08-08)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。