Data ONTAP PowerShell Toolkit - Qtrees and Quotas

by Frequent Contributor on ‎2010-07-08 08:36 AM

In the NetApp storage model, the basic unit is the RAID group.  RAID groups are combined into pools called Aggregates.  Logical containers called Flexvols are carved from the space in an aggregate.  A Flexvol can contain files or LUNs.  Further, a Flexvol can be partitioned by creating Qtrees in it.

If you’ve worked with QSM or SnapVault, then you’re probably familiar with one use case for Qtrees in conjunction with LUNs.  Qtrees are also common in NFS or CIFS file environments.  Like a directory, a Qtree can be used to further partition space within a volume that contains files.  In these Environments, Qtrees are often used in conjunction with Quotas.

There are three basic types of Quota; the tree, user, and group quota.  A quota can be applied to a volume or a Qtree.  In addition a default quota can be applied to an object, which also applies to all objects beneath the object to which it is applied.  Through quotas, you can set hard, soft, or threshold limits on the number of files of amount of disk space consumed.  A threshold quota is a unique case.  In addition to logging, a threshold quota will send an SNMP trap.

The Data ONTAP PowerShell Toolkit provides several cmdlets for manipulating quotas.  Foremost among them is add-naquota.  To add a default tree quota to the volume vol1, with a DiskLimit of 10GB,

Add-naquota tree * vol1 –DiskLimit 10g

To add a threshold limit of 7GB to the qtree qtree_1 in the volume vol1,

Add-naquota tree /vol/vol1/qtree_1 vol1 –Threshold 7g

To remove the quota from the qtree qtree_1,

Remove-naquota tree /vol/vol1/qtree_1 vol1

To get a report of all quotas,


In addition to working with files if you place your LUNs in qtrees, and then place a quota on the qtree, things start to get real interesting.

More to follow.

Happy Scripting



This NetApp Community is public and open website that is indexed by search engines such as Google. Participation in the NetApp Community is voluntary. All content posted on the NetApp Community is publicly viewable and available. This includes the rich text editor which is not encrypted for https.

In accordance to our Code of Conduct and Community Terms of Use DO NOT post or attach the following:

  • Software files (compressed or uncompressed)
  • Files that require an End User License Agreement (EULA)
  • Confidential information
  • Personal data you do not want publicly available
  • Another’s personally identifiable information
  • Copyrighted materials without the permission of the copyright owner

Files and content that do not abide by the Community Terms of Use or Code of Conduct will be removed. Continued non-compliance may result in NetApp Community account restrictions or termination.