Quick Guide: Create a Demo SVM, Volumes, Qtrees, Quota Limits

For some lab testing I'm doing, I just needed to quickly create a vserver with volumes, qtrees, and qtree quota disk limits.

Version of NetApp ONTAP here is 9.1 (a bit old now with 9.7 being out, but doesn't really matter.)

vserver create -vserver VS_DEMO1 -aggregate aggr1 -rootvolume svm_root -rootvolume-security-style unix
set -confirmations off
volume create -vserver VS_DEMO1 -aggregate aggr1 -volume VOL_DEMO1 -size 10g -space-guarantee none -percent-snapshot-space 0 -junction-path /VOL_DEMO1
volume create -vserver VS_DEMO1 -aggregate aggr1 -volume VOL_DEMO2 -size 10g -space-guarantee none -percent-snapshot-space 0 -junction-path /VOL_DEMO2
volume create -vserver VS_DEMO1 -aggregate aggr1 -volume VOL_DEMO3 -size 10g -space-guarantee none -percent-snapshot-space 0 -junction-path /VOL_DEMO3
volume create -vserver VS_DEMO1 -aggregate aggr1 -volume VOL_DEMO4 -size 10g -space-guarantee none -percent-snapshot-space 0 -junction-path /VOL_DEMO4
volume create -vserver VS_DEMO1 -aggregate aggr1 -volume VOL_DEMO5 -size 10g -space-guarantee none -percent-snapshot-space 0 -junction-path /VOL_DEMO5
qtree create -qtree QT_DEMO2 -vserver VS_DEMO1 -volume VOL_DEMO2
qtree create -qtree QT_DEMO2B -vserver VS_DEMO1 -volume VOL_DEMO2
qtree create -qtree QT_DEMO3 -vserver VS_DEMO1 -volume VOL_DEMO3
qtree create -qtree QT_DEMO4 -vserver VS_DEMO1 -volume VOL_DEMO4
qtree create -qtree QT_DEMO5 -vserver VS_DEMO1 -volume VOL_DEMO5
quota policy rule create -vserver VS_DEMO1 -policy-name default -volume VOL_DEMO2 -type tree -target QT_DEMO2 -disk-limit 2g
quota policy rule create -vserver VS_DEMO1 -policy-name default -volume VOL_DEMO2 -type tree -target QT_DEMO2B -disk-limit 3g
quota policy rule create -vserver VS_DEMO1 -policy-name default -volume VOL_DEMO3 -type tree -target QT_DEMO3 -disk-limit 4g
quota policy rule create -vserver VS_DEMO1 -policy-name default -volume VOL_DEMO4 -type tree -target QT_DEMO4 -disk-limit 6g
quota policy rule create -vserver VS_DEMO1 -policy-name default -volume VOL_DEMO5 -type tree -target QT_DEMO5 -disk-limit 8g
quota on -vserver VS_DEMO1 -volume VOL_DEMO2
quota on -vserver VS_DEMO1 -volume VOL_DEMO3
quota on -vserver VS_DEMO1 -volume VOL_DEMO4
quota on -vserver VS_DEMO1 -volume VOL_DEMO5

Also needed to create a couple of annotations in OCUM for -
... Alias = {say demo}
... DataProtectionType = Primary
- and assign at least one SVM these annotations

Image: Quota Report

Comments