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

Resolution

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

Using the VMware vSphere Web 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 
 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 
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
 
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

      VMware Skyline Health Diagnostics for vSphere - FAQ
      Tech Support Mode for Emergency Support
      Using Tech Support Mode in ESXi 4.1, ESXi 5.x, and ESXi 6.x
      Fazer uma nova verificação do armazenamento
      Nuevo análisis del almacenamiento en un host ESX/ESXi
      iSCSI SAN ストレージアレイに接続している ESXi 5.0 ホストでホストプロファイルの作成ができない
      一つ以上の RDM のディスクが接続された仮想マシンの移行が、次のエラーで失敗する:Target disc should be different than the source disc, unable to access file
      对 ESX/ESXi 主机上的存储执行重新扫描
      ESX/ESXi ホスト上のストレージの再スキャンの実行