Rescanning for new storage devices
After creating a Logical Unit Number (LUN) on your Fibre Channel storage system and presenting the LUN to your ESXi servers, you have to rescan the
HBAs on the ESXi servers before you can create a datastore on the LUN. An ESXi host will not see a newly attached LUN before a rescan is performed. You can use the Get-VMHostStorage
cmdlet to rescan the HBAs of a host. The Get-VMHostStorage
cmdlet has the following syntax:
Get-VMHostStorage [-VMHost] <VMHost[]> [-Refresh] [-RescanAllHba] [-RescanVmfs] [-Server <VIServer[]>] [<CommonParameters>] Get-VMHostStorage -Id <String[]> [-Server <VIServer[]>] [<CommonParameters>]
The –VMHost
and –Id
parameters are required.
In the next example, we will rescan all of the HBAs of the hosts of the cluster Cluster01
:
PowerCLI C:\> Get-Cluster -Name Cluster01 | >> Get-VMHost | Get-VMHostStorage -RescanAllHba >>
The following is the output of the preceding command:
SoftwareIScsiEnabled...