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 6.5
VMware vSphere 6.7
VMware vSphere 7.x
VMware vSphere 8.x
 

Resolution

You can perform a rescan in these ways:
Note: Performing a rescan does not cause a service interruption.
 
 

Using the VMware vSphere Client 

To rescan using the Webclient:
  • Log in to the vCenter web client GUI and select an ESXi host in your inventory.
  • Right Click on the host and navigate to Storage > Rescan Storage 

 

  • You would 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 recanning for an new VMFS volumes, all rescan all the detected devices for a VMFS backed volume (datastore). 
  • You could select either both of the options at the same time or you could run these tasks individually. 
  • Monitor the progress of the rescan task in the Work In Progress tab on the right or from the ESX/ESXi host console in the /var/log/vmkernel.log  and /var/log/vobd.log log files. 
Note:
The Rescan in the VI 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. You may need 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. You may 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 HBA's 
​​​esxcli storage core adapter rescan -a
or 
esxcli storage core adapter rescan --all 

 

Note: 
To get a list of all adapters, run the either of the following commands : 

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/  

Additional Information