NetApp
ONTAP Volume Autosize and Snapshot Autodelete Runbook
Why Autosize Needs Guardrails
Volume autosize and snapshot autodelete are useful when a workload can grow unexpectedly, but they can also hide bad retention, runaway writes, or a capacity model that no longer fits. Use them as controlled safety rails, not as a replacement for monitoring.
NetApp documents automatic snapshot deletion with volume snapshot autodelete modify and notes that it can help manage space utilization: Enable automatic ONTAP snapshot and LUN deletion. The command reference also documents volume snapshot autodelete show and modify: volume snapshot autodelete modify.
Lab Example
Volume: autosize_demo_vol01
SVM: svm_nfs01
Starting size: 256MB
Max autosize: 512MB
Autosize mode: grow
Grow threshold: 85%
Snapshot autodelete trigger: snap_reserve
Delete order: oldest_first
Target free space: 20%
CLI Process
Capture current settings:
volume show -vserver svm_nfs01 -volume autosize_demo_vol01 -fields size,autosize-mode,max-autosize,grow-threshold-percent
volume show-space -vserver svm_nfs01 -volume autosize_demo_vol01
volume snapshot autodelete show -vserver svm_nfs01 -volume autosize_demo_vol01
volume snapshot show -vserver svm_nfs01 -volume autosize_demo_vol01
Enable autosize growth:
volume autosize \
-vserver svm_nfs01 \
-volume autosize_demo_vol01 \
-mode grow \
-maximum-size 512MB \
-grow-threshold-percent 85
Enable snapshot autodelete:
volume snapshot autodelete modify \
-vserver svm_nfs01 \
-volume autosize_demo_vol01 \
-enabled true \
-trigger snap_reserve \
-delete-order oldest_first \
-target-free-space 20
Validate:
volume autosize -vserver svm_nfs01 -volume autosize_demo_vol01
volume snapshot autodelete show -vserver svm_nfs01 -volume autosize_demo_vol01
volume show-space -vserver svm_nfs01 -volume autosize_demo_vol01
REST API Process
Discover the volume:
curl -k -u admin:'<password>' \
"https://cluster.example.com/api/storage/volumes?svm.name=svm_nfs01&name=autosize_demo_vol01&fields=uuid,name,space,autosize,snapshot_policy"
Patch autosize settings:
curl -k -u admin:'<password>' \
-X PATCH \
"https://cluster.example.com/api/storage/volumes/<volume_uuid>" \
-H "Content-Type: application/json" \
-d '{
"autosize": {
"mode": "grow",
"maximum": 536870912,
"grow_threshold": 85
}
}'
Snapshot autodelete REST coverage varies by ONTAP release. If native fields are available in your release, use the storage volume snapshot/autodelete resource from that release's API docs. Otherwise, execute the autodelete change with CLI and capture REST evidence for volume space and snapshot state.
curl -k -u admin:'<password>' \
"https://cluster.example.com/api/storage/volumes/<volume_uuid>?fields=name,space,autosize"
Best Practices
- Set a maximum size that the aggregate can actually tolerate.
- Alert on autosize events instead of letting them become invisible.
- Use
oldest_firstonly after confirming retention requirements. - Do not enable autodelete on SnapMirror destination volumes expecting the same behavior as read-write volumes.
- Record the business owner who approved losing older snapshots under pressure.
Backout
volume autosize -vserver svm_nfs01 -volume autosize_demo_vol01 -mode off
volume snapshot autodelete modify -vserver svm_nfs01 -volume autosize_demo_vol01 -enabled false
Validate capacity immediately after disabling either feature.