Invoke-CloneNimVolume

Create Clones of Volumes, Snapshots, or Windows Volumes

The Invoke-CloneNimVolume cmdlet enables you to create clones of volumes, snapshots, or Windows volumes hosted on volumes; assign a Windows drive letter or directory path to the cloned volumes; and add the cloned volumes to a cluster as an available cluster resource or as a Cluster Shared Volume (CSV). Invoke-CloneNimVolume supports the following operations:
  • Create clones of volumes, snapshots, or Windows volumes using access paths.
  • Create a clone and assign a drive letter as an access path. The -AssignDriveLetter option automatically assigns a drive letter. Use the -AccessPath option if you want to specify a drive letter.
  • Create a clone and add a Windows directory as an access path.
  • Create a clone, assign a drive letter, and add it to the cluster as an available disk.
  • Create a clone and add it to the cluster as a CSV.
  • In an iSCSI cluster, create a clone and specify that the connection needs to be persistent.
  • In a Fibre Channel cluster, create a temporary initiator group with name <host>-<guid>-DoNotUse to map a volume to a local node until the volume is ready to be mounted on multiple nodes.
  • When the -DoNotConnect switch is used, the cmdlet creates a clone, but does not connect it to the local host for further disk and volume operations. You can associate the clone with a specific initiator group without making a connection to the host by using the -InitiatorGroup switch with the -DoNotConnect switch.
  • When you clone a clustered volume In a Fibre Channel cluster, if you cloned a clustered volume using the Invoke-CloneNimVolume cmdlet without either the -AddToCSV or -AddToCluster options and want to connect to the host where cmdlet is being run, you must specify the initiator group that only has the current host's initiator.
NOTE:

The following limitations apply to the Invoke-CloneNimVolume cmdlet:

  • You cannot use both the -AssignDriveLetter and -AccessPath parameters at the same time.
  • You cannot use both the -AddToCSV and -AddToCluster parameters at the same time.
  • You cannot use either the -AccessPath or the -AssignDriveLetter parameters at the same time that you use the -AddToCSV parameter.
  • The -IsPersistent option only applies to iSCSI arrays.
IMPORTANT:

Limitations for Windows 2008 R2 Clusters:

  • Remote operations on a cluster are not supported. The clone cmdlet must be run on the first node without using the -AddToCluster or -AddToCSV options. After creating the clone, use a second node to run the Connect-NimVolume cmdlet to add it to the cluster.
  • The -AddToCluster and -AddToCSV options only creates the cluster resource and adds it to the cluster in an offline state. You must manually connect the volume to the other nodes to bring the resource online.

Syntax Variants

-NimbleVolumeName and -SnapshotName options

Invoke-CloneNimVolume -NimbleVolumeName <String[]> -SnapshotName <String[]> [-DoNotConnect [<SwitchParameter>]] [-Suffix <String>] [-GroupMgmtIP <IPAddress>] [-InitiatorGroup <String>] [-AssignDriveLetter [<SwitchParameter>]] [-AccessPath <String[]>] [-AddToCluster [<SwitchParameter>]] [-AddToCSV [<SwitchParameter>]] [-IsPersistent [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [-Confirm [<SwitchParameter>]] [<CommonParameters>]

-DoNotConnect option

Invoke-CloneNimVolume -NimbleVolumeName <String[]> [-DoNotConnect [<SwitchParameter>]] [-Suffix <String>] [-GroupMgmtIP <IPAddress>] [-InitiatorGroup <String>] [-AssignDriveLetter [<SwitchParameter>]] [-AccessPath <String[]>] [-AddToCluster [<SwitchParameter>]] [-AddToCSV [<SwitchParameter>]] [-IsPersistent [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [-Confirm [<SwitchParameter>]] [<CommonParameters>]

-NimbleVolume option

Invoke-CloneNimVolume -NimbleVolume <NimbleVolume[]> [-DoNotConnect [<SwitchParameter>]] [-Suffix <String>] [-GroupMgmtIP <IPAddress>] [-InitiatorGroup <String>] [-AssignDriveLetter [<SwitchParameter>]] [-AccessPath <String[]>] [-AddToCluster [<SwitchParameter>]] [-AddToCSV [<SwitchParameter>]] [-IsPersistent [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [-Confirm [<SwitchParameter>]] [<CommonParameters>]

-NimbleVolumeAccessPath option

Invoke-CloneNimVolume -NimbleVolumeAccessPath <String[]> [-DoNotConnect [<SwitchParameter>]] [-Suffix <String>] [-GroupMgmtIP <IPAddress>] [-InitiatorGroup <String>] [-AssignDriveLetter [<SwitchParameter>]] [-AccessPath <String[]>] [-AddToCluster [<SwitchParameter>]] [-AddToCSV [<SwitchParameter>]] [-IsPersistent [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [-Confirm [<SwitchParameter>]] [<CommonParameters>]

-Snapshot option

Invoke-CloneNimVolume -Snapshot <NimbleSnapshot[]> [-DoNotConnect [<SwitchParameter>]] [-Suffix <String>] [-GroupMgmtIP <IPAddress>] [-InitiatorGroup <String>] [-AssignDriveLetter [<SwitchParameter>]] [-AccessPath <String[]>] [-AddToCluster [<SwitchParameter>]] [-AddToCSV [<SwitchParameter>]] [-IsPersistent [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [-Confirm [<SwitchParameter>]] [<CommonParameters>]

Clone a volume by name and add an initiator group

Clone a specific volume, add an initiator group, and connect the volume to the local host.

Example


PS C:\Users\Administrator> Invoke-CloneNimVolume -NimbleVolumeName TestPS-Vol1 -GroupMgmtIP 10.18.236.42 -InitiatorGroup "Hyper-V-Cluster"
DeviceName        : \\.\physicaldrive6    
SerialNumber      : 54fac693a167c6f36c9ce900edc625b7    
GroupManagementIP : 10.18.236.42    
NimbleVolumeName  : TestPS-Vol11    
DiskSize          : 6289447.5    
BusType           : Fibre    
WindowsVolumes    : {D:\}    
FCTargetMappings  : {com.emulex-LPe12002-M8-1, com.emulex-LPe12002-M8-1, com.emulex-LPe12002-M8-1,
com.emulex-LPe12002-M8-1}    
Clone             : True    S
Snapshot          : False    
BaseSnapshotName  : TestPS-Vol1-818201642823    
ParentVolumeName  : TestPS-Vol1

Clone volume by name and assign a directory as an access path

Clone a volume, inherit initiator group from the source volume, and assign the Windows directory as the access path to the volume.

Example

PS C:\Users\Administrator> Invoke-CloneNimVolume -NimbleVolumeName TestPS-Vol11 -GroupMgmtIP 10.18.236.42 -AccessPath ”C:\test\1” 
DeviceName        : \\.\physicaldrive10
SerialNumber      : 6e84614f9bbe90906c9ce900edc625b7
GroupManagementIP : 10.18.236.42
NimbleVolumeName  : TestPS-Vol111
DiskSize          : 6289447.5
BusType           : Fibre
WindowsVolumes    : {C:\test\1\}
FCTargetMappings  : {com.emulex-LPe12002-M8-1, com.emulex-LPe12002-M8-1, com.emulex-LPe12002-M8-1, com.emulex-LPe12002-M8-1}
Clone             : True
Snapshot          : False
BaseSnapshotName  : TestPS-Vol11-818201644730
ParentVolumeName  : TestPS-Vol11

Clone a volume and assign drive letter to the cloned volume

Clone a specific volume, inherit the initiator group from the source volume, connect the volume to the host, and assign the next available drive letter to the volume as an access path.

Example

PS C:\Users\Administrator> Invoke-CloneNimVolume -NimbleVolumeName SunilPS-Vol11 -GroupMgmtIP 10.18.236.42 -AssignDriveLetter
DeviceName        : \\.\physicaldrive10
SerialNumber      : 0b76ba5e23215a436c9ce900edc625b7    
GroupManagementIP : 10.18.236.42    
NimbleVolumeName  : TestPS-Vol111    
DiskSize          : 6289447.5    
BusType           : Fibre    
WindowsVolumes    : {E:\}    
FCTargetMappings  : {com.emulex-LPe12002-M8-1, com.emulex-LPe12002-M8-1, com.emulex-LPe12002-M8-1, com.emulex-LPe12002-M8-1}    
Clone             : True    
Snapshot          : False    
BaseSnapshotName  : TestPS-Vol11-818201643938    
ParentVolumeName  : TestPS-Vol11

Clone a volume and add to cluster as CSV

Clone a volume, inherit the initiator group of the source volume, connect the volume to the local host, and add the volume to the cluster as CSV.

Example

PS C:\Users\Administrator> Invoke-CloneNimVolume -NimbleVolumeName TestPS-Vol11 -GroupMgmtIP 10.18.236.42 -AddToCSV
DeviceName        : \\.\physicaldrive10
SerialNumber      : 8dc8ebf30efa33446c9ce900edc625b7
GroupManagementIP : 10.18.236.42
NimbleVolumeName  : TestPS-Vol111
DiskSize          : 6289447.5
BusType           : Fibre
WindowsVolumes    : {C:\ClusterStorage\Volume8\}
FCTargetMappings  : {com.emulex-LPe12002-M8-1, com.emulex-LPe12002-M8-1, com.emulex-LPe12002-M8-1, com.emulex-LPe12002-M8-1}
Clone             : True
Snapshot          : False
BaseSnapshotName  : TestPS-Vol11-818201650515
ParentVolumeName  : TestPS-Vol11

Clone a volume and add to cluster as a cluster resource

Clone a volume, connect the volume to the host, and add the volume to the cluster as a resource.

Example

PS C:\Users\Administrator> Invoke-CloneNimVolume -NimbleVolumeName TestPS-Vol11 -GroupMgmtIP 10.18.236.42 -AddToCluster 
DeviceName        : \\.\physicaldrive11
SerialNumber      : 107d98362ca7ae056c9ce900edc625b7
GroupManagementIP : 10.18.236.42
NimbleVolumeName  : TestPS-Vol112
DiskSize          : 6289447.5
BusType           : Fibre
WindowsVolumes    : {E:\}
FCTargetMappings  : {com.emulex-LPe12002-M8-1, com.emulex-LPe12002-M8-1, com.emulex-LPe12002-M8-1, com.emulex-LPe12002-M8-1}
Clone             : True
Snapshot          : False
BaseSnapshotName  : TestPS-Vol11-818201650914
ParentVolumeName  : TestPS-Vol11

Clone a volume and add a suffix to the clone name

Clone a volume, add a suffix of your choosing to the clone name, inherit the initiator group of the volume, and connect the volume to the local host.

Example

PS C:\Users\Administrator> Invoke-CloneNimVolume -NimbleVolumeName TestPS-Vol11 -GroupMgmtIP 10.18.236.42 -Verbose -Suffix "clone"
DeviceName        : \\.\physicaldrive13
SerialNumber      : c7a6c5fbad60764e6c9ce900edc625b7
GroupManagementIP : 10.18.236.42
NimbleVolumeName  : TestPS-Vol11clone
DiskSize          : 6289447.5
BusType           : Fibre
WindowsVolumes    : {H:\}
FCTargetMappings  : {com.emulex-LPe12002-M8-1, com.emulex-LPe12002-M8-1, com.emulex-LPe12002-M8-1, com.emulex-LPe12002-M8-1}
Clone             : True
Snapshot          : False
BaseSnapshotName  : TestPS-Vol11-818201651254
ParentVolumeName  : TestPS-Vol11

Clone a snapshot and connect to the local host

Clone the specified snapshot and volume name, and connect it to the local host.

Example

PS C:\Users\Administrator> Invoke-CloneNimVolume -SnapshotName "SQLVOLCOLTYPE1-daily-2016-02-11::12:38:51.928" -NimbleVolumeName SQLVOLTYPE1.1
DeviceName        : \\.\physicaldrive3
SerialNumber      : 57f2bbf5006d861c6c9ce900075a810f
GroupManagementIP : 10.18.236.56
NimbleVolumeName  : SQLVOLTYPE1.11
DiskSize          : 6811560
BusType           : iScsi
WindowsVolumes    : {I:\}
FCTargetMappings  : {}
Clone             : True
Snapshot          : False
BaseSnapshotName  : SQLVOLCOLTYPE1-daily-2016-02-11::12:38:51.928
ParentVolumeName  : SQLVOLTYPE1.1

Clone a volume using a Windows access path

Create a clone using the Windows volume access path (drive letter or mount point), assign a drive letter, and add the clone to the cluster as a resource.

Example

PS C:\Users\Administrator> Get Invoke-CloneNimVolume -NimbleVolumeAccessPath "E:\" -AssignDriveLetter -AddToCluster
DeviceName        : \\.\physicaldrive3
SerialNumber      : 57f2bbf5006d861c6c9ce900075a810f
GroupManagementIP : 10.18.236.56
NimbleVolumeName  : SQLVOLTYPE1.11
DiskSize          : 6811560
BusType           : iScsi
WindowsVolumes    : {I:\}
FCTargetMappings  : {}
Clone             : True
Snapshot          : False

Clone a volume by name with the -DoNotConnect option

Create a clone of a specific volume, but do not connect it to the host.

Example

PS C:\Users\Administrator> Get Invoke-CloneNimVolume -NimbleVolumeName SQLVOLTYPE3.1 -DoNotConnect
DeviceName        : Unknown
SerialNumber      : e482feb2718963326c9ce900075a810f
GroupManagementIP : Unknown
NimbleVolumeName  : SQLVOLTYPE3.11
DiskSize          : 5632
BusType           : Unknown
WindowsVolumes    : {}
FCTargetMappings  : {}
Clone             : True
Snapshot          : False
BaseSnapshotName  : SQLVOLTYPE3.1-818201664218
ParentVolumeName  : SQLVOLTYPE3.1

Piping the Get-NimSnapshot and Invoke-CloneNimVolume

Use piping to create a clone from a snapshot using the Get-NimSnapshot cmdlet, immediately pass that information to the Invoke-CloneNimVolume cmdlet, and add the volume as a CSV resource.

Example

PS C:\Users\Administrator> Get-NimSnapshot -NimbleVolumeName SQLVOLTYPE3.1 -MaxObjects 1 | Invoke-CloneNimVolume -AddToCSV
DeviceName        : \\.\physicaldrive3
SerialNumber      : 57f2bbf5006d861c6c9ce900075a810f
GroupManagementIP : 10.18.236.56
NimbleVolumeName  : SQLVOLTYPE1.11
DiskSize          : 6811560
BusType           : iScsi
WindowsVolumes    : {I:\}
FCTargetMappings  : {}
Clone             : True
Snapshot          : False

Piping the Get-NimVolume and the Invoke-CloneNimVolume Cmdlets

Use piping to easily get a disk ID or serial number using the Get-NimVolume cmdlet and immediately pass that information to the Invoke-CloneNimVolume cmdlet.

Example - Assign a Drive Letter

PS C:\Users\Administrator> Get-NimVolume | where NimbleVolumeName -eq "TestPS-Vol11" | Invoke-CloneNimVolume -AssignDriveLetter
DeviceName        : \\.\physicaldrive10
SerialNumber      : 4a05756ec10dfbbc6c9ce900edc625b7
GroupManagementIP : 10.18.236.42
NimbleVolumeName  : TestPS-Vol111
DiskSize          : 6289447.5
BusType           : Fibre
WindowsVolumes    : {E:\}
FCTargetMappings  : {com.emulex-LPe12002-M8-1, com.emulex-LPe12002-M8-1, com.emulex-LPe12002-M8-1, com.emulex-LPe12002-M8-1}
Clone             : True
Snapshot          : False
BaseSnapshotName  : TestPS-Vol11-818201653357
ParentVolumeName  : TestPS-Vol11

Example - Assign a Windows Access Path

PS C:\Users\Administrator> Get-NimVolume | where NimbleVolumeName -eq "TestPS-Vol11" | Invoke-CloneNimVolume -AccessPath "C:\test\2"
DeviceName        : \\.\physicaldrive10
SerialNumber      : 4a05756ec10dfbbc6c9ce900edc625b7
GroupManagementIP : 10.18.236.42
NimbleVolumeName  : TestPS-Vol111
DiskSize          : 6289447.5
BusType           : Fibre
WindowsVolumes    : {"C:\test\2"}
FCTargetMappings  : {com.emulex-LPe12002-M8-1, com.emulex-LPe12002-M8-1, com.emulex-LPe12002-M8-1, com.emulex-LPe12002-M8-1}
Clone             : True
Snapshot          : False