How to increase the maximum number of files for a flexible volume
Applies to
- ONTAP 9
- Flexible Volume (FlexVol)
- Maximum inode or file count
Description
This article describes how to increase the maximum number of files (inodes) for a Flexible volume.
When a volume is out of inodes, ONTAP will alert you with one or more of the following error messages:
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
Procedure
Note: We suggest reviewing the following before making changes: Considerations before increasing the file count in ONTAP
- Review current settings with the
volume showcommand in advanced privilege mode:
::> 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- current inode or file count limit.files-used- number of inodes used and files in the volume.files-maximum-possible- maximum possible allowed inode or file count per the volume size.
- Decide whether to increase the volume or increase the maximum files:
- If current file count is the same as
files-maximum-possible, then you must increase the volume size or delete files. - Increasing the size of the volume will increase the number of available inodes for files if the value was not manually adjusted.
- If increasing the size of the volume is not an option continue with manually increasing the limit.
- Determine how much to increase the file count:
Formula: Current files * 1.02 = new files capacity.
Example: (15564791 x 1.02 = 15876087
- If you are unsure what your workload growth is, we recommend increasing the current file count by 2%.
- For migrations, set the value to 2% higher than the source file count.
- You may set it to a higher value if your workload needs are understood.
- Modify the volume to increase the file count with the following command:
::> 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
Note: If the file count specified is larger than files-maximum-possible , ONTAP will use the maximum possible:
::*> 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.
Additional Information
- (OUT OF INODES) ERROR - AutoSupport message
- How to determine the default and maximum inode count for my volume
- Considerations before increasing the file count in ONTAP
- How to automatically set maxfiles in ONTAP to the largest value a volume can hold?
- ONTAP file and directory structure Resolution Guide
