Invoke-CloneNimVolumeCollection

The Invoke-CloneNimVolumeCollection cmdlet enables you to create clones of volume in a volume collection or snapshot collection. You can assign a drive letter or directory path to the Windows volume, and add the cloned volume to the cluster as an available resource or a CSV.

The Invoke-CloneNimVolumeCollection cmdlet supports the following operations:

  • Create clones of volumes in a volume collection or snapshots in a snapshot collection
  • 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.
  • Add a Windows directory as an access path.
  • Assign a drive letter and add the clone to the cluster as an available disk.
  • Add the clone to the cluster as a CSV.
  • Assign an optional suffix to the clone name.
  • Use the -IsPersistent option to make the connection persistent (favorite) in an iSCSI environment.
  • Create a temporary initiator group with the name <host>-<guid>-DoNotUse to map the volume to a local node until the volume is ready to be mounted on multiple nodes in a Fibre Channel cluster.
  • When the -DoNotConnect option is used, the cmdlet creates the clone but does not connect it to the local host. 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.
NOTE:

The following limitations apply to the Invoke-CloneNimVolumeCollection 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 the -AddToCluster or -AddToCSV options, then switch to the second node and run the Connect-NimVolume cmdlet with the -AddToCluster or -AddToCSV 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

-SnapshotCollectionName and -VolumeCollectionName options

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

-SnapshotCollection and -NimbleSnapshotCollection options

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

-VolumeCollectionName option

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

Clone volumes in a volume collection

Create crash-consistent snapshots of all volumes in the volume collection testvolcol, assign a name with the suffix Clone, and assign the next available drive letters to each cloned volume.

NOTE: If you want to create an application consistent snapshot and then clone it, use the -CreateAppConsistentSnapshot option.

Example

PS C:\Users\Administrator> Invoke-CloneNimVolumeCollection -VolumeCollectionName testvolcoll -Suffix '-clone' -AssignDriveletter
DeviceName        : \\.\physicaldrive19
SerialNumber      : adca2f8908943da26c9ce900edc625b7
GroupManagementIP : 10.18.236.42
NimbleVolumeName  : TestPS-Vol12
DiskSize          : 6289447.5
BusType           : Fibre
WindowsVolumes    : {f:\}
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  : ClonePsVolCol2-1172016120905
ParentVolumeName  : TestPS-Vol1

DeviceName        : \\.\physicaldrive20
SerialNumber      : ce233ae9de3bf3696c9ce900edc625b7
GroupManagementIP : 10.18.236.42
NimbleVolumeName  : TestPS-Vol21
DiskSize          : 7333672.5
BusType           : Fibre
WindowsVolumes    : {g:\}
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  : ClonePsVolCol2-1172016120905
ParentVolumeName  : TestPS-Vol2

DeviceName        : \\.\physicaldrive21
SerialNumber      : 9fa8fcb589471adb6c9ce900edc625b7
GroupManagementIP : 10.18.236.42
NimbleVolumeName  : TestPS-Vol31
DiskSize          : 8385930
BusType           : Fibre
WindowsVolumes    : {C:\mountpoints\3}
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  : ClonePsVolCol2-1172016120905
ParentVolumeName  : TestPS-Vol3

DeviceName        : \\.\physicaldrive22
SerialNumber      : 0832618bd191a9856c9ce900edc625b7
GroupManagementIP : 10.18.236.42
NimbleVolumeName  : TestPS-Vol41
DiskSize          : 12578895
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  : ClonePsVolCol2-1172016120905
ParentVolumeName  : TestPS-Vol4

DeviceName        : \\.\physicaldrive23
SerialNumber      : 898fcd3c82d251d96c9ce900edc625b7
GroupManagementIP : 10.18.236.42
NimbleVolumeName  : TestPS-Vol51
DiskSize          : 10482412.5
BusType           : Fibre
WindowsVolumes    : {C:\mountpoints\5}
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  : ClonePsVolCol2-1172016120905
ParentVolumeName  : TestPS-Vol5

Clone a snapshot collection and add to cluster as a CSV

Create a crash-consistent snapshot of all volumes in the testvolcoll volume collection, and add it as a CSV.

Example

PS C:\Users\Administrator> Invoke-CloneNimVolumeCollection -VolumeCollectionName testvolcoll -SnapshotCollectionName 'testvolcoll-daily-2016-08-24::10:01:01.389' -Suffix '-clone' -AddToCSV
DeviceName        : \\.\physicaldrive19
SerialNumber      : adca2f8908943da26c9ce900edc625b7
GroupManagementIP : 10.18.236.42
NimbleVolumeName  : TestPS-Vol12
DiskSize          : 6289447.5
BusType           : Fibre
WindowsVolumes    : {C:\ClusterSharedVolumes\Cluster Disk 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  : ClonePsVolCol2-1172016120905
ParentVolumeName  : TestPS-Vol1

DeviceName        : \\.\physicaldrive20
SerialNumber      : ce233ae9de3bf3696c9ce900edc625b7
GroupManagementIP : 10.18.236.42
NimbleVolumeName  : TestPS-Vol21
DiskSize          : 7333672.5
BusType           : Fibre
WindowsVolumes    : {C:\ClusterSharedVolumes\Cluster Disk 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
BaseSnapshotName  : ClonePsVolCol2-1172016120905
ParentVolumeName  : TestPS-Vol2

DeviceName        : \\.\physicaldrive21
SerialNumber      : 9fa8fcb589471adb6c9ce900edc625b7
GroupManagementIP : 10.18.236.42
NimbleVolumeName  : TestPS-Vol31
DiskSize          : 8385930
BusType           : Fibre
WindowsVolumes    : {C:\mountpoints\3}
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  : ClonePsVolCol2-1172016120905
ParentVolumeName  : TestPS-Vol3

Pipe Get-NimSnapshotCollection and clone the volumes in the snapshot collection

Pipe the Get-NimSnapshotCollection cmdlet to find the latest application-consistent snapshot collection, then create clones of the volumes with the AppObject of Payroll.

Example

PS C:\Users\Administrator> Get-NimSnapshotCollection -Verbose -MaxObjects 1 -VolumeCollectionName testvolcoll -AppObject 'Payroll' | Invoke-CloneNimVolumeCollection -Verbose -Suffix '-clone' -AssignDriveletter
DeviceName        : \\.\physicaldrive19
SerialNumber      : adca2f8908943da26c9ce900edc625b7
GroupManagementIP : 10.18.236.42
NimbleVolumeName  : TestPS-Vol12
DiskSize          : 6289447.5
BusType           : Fibre
WindowsVolumes    : {f:\}
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  : ClonePsVolCol2-1172016120905
ParentVolumeName  : TestPS-Vol1

DeviceName        : \\.\physicaldrive20
SerialNumber      : ce233ae9de3bf3696c9ce900edc625b7
GroupManagementIP : 10.18.236.42
NimbleVolumeName  : TestPS-Vol21
DiskSize          : 7333672.5
BusType           : Fibre
WindowsVolumes    : {g:\}
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  : ClonePsVolCol2-1172016120905
ParentVolumeName  : TestPS-Vol2

Clone volumes in a volume collection with access paths

Create crash-consistent snapshots of volumes in the volume collection ClonePsVolCol2 and assign mount points.

Example

PS C:\Users\Administrator> Invoke-CloneNimVolumeCollection -VolumeCollectionName ClonePsVolCol2 -AccessPath  "C:\mountpoints\1","C:\mountpoints\2","C:\mountpoints\3","C:\mountpoints\4","C:\mountpoints\5" -GroupMgmtIP 10.18.236.42 -InitiatorGroup Hyper-V-Cluster
DeviceName        : \\.\physicaldrive19
SerialNumber      : adca2f8908943da26c9ce900edc625b7
GroupManagementIP : 10.18.236.42
NimbleVolumeName  : TestPS-Vol12
DiskSize          : 6289447.5
BusType           : Fibre
WindowsVolumes    : {C:\mountpoints\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  : ClonePsVolCol2-1172016120905
ParentVolumeName  : TestPS-Vol1

DeviceName        : \\.\physicaldrive20
SerialNumber      : ce233ae9de3bf3696c9ce900edc625b7
GroupManagementIP : 10.18.236.42
NimbleVolumeName  : TestPS-Vol21
DiskSize          : 7333672.5
BusType           : Fibre
WindowsVolumes    : {C:\mountpoints\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
BaseSnapshotName  : ClonePsVolCol2-1172016120905
ParentVolumeName  : TestPS-Vol2

DeviceName        : \\.\physicaldrive21
SerialNumber      : 9fa8fcb589471adb6c9ce900edc625b7
GroupManagementIP : 10.18.236.42
NimbleVolumeName  : TestPS-Vol31
DiskSize          : 8385930
BusType           : Fibre
WindowsVolumes    : {C:\mountpoints\3}
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  : ClonePsVolCol2-1172016120905
ParentVolumeName  : TestPS-Vol3

DeviceName        : \\.\physicaldrive22
SerialNumber      : 0832618bd191a9856c9ce900edc625b7
GroupManagementIP : 10.18.236.42
NimbleVolumeName  : TestPS-Vol41
DiskSize          : 12578895
BusType           : Fibre
WindowsVolumes    : {C:\mountpoints\4}
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  : ClonePsVolCol2-1172016120905
ParentVolumeName  : TestPS-Vol4

DeviceName : \\.\physicaldrive23
SerialNumber : 898fcd3c82d251d96c9ce900edc625b7
GroupManagementIP : 10.18.236.42
NimbleVolumeName : TestPS-Vol51
DiskSize : 10482412.5
BusType : Fibre
WindowsVolumes : {C:\mountpoints\5}
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 : ClonePsVolCol2-1172016120905
ParentVolumeName : TestPS-Vol5