mysql 程序员 微软 wordpress HTML5 shell php Python Firefox centos linux命令 开源 google java nginx Android Ubuntu linux apache Windows



[root@imysql ~]# df -hT
Filesystem type Size Used Avail Use% Mounted on
/dev/sda1 xfs 12T 9T 2.4T 88% /data
[root@imysql ~]# df -hi
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda1 6.5G 3.4M 6.5G 1% /data


查询了下XFS FAQ,发现有一段:

: What is the inode64 mount option for?
By default, with 32bit inodes, XFS places inodes only in the first 1TB of a disk. If you have a disk with 100TB, all inodes will be stuck in the first TB. This can lead to strange things like "disk full" when you still have plenty space free, but there's no more place in the first TB to create a new inode. Also, performance sucks.
To come around this, use the inode64 mount options for filesystems >1TB. Inodes will then be placed in the location where their data is, minimizing disk seeks.
Beware that some old programs might have problems reading 64bit inodes, especially over

大意就是xfs文件系统会把inode存储在磁盘最开始的这1T空间里,如果这部分空间被完全填满了,那么就会出现磁盘空间不足的错误提示了。解决办法就是在挂载时,指定 inode64 选项:

mount -o remount -o noatime,nodiratime,inode64,nobarrier /dev/sda1 /data