Storage rescan task on ESXi host fails to complete following device unmount, detach, and unmasking operations.
vSphere Client reports a "Time out" status after 30 minutes.
Concurrent ESXi tasks such as maintenance mode task hangs and causes vCenter Server performance degradation.
/var/run/log/hostd.log on ESXi host records "Task Created" entries without corresponding "Task Completed" events.
YYYY-MM-DDThh:mm:ss.xxxZ In(###) Hostd[#######]: [Originator@#### sub=Vimsvc.TaskManager opID=########-##-#### sid=######## user=vpxuser:VSPHERE.LOCAL\Administrator] Task Created : haTask-ha-host-vim.host.StorageSystem.rescanAllHba-#########
VMware vSphere ESXi 7.x
VMware vSphere ESXi 8.x
The hostd process freezes while it waits indefinitely for a response from the kernel/SCSI subsystem regarding a LUN that was unpresented from the storage array before the host had cleared its internal cache.
To prevent storage rescan hang issue, follow the standard LUN removal sequence:
Unmount and detach the storage device from the ESXi host.
Perform a storage rescan : Performing a rescan of the storage on an ESXi host
Unmask the LUN from the storage array.
Perform a final storage rescan.
If a rescan task is already hung, an ESXi host reboot is required to terminate residual processes.
Note: Restarting Management Agents may resolve the issue; however, in cases of storage inconsistency, the restart may fail, necessitating a host reboot.