ONTAP Discussions

scripted quota management in Ontap 9


I am migrating from an older NetApp running 7-mode to Ontap 9 in cluster mode. Currently I am using etc/quotas file in the root volume of the NetApp for end user quotas like this:


1061 user@/vol/vol_castor 10000000K -
1062 user@/vol/vol_castor 100000K -
1064 user@/vol/vol_castor 100000K -
1065 user@/vol/vol_castor 1000000K -
1066 user@/vol/vol_castor 1000000K -


I have about 5000 entries in it. The user quotas are in a database and I have a script write out a new quotas file periodicly. I see that I can manage quotas on the GUI but is there any other way to do this in a scriptable or automated way in Clustered Ontap?


I am not able to use the 7-mode migration tool to migrate my data.







Luke -


Yes, you can scipt the creation of quota policies.


In a unix environ you could use the Software Dev Kit:



In a windows environ see the Powershell Toolkit:



See also the Developer Network forum here on communities:



I hope this response has been helpful to you.


At your service,


Eugene E. Kashpureff, Sr.
Independent NetApp Consultant http://www.linkedin.com/in/eugenekashpureff
Senior NetApp Instructor, FastLane US http://www.fastlaneus.com/
(P.S. I appreciate 'kudos' on any helpful posts.)



I’m adding a copy-paste of best practice i was working on for users quotas in my organization. .

it's not 1:1 answer to your question. but i'm adding it here for you to consider it as alternative of creating all these policies and mainting them. .




Main objectives:

  1. offload the support for space increase to the HelpDesk
  2. Not make frequent changes on the storage system settings (also required change control) and not to require auditing on DR
  3. Utilize built-in functionality, Make a scalable solution that will not limit our growth,


Relevant components:

  1. NetApp Home Directory share functionality:
  2. NetApp Per-Volume + Per-User (file owner) quota:



  1. Set separate volumes for each limitation “group” (Using volumes will allow more easy move to different AGGR tires based on type of use).
  2. Set different user quota to each “group” and assign to each volumes.
  3. Set the homedir share functionality to search all the volumes for user home dirs.
  4. Create folder for users on the volume with the right policy. Pointing to the share \\svm\username $ will find the user folder on the first volumes it’s exists in the list.
  5. When another policy need to be assigned for a user. Simply move the user home folder (move. Not copy – to preserve ownership and permissions) to a volume with the correct policy. The share will follow based on the home dir share functionality



Gidi Marcus (Linkedin) - Storage and Microsoft technologies consultant - Hydro IT LTD - UK




One more thing i was thinking on at lunch 🙂


For this specific purpose. i would avoid scripting it. as this is a very structured format. i would have just play with excel a bit to replace the current config file to the new command line syntax to set it.


You have:

1061 user@/vol/vol_castor 10000000K -


And you need:

quota policy rule create -vserver MYSVM -policy-name default -volume vol_castor -qtree "" -type user -disk-limit 10000000K -target "domain\user"


So if you split in excel  (Data>Text to columns) all the " ","@","/" once you have them in separate columns. you can copy-paste around and put it between the new command line





It’s very low tech. but sometimes the simplest solution is the best one (in Script you will ned to handle errors, comments, etc etc)



Gidi Marcus (Linkedin) - Storage and Microsoft technologies consultant - Hydro IT LTD - UK