Configuring a FlexVol volume to automatically delete FlexClone files and FlexClone LUNs
You can enable a FlexVol volume to automatically delete FlexClone files and FlexClone LUNs with autodelete enabled when the free space in the volume decreases below a particular threshold.
Before you begin
The FlexVol volume must contain FlexClone files and FlexClone LUNs and be online.
The FlexVol volume must not be a read-only volume.
- Enable automatic deletion of FlexClone files and FlexClone LUNs in the FlexVol volume by using the volume snapshot autodelete modify command.
For the -trigger parameter, you can specify volume or snap_reserve .
For the -destroy-list parameter, you must always specify lun_clone,file_clone regardless of whether you want to delete only one type of clone.
Example
The following example shows how you can enable volume vol1 to trigger the automatic deletion of FlexClone files and FlexClone LUNs for space reclamation until 25% of the volume consists of free space:cluster1::> volume snapshot autodelete modify -vserver vs1 -volume vol1 -enabled true -commitment disrupt -trigger volume -target-free-space 25 -destroy-list lun_clone,file_clone
Volume modify successful on volume:vol1Note: While enabling FlexVol volumes for automatic deletion, if you set the value of the -commitment parameter to destroy , all the FlexClone files and FlexClone LUNs with the -autodelete parameter set to true might be deleted when the free space in the volume decreases below the specified threshold value. However, FlexClone files and FlexClone LUNs with the -autodelete parameter set to false will not be deleted. - Verify that automatic deletion of FlexClone files and FlexClone LUNs is enabled in the FlexVol volume by using the volume snapshot autodelete show command.
Example
The following example shows that volume vol1 is enabled for automatic deletion of FlexClone files and FlexClone LUNs:cluster1::> volume snapshot autodelete show -vserver vs1 -volume vol1
Vserver Name: vs1
Volume Name: vol1
Enabled: true
Commitment: disrupt
Defer Delete: user_created
Delete Order: oldest_first
Defer Delete Prefix: (not specified)
Target Free Space: 25%
Trigger: volume
Destroy List: lun_clone,file_clone
Is Constituent Volume: false - Ensure that autodelete is enabled for the FlexClone files and FlexClone LUNs in the volume that you want to delete by performing the following steps:
- Enable automatic deletion of a particular FlexClone file or FlexClone LUN by using the volume file clone autodelete command.You can force a specific FlexClone file or FlexClone LUN to be automatically deleted by using the volume file clone autodelete command with the -force parameter.
Example
The following example shows that automatic deletion of the FlexClone LUN lun1_clone contained in volume vol1 is enabled:cluster1::> volume file clone autodelete -vserver vs1 -clone-path /vol/vol1/lun1_clone -enabled true
You can enable autodelete when you create FlexClone files and FlexClone LUNs. - Verify that the FlexClone file or FlexClone LUN is enabled for automatic deletion by using the volume file clone show-autodelete command.
Example
The following example shows that the FlexClone LUN lun1_clone is enabled for automatic deletion:cluster1::> volume file clone show-autodelete -vserver vs1 -clone-path vol/vol1/lun1_clone
Vserver Name: vs1
Clone Path: vol/vol1/lun1_clone
Autodelete Enabled: true
For more information about using the commands, see the respective man pages. - Enable automatic deletion of a particular FlexClone file or FlexClone LUN by using the volume file clone autodelete command.
Related tasks
Give documentation feedback