|
|
Data ONTAP® PowerShell Toolkit
|
Cmdlet: Set-NaSnapshotAutodelete
NAME
Set-NaSnapshotAutodelete
SYNOPSIS
Set the option named <Key> to the value specified by <Value> in the autodele
te settings of the specified volume.
SYNTAX
Set-NaSnapshotAutodelete [-TargetName] <String> [-Key] <String> [-Value] <St
ring> [-Controller <NaController>] [<CommonParameters>]
Set-NaSnapshotAutodelete [-TargetName] <String> [-Options] <SnapshotAutodele
teInfo[]> [-Controller <NaController>] [<CommonParameters>]
DESCRIPTION
Set the option named <Key> to the value specified by <Value> in the autodele
te settings of the specified volume.
Possible values:
"state" (value: "on" | "off") This option determines if the snapshot autode
lete is currently enabled for the volume. Setting the option to "on" switche
s on the snapshot autodelete for the volume. Setting the option to "off" swi
tches off the snapshot autodelete for the volume.
"commitment" (value: "try" | "disrupt") This option determines the snapsho
ts which snapshot autodelete is allowed to delete to get back space. Setting
this option to "try" only permits the snapshots which are not locked by dat
a protection utilities (dump, mirroring, NDMPcopy) and data backing function
alities (volume and LUN clones) to be deleted. Setting this option to "disru
pt" only permits the snapshots which are not locked by data backing function
alities (volume and LUN clones) to be deleted.
"trigger" (value: "volume" | "snap_reserve" | "space_reserve") This option
determines the condition in which snapshots should be automatically deleted.
Setting this option to "volume" triggers snapshot autodelete to run when th
e volume is near full. Setting this option to "snap_reseve" triggers snapsho
t autodelete to run when the snap reserve of the volume is near full. Settin
g this option to "space_reserve" triggers snapshot autodelete to run when th
e space reserved in the volume is near full.
"target_free_space" (value: <number>) This option determines when snapshot
autodelete should stop deleting snapshot. Depending on the trigger, snapshot
s are deleted till we reach the target free space percentage.
"delete_order" (value: newest_first | oldest_first) This option determines
if the oldest or newest snapshot is deleted first.
"defer_delete" (value: scheduled | user_created | prefix | none) This optio
n determines which kind of snapshots to delete in the end. Setting this opti
on value to "scheduled" will delete the snapshots created by the snapshot sc
heduler last. Setting this option value to "user_created" will delete the sn
apshots not created by the snapshot scheduler last. Setting this option valu
e to "prefix" will delete the snapshots matching the prefix string to be del
eted last. Setting this option value to "none" will disable the above choice
s.
"prefix" (value: <string>) This option can be set to provide the prefix str
ing for the "prefix" value of the "defer_delete" option. The prefix string l
ength can be 15 char long.
PARAMETERS
-TargetName <String>
Name of the volume for which we want to change autodelete settings.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Key <String>
Name of the option to be set.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Value <String>
The value to set the named option
Required? true
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Controller <NaController>
The Data ONTAP controller object, embodied by an NaController object. T
his parameter is returned by the Connect-NaController cmdlet. If not sp
ecified, the value in the global variable CurrentNaController is used.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Options <SnapshotAutodeleteInfo[]>
Array of SnapshotAutodeleteInfo values, as returned by Get-NaSnapshotAut
odelete.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".
INPUTS
OUTPUTS
DataONTAP.Types.Volume.VolumeInfo
NOTES
Category: snapshot
API: snapshot-autodelete-set-option
-------------- Example 1 --------------
C:\PS>Set-NaSnapshotAutodelete vol0 state on | Get-NaSnapshotAutodelete
Turn on autodelete for volume 'vol0' and print the resulting autodelete sett
ings.
OptionName OptionValue
---------- -----------
state on
commitment try
trigger volume
target_free_space 20
delete_order oldest_first
defer_delete user_created
destroy_list none
RELATED LINKS
Get-NaSnapshotAutodelete
| Copyright © 2013 NetApp. All rights reserved. Use is subject to license terms. |
|
Data ONTAP® PowerShell Toolkit
|