如何增加灵活卷的最大文件数
适用于
- ONTAP 9
- 灵活卷 (FlexVol)
- 最大 inode 或文件计数
说明
本文介绍如何增加 FlexVol 卷的最大文件数(索引节点)。
当卷的 inode 不足时,ONTAP 将以下列一个或多个错误消息提醒您:
Error message: file system is out of inodeswafl.vol.outOfInodes: file system on Volume vol_test1@vserver:vserver_1 is out of inodes because it has reached the maximum number of fileswafl.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
操作步骤
注意:我们建议在进行更改之前查看以下内容: 在 ONTAP 中增加文件数量之前的注意事项
- 在高级权限模式下使用
volume show命令查看当前设置:
::> set advanced
::*> volume show -vserver svm1 -volume vol1 -fields size,files,files-used,files-maximum-possible
vserver volume size files files-used files-maximum-possible
------- ------ ----- -------- ---------- ----------------------
svm1 vol1 500GB 15564791 96 124518391
files- 当前 inode 或文件计数限制。files-used- 卷中使用的 inode 和文件的数量。files-maximum-possible- 每个卷大小允许的最大 inode 或文件计数。
- 决定是增加卷容量还是增加最大文件数:
- 如果当前文件数与
files-maximum-possible相同,则必须增加卷大小或删除文件。 - 如果未手动调整值,则增加卷的大小将增加文件的可用信息节点数。
- 如果增加卷大小不是一个选项,请继续手动增加限制。
- 确定文件数量增加多少:
公式:当前文件 * 1.02 = 新文件容量。
示例: (15564791 x 1.02 = 15876087
- 如果不确定工作负载增长情况,建议将当前文件数量增加 2%。
- 对于迁移,请将值设置为比源文件计数高 2%。
- 如果了解您的工作负载需求,您可以将其设置为更高的值。
- 使用以下命令修改卷以增加文件计数:
::> volume modify -vserver svm1 -volume vol1 -files 15876087
Volume modify successful on volume vol1 of Vserver svm1.
::> volume show -vserver svm1 -volume vol1 -fields files
vserver volume files
------- ------ --------
svm1 vol1 15876087
注意:如果指定的文件计数大于files-maximum-possible,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.