Deleting Snapshot copies automatically
You can define and enable a policy for automatically deleting Snapshot copies and FlexClone LUNs. Automatically deleting Snapshot copies and FlexClone LUNs can help you manage space utilization.
About this task
You can automatically delete Snapshot copies from read-write volumes and FlexClone LUNs from read-write parent volumes. You cannot set up automatic deletion of Snapshot copies from read-only volumes, for example, SnapMirror destination volumes.
Example
The following command enables the automatic deletion of Snapshot copies and sets the trigger to snap_reserve for the vol3 volume, which is part of the vs0.example.com storage virtual machine (SVM):cluster1::> volume snapshot autodelete modify -vserver vs0.example.com
-volume vol3 -enabled true -trigger snap_reserve
Example
The following command enables the automatic deletion of Snapshot copies and of FlexClone LUNs marked for autodeletion for the vol3 volume, which is part of the vs0.example.com storage virtual machine (SVM):cluster1::> volume snapshot autodelete modify -vserver vs0.example.com
-volume vol3 -enabled true -trigger volume -commitment try -delete-order
oldest_first -destroy-list lun_clone,file_clone
If the trigger parameter is set to snap_reserve for an aggregate, the Snapshot copies are maintained until the space reserved crosses the threshold capacity. Therefore, even if the trigger parameter is not set to snap_reserve , the space used by the Snapshot copy in the command will be listed as 0 because these Snapshot copies are automatically deleted. Also, the space used by Snapshot copies in an aggregate is considered as free and is included in the available space parameter of the command.