Skip to main content
NetApp Knowledge Base

How to modify the maxdirsize in ONTAP 9?

Views:
14,238
Visibility:
Public
Votes:
3
Category:
ontap-9
Specialty:
core
Last Updated:
5/2/2025, 6:12:25 AM

Applies to

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.

  1.   Set advanced privilege

::> set advanced

  1. View your current maxdir size. See How to identify the current maxdir-size value for my volume?
  2. Calculate the new value as per the formula

(maxdir-size x 2%) + maxdir-size = new value

Example:

320 * 2% = 6.4 + 320 = 327
  1. 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. 

  1. Review the KB article below to improve your directory layout.

What directory structure should I use to avoid maxdirsize issues?

 

 

 

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.