PowerCLI Reference

Set-ScsiLun

Synopsis

This cmdlet modifies the configuration of a SCSI device.

Syntax

Set-ScsiLun [[-MultipathPolicy] <ScsiLunMultipathPolicy>] [[-PreferredPath] <ScsiLunPath>] [-ScsiLun] <ScsiLun[]> [-CommandsToSwitchPath <Int32>] [-BlocksToSwitchPath <Int32>] [-NoCommandsSwitch] [-NoBlocksSwitch] [-IsSsd <Boolean>] [-IsLocal <Boolean>] [-IsLocatorLedOn <Boolean>] [-DeletePartitions] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-ScsiLun
Get-ScsiLunPath
Set-ScsiLunPath

Detailed Description

This cmdlet modifies the configuration of a SCSI device.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
MultipathPolicyScsiLunMultipathPolicySpecifies the policy that the logical unit must use when choosing a path. The following values are valid:

Fixed - uses the preferred path whenever possible.
RoundRobin - load balance.
MostRecentlyUsed - uses the most recently used path.
Unknown - supported only when connected to vCenter Server 4.1/ESX 4.1.

Passing values to this parameter through a pipeline is deprecated and will be disabled in a future release.
falsetrue (ByValue)
PreferredPathScsiLunPathSpecifies the preferred path to access the SCSI logical unit. Passing values to this parameter through a pipeline is deprecated and will be disabled in a future release.falsetrue (ByValue)
ScsiLunScsiLun[]Specifies the SCSI device you want to configure.truetrue (ByValue)
BlocksToSwitchPathInt32Specifies the maximum number of I/O blocks to be issued on a given path before the system tries to select a different path. Modifying this setting affects all ScsiLun devices that are connected to the same ESX/ESXi host. The default value is 2048. Setting this parameter to zero (0) disables switching based on blocks.falsefalse
CommandsToSwitchPathInt32Specifies the maximum number of I/O requests to be issued on a given path before the system tries to select a different path. Modifying this setting affects all ScsiLun devices that are connected to the same ESX host. The default value is 50. Setting this parameter to zero (0) disables switching based on commands. This parameter is not supported on vCenter Server 4.x.falsefalse
ConfirmSwitchParameterIf the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation.falsefalse
DeletePartitionsSwitchParameterRemoves all partitions from the SCSI disk. A confirmation prompt appears. If Force is specified, the confirmation prompt does not appear and partitions are removed.falsefalse
ForceSwitchParameterIndicates that you want to suppress the prompt that appears when DeletePartitions is specified. If Force is specified, you are not asked for confirmation when deleting disk partitions.falsefalse
IsLocalBooleanMarks the SCSI disk as local or remote. If the value is $true, the SCSI disk is local. If the value is $false, the SCSI disk is remote.falsefalse
IsLocatorLedOnBooleanTurns the LED locator of a SCSI disk on or off.falsefalse
IsSsdBooleanMarks the SCSI disk as an SSD or HDD. If the value is $true, the SCSI disk is SSD type. If the value is $false, the SCSI disk is HDD type.falsefalse
NoBlocksSwitchSwitchParameterIndicates that switching based on blocks is disabled. Not supported on vCenter Server 4.x.falsefalse
NoCommandsSwitchSwitchParameterIndicates that switching based on commands is disabled. Not supported on vCenter Server 4.x.falsefalse
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse

Return Type

Zero or more modified ScsiLun objects

Notes

Examples

-------------- Example 1 --------------

$scsilun = Get-ScsiLun -VMHost 10.23.123.100 -LunType disk

Set-ScsiLun -ScsiLun $scsilun -CommandsToSwitchPath 100

Configures the SCSI Lun device of the virtual machine host, so that the maximum number of I/O requests to be issued before the system tries to select a different path is 100.


Copyright © VMware, Inc. All rights reserved.