How to modify the maxdirsize in ONTAP 9?
Applies to
- ONTAP 9
- Cloud Volumes ONTAP
- Maximum Directory size
- Event management system (EMS) message
Description
When maxdirsize is exceeded in ONTAP, an out of space error (ENOSPC) is issued to the client and an event management system message is triggered. To remediate a directory size issue, a storage administrator must increase the maxdirsize setting or move files out of the directory.
Is changing maxdirsize immediate?
Yes, you can change maxdirsize on the fly to increase the directory size when the users are connected to the filer.
Procedure
It is recommended that you only increase maxdirsize by 2% increments of the current value to reduce a performance impact.
- Set advanced privilege
::> set advanced
- View your current maxdir size. See How to identify the current maxdir-size value for my volume?
- Calculate the new value as per the formula
(maxdir-size x 2%) + maxdir-size = new value
Example:
320 * 2% = 6.4 + 320 = 327
- Increase the maxdirsize using the command:
volume modify -vserver {NAME} -volume {NAME} -maxdir-size {size}
Example:
Setting a maximum directory size of 327MB for a volume named vol1 on a Storage Virtual Machine (SVM) named svm1.
::> set advanced
::*> volume modify -vserver svm1 -volume vol1 -maxdir-size 327MB
Volume modify successful on volume: vol1
::*> volume show -volume vol1 -fields maxdir-size
(volume show)
vserver volume maxdir-size
------- ------ -----------
svm1 vol1 327MB
Note: Make sure the value for -maxdir-size
includes the "MB
" at the end.
- Review the KB article below to improve your directory layout.
What directory structure should I use to avoid maxdirsize issues?