Changing the Disk.MaxLUN parameter on ESXi Hosts
search cancel

Changing the Disk.MaxLUN parameter on ESXi Hosts


Article ID: 342823


Updated On:


VMware vCenter Server VMware vSphere ESXi


As per the configuration maximums related to ESXi host storage, the supported SCSI storage devices (LUNs that are presented to ESX host) till vSphere 5.5 is limited to 256 (0 to 255). From vSphere 6.0 onwards the allowed SCSI storage devices count is increased to 1024 (0 to 1023).
ESXi hosts ignore LUNs if the count is exceeding 1024. This limit is controlled by Disk.MaxLUN, which was increased from 256 to 1024 by default in vSphere 6.0.

The value of Disk.MaxLUN also determines how many LUNs the SCSI scan code attempts to discover using individual INQUIRY commands if the SCSI target does not support direct discovery using REPORT_LUNS.

You can modify the Disk.MaxLUN parameter depending on your needs. For example, if your environment has a smaller number of storage devices with LUN IDs from 0 through 100, you can set the parameter to 101 to improve device discovery speed on targets that do not support REPORT_LUNS. In this case, lowering the value can shorten the rescan time and boot time. However, the time to rescan storage devices might depend on other factors, including the type of storage system and the load on the storage system.


VMware vSphere ESXi 6.0
VMware vSphere ESXi 5.5
VMware vCenter Server 6.0.x
VMware vCenter Server 5.5.x


To change the value of Disk.MaxLUN:

  1. Browse to the host in the vSphere Web Client navigator.
  2. Click the Manage tab, and click Settings.
  3. Under System, click Advanced System Settings.
  4. Under Advanced System Settings, select Disk.MaxLUN and click the Edit icon.
  5. Change the existing value to the value of your choice, and click OK.

    The value you enter specifies the highest LUN to be recognized and used by the system. For example, to discover and use LUNs from 0 through 100, set Disk.MaxLUN to 101.
Its not recommended to use the "software LUN masking" due to the potential errors. At least be aware that this kind of LUN masking may possibly result in LUN trespassing from the array side with the host.

If the Disk.MaxLUN is reduced from the present value applied to the host then ensure that no LUNs with LU numbers above the specified value are in use by the ESX Server. For this, you need to ensure that you are detaching the LUNs successfully.