Disconnect-NimVolume

Using the Disconnect-NimVolume cmdlet

The Disconnect-NimVolume cmdlet disconnects volumes from the Windows host and removes the initiator group from the volume Access Control List (ACL). If the Windows host is part of a Windows 2012 or above failover cluster, the disconnect is performed on all nodes of the cluster.

A best effort to disconnect is made even if an operation fails and continues to disconnect as many volumes as possible. The cmdlet does not delete the volumes from the array group. You can manually delete the volume(s) using either the array GUI or CLI, or the Remove-NimVolume cmdlet. The Disconnect-NimVolume cmdlet supports the following operations:

  • Detects whether the node belongs to a Windows failover cluster
  • Deletes cluster resources associated with the volume
  • Closes all connections and deletes Favorites for iSCSI
  • Removes the initiator group form the volume ACL if it is the only initiator group present
  • Does a disk rescan to make sure that the Windows host refreshes the disk information
  • Lists exceptions and provides guidance on how to manually resolve issues
  • Performs all operations only on the local node of a Windows 2008 R2 cluster. If the volume is connected through iSCSI, connections must be manually removed from the other nodes. Cluster resources must also be manually removed.

Syntax Variants

-NimbleVolumeName option

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

-NimbleVolume option

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

-NimbleVolumeAccessPath option

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

Disconnect a volume using the -Verbose and -Force options

NOTE:

Using the -Force option does not prompt you to confirm the operation.

Example

PS C:\Users\Administrator> Disconnect-NimVolume -GroupMgmtIP 10.18.236.70 -Verbose -NimbleVolumeName test-volume -Force
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: Deleting cluster disk resources for 1 volume(s) if applicable
VERBOSE: Disassociating initiator group from 1 volume(s)
VERBOSE: Completed

Disconnect a volume using the volume access path drive letters

An error is returned when the access path passed in the command is not valid.

Example

PS C:\Users\Administrator> Disconnect-NimVolume -GroupMgmtIP 10.18.236.70 -Verbose -NimbleVolumeAccessPath X:,Y:
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: NimbleVolumeAccessPath=System.String[] is not found in Windows mount points on Nimble volumes connected from this host. Connected mount points=(E:\, F:\, Q:\, C:\ClusterStorage\Volume2\, K:\)
Disconnect-NimVolume : NimbleVolumeAccessPath=System.String[] is not found in Windows mount points on Nimble volumes connected from this host. Connected mount points=(E:\, F:\, Q:\, C:\ClusterStorage\Volume2\, K:\)
At line:1 char:1
+ Disconnect-NimVolume -GroupMgmtIP 10.18.236.77 -Verbose -NimbleVolumeAccessPath  ...
+--------------------------------------------------------------------        
+ CategoryInfo          : InvalidArgument: (:) [Disconnect-NimVolume], PSArgumentException
+ FullyQualifiedErrorId : Argument,Nimble.Powershell.Cmdlets.DisconnectNimVolumeCommand

Disconnect a volume from a multi-node cluster

Disconnect a volume from a multi-node cluster using the -Verbose and -Force options.

NOTE:

Using the -Force option does not prompt you to confirm the operation.

Example

PS C:\Users\Administrator> Disconnect-NimVolume -GroupMgmtIP 10.18.236.15 -Verbose -NimbleVolumeName test-vol -Force
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=hitdev-win009. Cluster aware=True
VERBOSE: Validating connectivity to host=hitdev-win008. 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: Disassociating initiator group from 1 volume(s)
VERBOSE: Completed