NAME
Set-DcsVirtualLogicalUnitProperties
SYNOPSIS
Sets the preferred path option and access rights for the front-end path of a logical disk.
SYNTAX
Set-DcsVirtualLogicalUnitProperties -VirtualLogicalUnit <Object> [ -Access <LogicalUnitAccess> ] [ -PreferredPathOption <PreferredPathOption> ] [ -Connection <String> ] [ -PipelineVariable <String> ]
DESCRIPTION
Sets the preferred path option and access rights for the front-end path of a logical disk. Note: To change the LUN, the virtual logical unit must be removed and re-added with the new LUN specified. (See Remove-DcsVirtualLogicalUnit and Add-DcsVirtualLogicalUnit)
PARAMETERS
- -VirtualLogicalUnit<Object>
- VirtualLogicalUnitData object, ID or name (caption) that identifies the virtual logical unit (path of a logical disk).
-
- Required: true
- Position: 1
- Default value:
- Accept pipeline input: true (ByValue)
- Accept wildcard characters: false
-
- -Access<LogicalUnitAccess>
- The client (host) access rights to assign for the front-end path. Valid values include "ReadWrite", "ReadOnly", and "NoAccess".
-
- Required: false
- Position: 2
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -PreferredPathOption<PreferredPathOption>
- Sets the preferred path option for the logical disk path. Possible parameter values are "NotSet", "NotPreferred", or "Preferred". The value "NotSet" will allow the preferred path to be auto-selected by the software, which will select the path to the first server used when the virtual disk was created (see Add-DcsVirtualDisk for first server). The value "NotPreferred" will make the path not preferred no matter which server is the first server and regardless of the preferred server setting for a client (see Set-DcsClientProperties).
-
- Required: false
- Position: 3
- 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 is 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
VirtualLogicalUnitData : Object that identifies and describes the virtual logical unit (path of a logical disk on a server).
OUTPUTS
VirtualLogicalUnitData : Object that identifies and describes the virtual logical unit (path of a logical disk on a server).
NOTES
Also see Add-DcsVirtualLogicalUnit, Get-DcsVirtualLogicalUnit, Remove-DcsVirtualLogicalUnit. To set back-end or mirror preferred path options for Fibre Channel paths, see Set-DcsDiskPathPreference.
EXAMPLES
$LD1 | Set-DcsVirtualLogicalUnitProperties -Access "ReadOnly"
A VirtualLogicalUnitData object is stored in the variable $LD1. This variable is piped to the cmdlet Set-DcsVirtualLogicalUnitProperties to change the access rights to "ReadOnly" and the updated object is returned.
LogicalDiskId | : | LD:CB06D908-CED2-48CC-B9FD-FBFF58F63604_V.{dd9cac8a-5658-11e1-920a-00155d11e929}-00000001 |
VirtualTargetDeviceId | : | d85bf872-e173-48a9-9112-0fc949774aca |
Lun | : | 0 |
Access | : | ReadOnly |
Type | : | Client |
Preferred | : | True |
Enabled | : | True |
Id | : | a4fa8b01-37a3-46b6-bbb5-bebf5c9b6cec |
Caption | : | iSCSI Port 1 on Host3 | Server iSCSI Port 3 on SSV1 | LUN 0 |
ExtendedCaption | : | iSCSI Port 1 on Host3 | Server iSCSI Port 3 on SSV1 | LUN 0 |
Internal | : | False |
$LD = Get-DcsVirtualLogicalUnit -InitiatorHost HostVM1 -TargetHost SSVVM1 -VirtualDisk "Virtual disk 1" $LD[0] | Set-DcsVirtualLogicalUnitProperties -PreferredPathOption Preferred
The cmdlet Get-DcsVirtualLogicalUnit is invoked to obtain the VirtualLogicalUnitData objects for the paths between the initiator ports on the host named HostVM1 and the target ports on the server SSVVM1. Two objects were returned and stored in the variable $LD. The first object in this variable is piped to the cmdlet Set-DcsVirtualLogicalUnitProperties to set the preferred path option to "Preferred" and the updated object is returned.
LogicalDiskId | : | aa9f301c-6e65-4d81-afa4-07d0b014900e |
VirtualTargetDeviceId | : | 168d8793-6554-48f0-a389-1ca2b6ca52c7 |
PhysicalDiskId | : | b6d3b0f116944db8a188caf1c5654d2d-7e861baa7d474da5ad559be8d2144f85 |
Lun | : | 0 |
Access | : | ReadWrite |
Type | : | Client |
Preferred | : | Preferred |
Enabled | : | True |
Sequencenumber | : | 3019 |
Id | : | 6035da7b-172f-4c3c-8460-e85c69f6599c |
Caption | : | iSCSI Port 1 on HostVM1 | Server iSCSI Port 2 on SSVVM1 | LUN 0 |
ExtendedCaption | : | iSCSI Port 1 on HostVM1 | Server iSCSI Port 2 on SSVVM1 | LUN 0 |
Internal | : | False |