Remove-NimVolume

The Remove-NimVolume cmdlet disconnects specified volume(s) from Windows host and deletes the volume(s) from the array. If -DeleteBaseSnap parameter is specified and the volume is a clone, then the base snapshot is deleted. If the Windows host is part of a Windows 2012 or above failover cluster, the disconnect is performed on all nodes of the cluster. Best effort disconnect is done even if an operation fails and continues.

The Remove-NimVolume cmdlet supports the following operations on Windows 2012 or later on the local node and all nodes of a failover cluster:
  • Detects whether the node belongs to a Windows failover cluster
  • Deletes any cluster resources associated with the volume
  • For iSCSI, all closes all connections and deletes Favorites
  • Sets the volume to the offline state and deletes it from the array group
  • Performs a disk rescan to make sure that the Windows host refreshes the disk information
  • Reports exceptions when failures are encountered and instructs you to manually remove the connections
  • On a Windows 2008 R2 cluster, all operations are performed only on the local node. If the volume is connected through iSCSI, connections must be removed manually from nodes other than the one where the cmdlet is run. Cluster resources must be removed manually from other nodes.
NOTE: Any application or cluster role that depends on a disconnected volume will fail.

Syntax Variants

NimbleVolumeAccessPath option

Remove-NimVolume -NimbleVolumeAccessPath <String[]> [-DeleteBaseSnap [<SwitchParameter>]] [-Force [<SwitchParameter>]] [-GroupMgmtIP <IPAddress>] [-WhatIf [<SwitchParameter>]] [-Confirm [<SwitchParameter>]] [<CommonParameters>]

NimbleVolumeName option

Remove-NimVolume -NimbleVolumeName <String[]> [-DeleteBaseSnap [<SwitchParameter>]] [-Force [<SwitchParameter>]] [-GroupMgmtIP <IPAddress>] [-WhatIf [<SwitchParameter>]] [-Confirm [<SwitchParameter>]] [<CommonParameters>]

NimbleVolume option

Remove-NimVolume -NimbleVolume <NimbleVolume[]> [-DeleteBaseSnap [<SwitchParameter>]] [-Force [<SwitchParameter>]] [-GroupMgmtIP <IPAddress>] [-WhatIf [<SwitchParameter>]] [-Confirm [<SwitchParameter>]] [<CommonParameters>]

Remove a volume by name and delete its base snapshot

Example

PS C:\Users\Administrator> Remove-NimVolume -GroupMgmtIP 10.18.236.77 -NimbleVolumeName test-vol -Force –DeleteBaseSnap -Verbose
VERBOSE: Collecting Nimble volume information.
VERBOSE: Collecting target mapping information for any Fibre Channel disks mounted.
VERBOSE: Collecting information for windows volumes on the host.
VERBOSE: Validating connectivity to host=c32-tc3. Cluster aware=True
VERBOSE: Executing query for NimbleVolumeName
VERBOSE: Query returned 1 record(s) for NimbleVolumeName
VERBOSE: Disconnect 1 volume(s) from Windows host
VERBOSE: Nimble volume(s) in specified set is not connected on Host=c32-tc3
VERBOSE: Deleting cluster disk resources for 1 volume(s) if applicable
VERBOSE: Deleting 1 volume(s) on Nimble group
VERBOSE: Deleting volume=test-vol
VERBOSE: Deleting snapshots count=1
VERBOSE: Deleting snapshot=snap-cc-c32-tc3-standalone
VERBOSE: Completed

Delete a volume that shares a base snapshot with a clone

When you attempt to delete a volume that shares its base snapshot with a clone, an error is returned.

Example

PS C:\Users\Administrator>Remove-NimVolume -GroupMgmtIP 10.18.236.77 -Verbose -NimbleVolumeName testvol -Force -DeleteBaseSnap
VERBOSE: Collecting Nimble volume information.
VERBOSE: Collecting target mapping information for any Fibre Channel disk mount
VERBOSE: Collecting information for windows volumes on the host.
VERBOSE: Validating connectivity to host=c32-tc3. Cluster aware=True
VERBOSE: Executing query for NimbleVolumeName
VERBOSE: Query returned 1 record(s) for NimbleVolumeName
VERBOSE: Disconnect 1 volume(s) from Windows host
VERBOSE: Deleting cluster disk resources for 1 volume(s) if applicable
VERBOSE: Deleting 1 volume(s) on Nimble group
VERBOSE: Deleting volume=testvol
VERBOSE: Error deleting Nimble volume=testvol on Nimble group. Conflict:Volume testvol has a clone.
VERBOSE: Failed to delete 1 volume(s) on Nimble group
VERBOSE: Failed with Nimble array group REST error. HTTP status=Conflict, Message=SM_http_conflict: The request could not be completed due to a conflict.
SM_vol_has_clone : Volume testvol has a clone.
Remove-NimVolume : Failed with Nimble array group REST error. HTTP status=Conflict, Message=SM_http_conflict:The request could not be completed due to a conflict.
SM_vol_has_clone : Volume testvol has a clone.
At line:1 char   : 1
+ Remove-NimVolume -GroupMgmtIP 10.18.236.77 -Verbose -NimbleVolumeName testvol -F ...+ CategoryInfo : InvalidResult: (Nimble.Powershe...imVolumeCommand:RemoveNimVolumeCommand) 
[Remove-NimVolume], NimblePSException + FullyQualifiedErrorId : PS_Remove_NimVolume_Error,Nimble.Powershell.Cmdlets.RemoveNimVolumeCommand