ESXi storage rescan task hangs after the storage device is unmasked.
search cancel

ESXi storage rescan task hangs after the storage device is unmasked.

book

Article ID: 429293

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

  • 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-#########

Environment

VMware vSphere ESXi 7.x

VMware vSphere ESXi 8.x

Cause

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.

Resolution

To prevent storage rescan hang issue, follow the standard LUN removal sequence:

  1. Unmount and detach the storage device from the ESXi host.

  2. Perform a storage rescan : Performing a rescan of the storage on an ESXi host

  3. Unmask the LUN from the storage array.

  4. 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.

Additional Information

Detach a LUN device from ESXi hosts