NAME
Add-DcsVirtualLogicalUnit
SYNOPSIS
Adds a front-end or mirror path for the specified logical disk.
SYNTAX
Add-DcsVirtualLogicalUnit [ -InitiatorHost <String> ] [ -TargetHost <String> ] [ -InitiatorPort <String> ] [ -TargetPort <String> ] -LogicalDisk <Object> -MappingType <String> [ -LUN <UInt64> ] [ -Access <String> ] [ -Connection <String> ] [ -PipelineVariable <String> ]
DESCRIPTION
Adds a front-end or mirror path for the specified logical disk. Virtual disks are created from one (single or dual) or two (mirrored) logical disks (storage sources). This cmdlet will serve the logical disk to a host or create a mirror path if applicable. To serve a mirrored virtual disk to a host, invoke this cmdlet twice; once for each logical disk. Paths can be created by specifying the initiator and target hosts with or without specifying the ports. When ports are not specified, the software will select appropriate ports to create the path.
PARAMETERS
- -InitiatorHost<String>
- Computer name or ID of the server, or the name or ID of the client host to be used as the initiator. The computer name of a server must be unique or the name must be fully qualified.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -TargetHost<String>
- Computer name or ID of the server to be used as the target. The computer name must be unique or the name must be fully qualified.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -InitiatorPort<String>
- Name, ID, or address of the initiator port. To uniquely identify a port by name, the initiator host must be specified.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -TargetPort<String>
- Name, ID, or address of the target port. To uniquely identify a port by name, the target host must be specified.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -LogicalDisk<Object>
- LogicalDiskData object, ID or caption that identifies the logical disk of the virtual disk on a server. When creating mirror paths, the logical disk should be the target side of the mapping (path).
-
- Required: true
- Position: named
- Default value:
- Accept pipeline input: true (ByValue)
- Accept wildcard characters: false
-
- -MappingType<String>
- Specify "Mirror" to add a mirror path, or "Client" to add a front-end path.
-
- Required: true
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -LUN<UInt64>
- The number to assign to the logical unit (LUN). If not specified, the next available LUN will be assigned.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -Access<String>
- The access rights to assign. Valid values for a client mapping type include "ReadWrite", "ReadOnly", and "NoAccess". The valid value for mirror mapping type is "ReadWrite". If not specified, the default value of "ReadWrite" will be assigned.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -Connection<String>
- Alias of the connection to the server group. If not specified, the default connection will be used.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -PipelineVariable<String>
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
INPUTS
LogicalDiskData : Object that identifies and describes the logical disk.
OUTPUTS
VirtualLogicalUnitData : Object that identifies and describes the path of the logical disk.
NOTES
Also see Get-DcsLogicalDisk, Get-DcsVirtualLogicalUnit, Remove-DcsVirtualLogicalUnit, Set-DcsVirtualLogicalUnitProperties.
EXAMPLES
$LDisk = Get-DcsLogicalDisk -VirtualDisk "Virtual disk 1" Add-DcsVirtualLogicalUnit -InitiatorHost "Server2" -InitiatorPort "Server FC Port 1" -TargetHost "Server1" -TargetPort "Server FC Port 2" -LogicalDisk $LDisk[0] -MappingType Mirror
The cmdlet Get-DcsLogicalDisk is invoked to obtain the LogicalDiskData objects that comprise the virtual disk named "Virtual disk 1" and the results are stored in the variable named $LDisk. In this case, Virtual disk 1 is a mirrored virtual disk and has two logical disk objects (storage sources) stored in the variable $LDisk: $LDisk[0] represents the primary side of the mirror, and $LDisk[1] the secondary side. Then the cmdlet Add-DcsVirtualLogicalUnit is invoked to create a mirror mapping (path) between the target on the server named "Server1" and the initiator on the server named Server2" using $LDisk[0], which is the logical disk on the target side of the mapping. The path is identified by the initiator port "Server FC Port 1" on "Server2" and the target port "Server FC Port 2" on "Server1". The mapping type is specified as "Mirror".
LogicalDiskId | : | LD:D3B57824-4E23-4DBB-947B-F8EF13A6CBAD_V.{1db06ce0-e5f0-11e0-8a13-001d7d93b174}-00000003 |
VirtualTargetDeviceId | : | 72f8741f-4485-466b-b5bc-ddf6f494b6d2 |
Lun | : | 0 |
Access | : | ReadWrite |
Type | : | Mirror |
Preferred | : | True |
Enabled | : | True |
Id | : | 35192e3b-3c8e-4568-9baf-88a001540baf |
Caption | : | Server FC Port 1 on server2 | Server FC Port 2 on Server1 | LUN 0 |
ExtendedCaption | : | Server FC Port 1 on server2 | Server FC Port 2 on Server1 | LUN 0 |
Internal | : | False |
$LDisk = Get-DcsLogicalDisk -VirtualDisk "Virtual disk 1" Add-DcsVirtualLogicalUnit -InitiatorHost "Host3" -TargetHost "Server1" -InitiatorPort "iSCSI Port 1" -TargetPort "Server iSCSI Port 1" -LogicalDisk $LDisk[0] -MappingType Client -LUN 3
The cmdlet Get-DcsLogicalDisk is invoked to obtain the LogicalDiskData objects that comprise the virtual disk named "Virtual disk 1" and the results are stored in the variable named $LDisk. Then the cmdlet Add-DcsVirtualLogicalUnit is invoked to create a front-end path for the specified logical disk $LDisk[0]. The path is identified as the initiator port "iSCSI Port 1" on the client named "Host3" and the target specified as "Server iSCSI Port 1" on the server named "Server1". The variable $LDisk is used to provide the LogicalDiskData object. The mapping type is specified as "Client", which creates a front-end path and the LUN is specified as "3".
LogicalDiskId | : | LD:D3B57824-4E23-4DBB-947B-F8EF13A6CBAD_V.{1db06ce0-e5f0-11e0-8a13-001d7d93b174}-00000003 |
VirtualTargetDeviceId | : | 7e2a8d17-0018-4eab-8325-a6980da11fb6 |
Lun | : | 3 |
Access | : | ReadWrite |
Type | : | Client |
Preferred | : | True |
Enabled | : | True |
Id | : | 22cdc3f6-e8c0-493c-904c-ab27e8690598 |
Caption | : | iSCSI Port 1 on Host3 | Server iSCSI Port 1 on Server1 | LUN 3 |
ExtendedCaption | : | iSCSI Port 1 on Host3 | Server iSCSI Port 1 on Server1 | LUN 3 |
Internal | : | False |
Add-DcsVirtualLogicalUnit -InitiatorHost "HostVM1" -TargetHost "SSVVM03" -LogicalDisk (Get-DcsLogicalDisk -VirtualDisk "VD1") -MappingType "Client"
A front-end (client) path is created from the initiator on the computer "HostVM1" to a target on the server "SSVVM03" for the logical disk contained in the virtual disk "VD1" on the server "SSVVM03". Since ports are not specified, the software will select the appropriate ports on the specified machines in order to create the specified mapping type.
LogicalDiskId | : | c3ca5cb7-2b9c-40b7-9591-5591dd8001c7 |
VirtualTargetDeviceId | : | af83d50e-5ee4-4a84-924e-63a487c47ec5 |
PhysicalDiskId | : | 549da3ce079b49cb9f895d884042722a-4ccc0a8cf91543a6b43aa43d1b677bbe |
Lun | : | 0 |
Access | : | ReadWrite |
Type | : | Client |
Preferred | : | NotSet |
Enabled | : | True |
Sequencenumber | : | 27051 |
Id | : | 26890758-f8fe-449a-aec7-a4a14c2bf141 |
Caption | : | iSCSI Port 1 on HostVM1 | Server iSCSI Port 3 on SSVVM03 | LUN 0 |
ExtendedCaption | : | iSCSI Port 1 on HostVM1 | Server iSCSI Port 3 on SSVVM03 | LUN 0 |
Internal | : | False |