Enabling tracking quotas in NetApp Cluster-Mode

Tracking quotas are like regular quotas but without any quota limits enforced. Tracking quotas enable you to generate disk and file capacity reports, and when used in conjunction with quotas they are helpful because you can resize quota values without having to reinitialize (turning them off and on to activate).

I recently used tracking quotas on volumes dedicated for user home directories in order to automated a chargeback report of user directory folder sizes using the Data ONTAP PowerShell Toolkit. But more on that later. First we need to get tracking quotas enabled.

We begin by creating a quota policy:

::> quota policy create -vserver vserver_name -policy-name quotatrackingpolicy

Create tracking quota rule(s) (this can be qtrees or volumes, I prefer using volumes):

::> quota policy rule create -vserver vserver_name -policy-name quotatrackingpolicy -volume uservol1 -type tree -target "" 

::> quota policy rule create -vserver vserver_name -policy-name quotatrackingpolicy -volume uservol2 -type tree -target "" 

::> quota policy rule create -vserver vserver_name -policy-name quotatrackingpolicy -volume uservol3 -type tree -target "" 

Configure the vserver to use the policy you created:

::> vserver modify -vserver vserver_name -quota-policy quotatrackingpolicy

Enable the quotas on the volume(s):

::> quota modify -vserver vserver_name -volume uservol1 -state on
[Job 4992] Job is queued: "quota on" performed for quota policy "quotatrackingpolicy" on volume "uservol1" in Vserver "vserver_name".

::> quota modify -vserver vserver_name -volume uservol1 -state on
[Job 4993] Job is queued: "quota on" performed for quota policy "quotatrackingpolicy" on volume "uservol2" in Vserver "vserver_name".

::> quota modify -vserver vserver_name -volume uservol1 -state on
[Job 4994] Job is queued: "quota on" performed for quota policy "quotatrackingpolicy" on volume "uservol3" in Vserver "vserver_name".

Test volume quota report:

::> quota report -volume uservol1 -vserver vserver_name
Vserver: vserver_name  
                                    ----Disk----  ----Files-----   Quota
Volume   Tree      Type    ID        Used  Limit    Used   Limit   Specifier  
-------  --------  ------  -------  -----  -----  ------  ------   ---------
uservol1    user  *  0B    -       0       -   *  
uservol1    user  BUILTINAdministrators  78.74GB  -  163733  -  
uservol1    user  root  0B  -      2       -  
uservol1    user  ADDOMAINuser1  495.3MB  -  13087  -   *  
uservol1    user  ADDOMAINuser2  3.88GB  -  49889  -   *  
uservol1    user  ADDOMAINuser3  38.03MB  -  301  -   *  
uservol1    user  ADDOMAINuser4 3.33GB  -  9079  -   *  
uservol1    user  ADDOMAINuser5  3.18GB  -  37629  -   *  
uservol1    user  ADDOMAINuser6  612.0MB  -  4815  -   *  
uservol1    user  ADDOMAINuser7  83.76MB  -  989  -   *  
uservol1    user  ADDOMAINuser8  260.4MB  -  5378  -   *  
11 entries were displayed.  
::> 

For more information, visit here: https://library.netapp.com/ecmdocs/ECMP1196906/html/GUID-573A3145-DFF4-4D1D-9E25-DE2347528BBC.html
And here:
https://kb.netapp.com/support/index?page=content&id=1013248&locale=en_US.

Leave a Reply

Your email address will not be published. Required fields are marked *