## 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

Name | Type | Description | Required? | Pipeline Input | Default Value
--- | --- | --- | --- | --- | ---
MultipathPolicy | ScsiLunMultipathPolicy | Specifies 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. | false | true (ByValue)
PreferredPath | ScsiLunPath | Specifies 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. | false | true (ByValue)
ScsiLun | ScsiLun[] | Specifies the SCSI device you want to configure. | true | true (ByValue)
BlocksToSwitchPath | Int32 | Specifies 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. | false | false
CommandsToSwitchPath | Int32 | Specifies 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. | false | false
Confirm | SwitchParameter | If 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. | false | false
DeletePartitions | SwitchParameter | Removes all partitions from the SCSI disk. A confirmation prompt appears. If Force is specified, the confirmation prompt does not appear and partitions are removed. | false | false
Force | SwitchParameter | Indicates 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. | false | false
IsLocal | Boolean | Marks 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. | false | false
IsLocatorLedOn | Boolean | Turns the LED locator of a SCSI disk on or off. | false | false
IsSsd | Boolean | Marks 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. | false | false
NoBlocksSwitch | SwitchParameter | Indicates that switching based on blocks is disabled. Not supported on vCenter Server 4.x. | false | false
NoCommandsSwitch | SwitchParameter | Indicates that switching based on commands is disabled. Not supported on vCenter Server 4.x. | false | false
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false

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.