如何增加灵活卷的最大文件数
适用场景
- ONTAP 9
- 灵活卷(FlexVol)
- 最大inode计数(maxfiles)
描述
本文介绍如何增加灵活卷的最大文件数(Inode)。
- 当卷的Inode不足时、ONTAP将发出一个或多个类似以下内容的错误消息:
Error message: no space left on the device
Error message: file system is out of inodes
wafl.vol.outOfInodes: file system on Volume vol_test1@vserver:vserver_1 is out of inodes because it has reached the maximum number of files
wafl.vol.runningOutOfInodes: The file system on Volume vol1@vserver:20884ed5-68e5-11ea-a757-00a098c4fca2 is using 80 percent or more of the files that can be contained on the volume.
INODE: System/Cluster Notification from filer (OUT OF INODES) ALERT
操作步骤
确定是增加卷还是增加最大Inode容量
- 增加卷大小可能会增加可用的Inode数量。
- 查看此图表进行确认。 (从 9.13.1 9.13.1开始增强)
- 如果不能增加卷、请 使用
volume modify
命令增加节点容量。
手动增加节点容量
- 对于现有工作负载,最佳做法是每次将当前 inode 容量增加 2%。对于迁移,请将该值设置为比源文件数量高 2%。如果净新增文件数量增长率较高,则可以将该值设置为高 2% 以上。
- (当前节点容量x 2%)+当前节点容量=新的节点容量
示例 (35501358 x 2%)+ 35501358 =36211385
- 修改卷以 增加节点容量(
-files
):
volume modify –vserver <vserver name> -volume <volume name> -files <number of files>
- 示例
-
::> volume modify -vserver svm1 -volume vol1 -files 36211385 Volume modify successful on volume vol1 of Vserver svm1. ::> volume show -vserver svm1 -volume vol1 -fields files vserver volume files ------- ------ -------- svm1 vol1 36211385
注意:
- 如果根据卷大小将节点容量设置为最大值、则必须选择要删除的文件、或者必须增加卷大小。
- 如果指定的新大小大于卷可以容纳的大小,ONTAP将报告可能的最大值。
::*> vol modify -vserver svm1 -volume vol1 -files 125000000
Error: command failed: Unable to set volume attribute "files" for volume "vol1" on Vserver
"svm1". Reason: The value you entered (125000000) is invalid; maximum inode count cannot
exceed 124518391.
Cannot support more than one inode per 4 KB of disk space.