Remove-SmClone
Removes an existing clone.
Syntax
Remove-SmClone [-CloneName] <String> [-PluginCode] <PluginCode> [-CloneAppObjectId] <String> [-Force] <> [-IsOracleAppVol] <String> [-PreCloneDeleteScriptPath] <String> [-UnMountCommands] <String>
Detailed Description
Removes an existing clone.
Parameters
Name | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|
CloneName |
Specifies the name of the clone you want to remove. |
false |
false |
|
PluginCode |
Specifies the plug-in code for the plug-in host whose clone you want to remove. |
true |
false |
|
CloneAppObjectId |
Specifies the ID of the clone application object. |
false |
false |
|
Force |
Enables you to unregister a clone that has been removed outside of SnapCenter. |
false |
true (ByPropertyName) |
|
IsOracleAppVol |
This is a Oracle Application Volume specific parameter. It specifies the flag which enables to provide Pre-clone Deletion script and Unmount cmds to be run before Oracle Application Volume Clone Deletion. |
false |
true (ByPropertyName) |
|
PreCloneDeleteScriptPath |
This is an Oracle Application Volume specific parameter and IsOracleAppVol flag needs to be set to use this. It specifies absolute path of the executable script to be run before Clone deletion. The script should be located either at /var/opt/snapcenter/spl/scripts/ or any directory inside the path on the Oracle Plug-in host. |
false |
true (ByPropertyName) |
|
UnMountCommands |
This is an Oracle Application Volume specific parameter and IsOracleAppVol flag needs to be set to use this. It specifies commands to unmount a file system from the Clone Host before Clone deletion. Enter multiple mount commands separated by semi colon (;). |
false |
true (ByPropertyName) |
Examples
Example 1: Removing a clone
Remove-SmClone -CloneName payrollclone_dataset__clone__08-05-2015_14.41.11
This example syntax removes the specified clone.
Remove-SmClone Are you sure you want to remove the clone? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): y Name: Deleting clone 'payrollclone_dataset__clone__08-05-2015_14.41.11' Id : 91 StartTime : 8/5/2015 2:47:14 PM EndTime : IsCancellable : False IsRestartable : False IsCompleted : False IsVisible : False IsScheduled : False PercentageCompleted : 0 Description : Status : Queued Owner : Error : Priority: None Tasks : {} ParentJobID : 0 EventId : 0
Example 2: Removing a clone without the confirm dialogue
Remove-SmClone -CloneName payrollclone_dataset__clone__08-05-2015_14.41.11 -Confirm:$false
This example syntax removes the specified clone.
Name: Deleting clone 'payrollclone_dataset__clone__08-05-2015_14.41.11' Id : 91 StartTime : 8/5/2015 2:47:14 PM EndTime : IsCancellable : False IsRestartable : False IsCompleted : False IsVisible : False IsScheduled : False PercentageCompleted : 0 Description : Status : Queued Owner : Error : Priority: None Tasks : {} ParentJobID : 0 EventId : 0
Example 3: Removing an Oracle Application Volume clone with PreCloneDeletion Script and Unmount Command
Remove-SmClone -CloneName R8092776CF4V1_HNK2_com_appVol4__clone__3221_11-06-2021_05.57.33 -PluginCode SCO -IsOracleAppVol -PreCloneDeleteScriptPath "/var/opt/snapcenter/spl/scripts/preCloneDel.sh" -UnMountCommands "unmount /mnt/test"
This example syntax removes the specified Oracle Application Volume clone, PreCloneDeletion Script and Unmount Command are specified.
Remove-SmClone Are you sure you want to remove the clone? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Name: Deleting clone 'R8092776CF4V1_HNK2_com_appVol4__clone__3221_11-06-2021_05.57.33' Id : 3222 StartTime : 11/6/2021 6:35:42 AM EndTime : IsCancellable : False IsRestartable : False IsCompleted : False IsVisible : True IsScheduled : False PercentageCompleted : 0 Description : Status : Queued Owner : Error : Priority: None Tasks : {} ParentJobID : 0 EventId : 0 JobTypeId : 7 ApisJobKey : ObjectId: 0 PluginCode : SCO PluginName : SnapCenter Plug-in for Oracle Database HostId : 0 RoleId : JobIds : {}
Example 4: Removing an Oracle Application Volume clone
Remove-SmClone -CloneName R8092776CF4V1_HNK2_com_appVol4__clone__3221_11-06-2021_05.57.33 -PluginCode SCO
This example syntax removes the specified Oracle Application Volume clone.
Remove-SmClone Are you sure you want to remove the clone? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Name: Deleting clone 'R8092776CF4V1_HNK2_com_appVol4__clone__3221_11-06-2021_05.57.33' Id : 3222 StartTime : 11/6/2021 6:35:42 AM EndTime : IsCancellable : False IsRestartable : False IsCompleted : False IsVisible : True IsScheduled : False PercentageCompleted : 0 Description : Status : Queued Owner : Error : Priority: None Tasks : {} ParentJobID : 0 EventId : 0 JobTypeId : 7 ApisJobKey : ObjectId: 0 PluginCode : SCO PluginName : SnapCenter Plug-in for Oracle Database HostId : 0 RoleId : JobIds : {}