Discovering new storage LUNs

For block-based storage, the different logical disks are provided to the ESXi storage subsystem with a unique logical unit number (LUN) identifier.

The same LUN cannot be presented to an ESXi host through different storage protocols, such as iSCSI and Fibre Channel.

If you are adding new LUNs (or modifying the LUNs geometry), then you might need to rescan your storage to see the changes at the ESXi level. There are two different types of storage rescan: automatic and manual.

Automatic rescan is performed directly by the vCenter Server on all the hosts in the same cluster. This feature can be turned off with a specific vCenter advanced option: Config.vpxd.filter.hostRescanFilter.

By default, when you perform VMFS datastore management operations, such as creating a VMFS datastore, or increasing or deleting a VMFS datastore, vCenter Server will automatically rescan and update your storage on all the hosts.

But in certain cases, you need to perform a manual rescan, and there are different levels where you can perform it: at adapter level, at host level, and also at the cluster level.

If the storage changes are limited to storage connected through a specific adapter, then you can perform a rescan at adapter level.

You can use the vSphere Web Client, select an ESXi host, then, in the Configure tab, select the Storage Adapters menu in the Storage section. Now, select the desired adapter and click on the rescan icon to rescan:

Figure 3.1: Host adapter storage rescan
It's also possible to rescan all the adapters at the same time, but not from the vSphere Web Client (for example, it's possible from the host UI or a new vSphere Client in HTML5).

When the storage changes are extended to all the adapters (and maybe to all the hosts in a cluster), you need to perform a wider storage rescan.

With the new vSphere Client, it's possible to rescan all the storage and the datastore at the host level, but this function is not available in the vSphere Web Client.

Otherwise, you can rescan the storage on all the hosts in a cluster using the vSphere Web Client by selecting a cluster and then going to the Storage | Rescan Storage... menu:

Figure 3.2: Cluster storage rescan

You must choose how to perform the rescan:

  • Scan for new Storage Devices: Rescan all adapters to discover new storage devices. If new devices are discovered, they appear in the device list.
  • Scan for new VMFS Volumes: Rescan all storage devices to discover new datastores that have been added since the last scan. Any new datastores appear in the datastore list:
Figure 3.3: Storage rescan options

The progress of the rescan can be monitored in the /var/log/vmkernel file on each ESXi host.

You need to perform a manual rescan each time you make one of the following changes:

  • Changes in the SAN fabric zoning
  • Creation of new LUNs
  • Changing of the path masking on a host
  • Reconnecting a SAN (or SAS) cable
  • Changing some iSCSI configuration (such as CHAP settings)
  • Adding a single host to the vCenter Server after you have changed some shared storage setting

The range of scanned LUN IDs for an ESXi host can be from 0 to 16,383. ESXi ignores LUN IDs greater than 16,383.

The configurable Disk.MaxLUN parameter controls the range of the scanned LUN ID. The parameter has a default value of 1024. Note that vSphere 6.x supports more than 256 LUNs and that, in most storage, LUN 256 and 257 may be used by vVols.

vCenter automatically hides some LUNs, such as RDM LUNs; this behavior will be described later.

For more information, see the vSphere 6.5 Storage guide (https://docs.vmware.com/en/VMware-vSphere/6.5/com.vmware.vsphere.storage.doc/GUID-D0595EB3-D20C-4951-88EF-5AFB0BF2398D.html).