How to modify the maxdir-size in ONTAP 9
Applies to
- ONTAP 9
- Cloud Volumes ONTAP
- Maximum Directory size
- Event management system (EMS) message
Description
- When a directory's file name meta file exceeds the set limit, an out of space error (ENOSPC) is issued to the client and an event management system message (EMS) is triggered.
- To remediate a directory size issue, a storage administrator may increase the maxdir-size setting or restructure the directory.
Procedure
Considerations before changing
- See the following before changing maxdir-size value:
- Changes to maxdir-size are immediate and apply to all directories in the volume.
- For average growth workloads, we recommend increasing maxdir-size in 2% increments of the current value.
- If migrating and the needed size is known, we recommend setting it to 2% higher than the needed value.
- Once the maxdir-size is increased, it cannot be reduced without recreating the directory.
Making the change
- 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
