Skip to main content
A newer release of this product is available.

volume snapshot autodelete modify

Contributors
Suggest changes

Modify autodelete settings

Availability: This command is available to cluster and Vserver administrators at the admin privilege level.

Description

The volume snapshot autodelete modify command enables you to modify Snapshot autodelete and LUN, NVMe namespace or file clone autodelete policy settings. Based on the defined policy, automatic deletion of Snapshot copies and LUN, NVMe namespace or file clones is triggered. Automatic deletion of Snapshot copies and LUN, NVMe namespace or file clones is useful when you want to automatically reclaim space consumed by the Snapshot copies and LUN, NVMe namespace or file clones from the volume when it is low in available space. LUN, NVMe namespace or file clone autodelete follows Snapshot copy autodelete. This command works only on a read-write parent volume. You cannot setup automatic Snapshot copy deletion and automatic LUN, NVMe namespace or file clone deletion for read-only volumes.

Parameters

-vserver <vserver name> - Vserver Name

This specifies the Vserver on which the volume is located.

-volume <volume name> - Volume Name

This specifies the volume whose autodelete policy has to be modified.

[-enabled {true|false}] - Enabled

This option specifies whether automatic deletion of Snapshot copies and LUN, NVMe namespace or file clones is enabled or disabled. If set to true , automatic deletion of Snapshot copies and LUN, NVMe namespace or file clones is enabled. If set to false , automatic deletion of Snapshot copies and LUN, NVMe namespace or file clones is disabled.

[-commitment {try|disrupt|destroy}] - Commitment

This option specifies which Snapshot copies and LUN, NVMe namespace or file clones can be automatically deleted to reclaim back space. + When set to try , the Snapshot copies which are not locked by any application and the LUN, NVMe namespace or file clones which are not configured as preserved are deleted. + When set to disrupt , the Snapshot copies which are not locked by data backing functionalities (such as volume clones, LUN clones, NVMe namespace clones and file clones) and LUN, NVMe namespace or file clones which are not configured as preserved are deleted. In the disrupt mode, the Snapshot copies locked by data protection utilities such as Snapmirror and Volume Move can be deleted. If such a locked Snapshot copy is deleted during the data transfer, the transfer is aborted. + When set to destroy , the Snapshot copies locked by the data backing functionalities are deleted. In addition, all the LUN, NVMe namespace or file clones in the volume are deleted.

[-defer-delete {scheduled|user_created|prefix|none}] - Defer Delete

This option determines the order in which Snapshot copies can be deleted. + Possible values are as follows:

  • When set to scheduled , scheduled Snapshot copies are the last to be deleted.

  • When set to user_created , user Snapshot copies are the last to be deleted.

  • When set to prefix , Snapshot copies matching a certain prefix are the last to be deleted.

  • When set to none , no defer deletion order is honored.

    This option is not applicable for LUN, NVMe namespace or file clones.
[-delete-order {newest_first|oldest_first}] - Delete Order

This option specifies if the oldest Snapshot copy and the oldest LUN, NVMe namespace or file clone or the newest Snapshot copy and the newest LUN, NVMe namespace or file clone are deleted first.

[-defer-delete-prefix <text>] - Defer Delete Prefix

This option specifies the prefix string for the -defer-delete prefix parameter. The option is not applicable for LUN, NVMe namespace or file clones.

[-target-free-space <percent>] - Target Free Space

This option specifies the free space percentage at which the automatic deletion of Snapshot copies and LUN, NVMe namespace or file clones must stop. Depending on the -trigger Snapshot copies and LUN, NVMe namespace or file clones are deleted until you reach the target free space percentage.

[-trigger {volume|snap_reserve|(DEPRECATED)-space_reserve}] - Trigger

This option specifies the condition which starts the automatic deletion of Snapshot copies and LUN, NVMe namespace or file clones. + Setting this option to volume triggers automatic deletion of Snapshot copies and LUN, NVMe namespace or file clones when the volume reaches threshold capacity and the volume space reserved for Snapshot copies is exceeded. + Setting the option to snap_reserve triggers automatic deletion of Snapshot copies and LUN, NVMe namespace or file clones when the space reserved for Snapshot copies reaches threshold capacity. + Setting the option to (DEPRECATED)-space_reserve triggers automatic deletion of Snapshot copies when reserved space in the volume reaches threshold capacity and the volume space reserved for Snapshot copies is exceeded. +

Note The option space_reserve is deprecated.

The threshold capacity is determined by the size of the volume as follows:

  • If the volume size is less than 20 GB, the autodelete threshold is 85%.

  • If the volume size is equal to or greater than 20 GB and less than 100 GB, the autodelete threshold is 90%.

  • If the volume size is equal to or greater than 100 GB and less than 500 GB, the autodelete threshold is 92%.

  • If the volume size is equal to or greater than 500 GB and less than 1 TB, the autodelete threshold is 95%.

  • If the volume size is equal to or greater than 1 TB, the autodelete threshold is 98%.

[-destroy-list <text>] - Destroy List

This option specifies a comma separated list of data backing functions which are affected if the automatic deletion of the Snapshot copy backing that service is triggered. The possible values for this option are lun_clone,fileclone , lun_clone,sfsr , vol_clone , cifs_share , or none . Except none , all the other options can be combined as a comma separated list. Note that "lun_clone", "file_clone" and "sfsr" individually are not valid values. Only pairs "lun_clone,file_clone" and "lun_clone,sfsr" are supported.

Note For the purposes of autodelete, lun_clone includes both LUNs and NVMe namespaces.

If you specify vol_clone , the cloned volume backed by the Snapshot copy is deleted. + If you specify lun_clone , and a LUN or NVMe namespace is in the process of being cloned when autodelete is triggered, the cloning operation is aborted. Any access to this LUN or NVMe namespace will result in an error being reported to the client. + If you specify file_clone , and the file cloning operation is in progress when autodelete is triggered, the cloning operation is aborted. Any access to this file will result in an error being reported to the client. + If you specify sfsr , and the file restore is in progress when autodelete is triggered, the restore operation is aborted. + If the Snapshot copy is locked either by a lun_clone or file_clone or both, the -destroy-list must be set to lun_clone,file_clone . + If the Snapshot copy is locked either by a lun_clone or sfsr operation or both, the -destroy-list must be set to lun_clone,file_clone . The options file_clone and sfsr are equivalent to each other. + If you set -destroy-list to lun_clone,file_clone and the Snapshot copy is backing a file clone or sfsr operation, both the operations are aborted. This is also the case when you set -destroy-list to lun_clone,sfsr . + LUN, NVMe namespace or file clone autodelete is applicable only if -destroy-list contains lun_clone and file_clone

Examples

The following example enables Snapshot autodelete and sets the trigger to snap_reserve for volume vol3 which is part of the Vserver vs0 :

cluster1::> volume snapshot autodelete modify -vserver vs0 -volume vol3 -enabled true -trigger snap_reserve

The following example enables Snapshot autodelete and LUN, NVMe namespace or file clone autodelete for volume vol3 which is part of the Vserve vs0 :

cluster1::> volume snapshot autodelete modify -vserver vs0 -volume vol3 -enabled true -trigger volume -commitment try -delete-order oldest_first -destroy-list lun_clone,file_clone