Performing a rescan of the storage on an ESXi host
search cancel

Performing a rescan of the storage on an ESXi host

book

Article ID: 308546

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article explains how to perform a rescan of storage devices. A rescan of storage devices is needed when a storage device has been added, removed, or changed from the array.

For information on troubleshooting LUN connectivity issues, see Troubleshooting LUN connectivity issues on ESXi hosts.

Environment

VMware vSphere 7.x
VMware vSphere 8.x

Resolution

Methods to perform a rescan:
  • Using the VMware vSphere Client 
  • Using the ESXi Command Line Interface
Note: Performing a rescan does not cause a service interruption.
 
 

Using the VMware vSphere Client 

To rescan using the web vSphere Client:
  • Log in to the vCenter web client GUI and select an ESXi host in the inventory.
  • Right-click on the host and navigate to Storage > Rescan Storage 

 

  • A window will appear to be prompted to either Scan for new Storage Device or Scan for new VMFS Volumes 
  • The first option for rescanning for new storage devices, shall rescan all available adapters to look for any new devices that have been detected (or retire devices that are no longer in use - as part of a cleanup).
  • The second option for rescanning for an new VMFS volumes, all rescan all the detected devices for a VMFS backed volume (datastore). 
  • Select either both of the options at the same time or run these tasks individually. 
  • Monitor the progress of the rescan task in the Work In Progress tab on the right or from the ESXi host console in the /var/log/vmkernel.log  and /var/log/vobd.log log files. 
Note:
The rescan in the vSphere Client, by default, combines the rescan for new LUNs (and removal of retired ones) with the detection of new VMFS data stores, depending on which check boxes are selected when the rescan is initiated. The rescan and datastore detection are asynchronous processes. As a result, the detection process for new data stores may complete before the detection process for new LUNs is complete. It may be needed to perform the rescan twice if the newly added LUN has a VMFS data store on it, or perform an HBA rescan and VMFS rescan in separate tasks. Select either or both of the two to be performed, per a modal dialog box when initially beginning a rescan.
 
 

Using the ESXi Command Line Interface

To perform a rescan from the ESXi host command-line:
  1. Log in to the ESXi host console. 
  2. To rescan, run one of these commands:
    • To rescan a specific HBA
esxcli storage core adapter rescan -A <vmkernel SCSI adapter name>

or
 
esxcli storage core adapter rescan --adapter=<vmkernel SCSI adapter name>

Where <vmkernel SCSI adapter name> is the vmhba# to be rescanned.

Example:

esxcli storage core adapter rescan -A vmhba3 | --adapter=vmhba3
 

  • To rescan all HBAs
​​​esxcli storage core adapter rescan -a

or 

esxcli storage core adapter rescan --all 
 
Note
To get a list of all adapters, run the following command(s):

esxcfg-scsidevs -a

or

esxcli storage core adapter list 

  1. To search for new VMFS datastores, run this command:
vmkfstools -V


Note: This command does not generate any output.

If a new datastore has been detected, it is mounted in /vmfs/volumes/.