I have a vSphere 6.7 environment with vCenter server.
I'm removing some local disks from ESXi host, however, after the unplugging of disks they still live in the inventory of storage devices, as shown in figure below.
The steps I used to remove the disks is :
1. move away all the data from these datastore(s).
2.delete the datastore(s) successfully.
3. detach the disks
4. unplug the disks without entering the host into maintenance mode or shut the host down.
Now I got these devices hanging at "dead or error" state and they cannot be removed from inventory even after refresh device/ rescan storage adapter.
Does anyone know what is the proper sequence to remove local disks from vcenter server client and how to clear out these remaining items in inventory?
@nblr06 ,
Yes, you can run 'esxcli storage core device set --state=off -d NAA_ID' followed by the 'detached remove -d NAA ID' command
Hi @nblr06 ,
Detailed procedure is listed here --> https://kb.vmware.com/s/article/2004605
Detaching device doesn't remove the devices completely even after a rescan, so we have to some times force remove them. Once the devices are detached, perform a storage rescan, set the device status off and remove them via command line.(Instructions listed in article above).
If the devices are still present, a reboot would be required.
Hope that helps
Moderator: Moved to vSphere Discussions - not specific to vCenter Server.
okay, unfortunately I got my host rebooted to clean up the removed disks from inventory list before I see your post.(So the disks are now disappeared from inventory)
So...If I wanna force remove the devices from inventory in vCenter then I should use this command line to "permanently remove the device configuration information": # esxcli storage core device detached remove -d NAA_ID
Is it the only cmd line to clean up storage devices in list?
thanks! @ashilkrishnan
@nblr06 ,
Yes, you can run 'esxcli storage core device set --state=off -d NAA_ID' followed by the 'detached remove -d NAA ID' command