VMware Cloud Community
nblr06
Enthusiast
Enthusiast
Jump to solution

Remove storage device from inventory after the removal of disk

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.

nblr06_0-1611633058358.png

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?

 

0 Kudos
1 Solution

Accepted Solutions
ashilkrishnan
VMware Employee
VMware Employee
Jump to solution

@nblr06 ,

Yes, you can run 'esxcli storage core device set --state=off -d NAA_ID' followed by the 'detached remove -d NAA ID' command

View solution in original post

0 Kudos
4 Replies
ashilkrishnan
VMware Employee
VMware Employee
Jump to solution

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

 

0 Kudos
scott28tt
VMware Employee
VMware Employee
Jump to solution

@nblr06 

Moderator: Moved to vSphere Discussions - not specific to vCenter Server.


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
0 Kudos
nblr06
Enthusiast
Enthusiast
Jump to solution

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 

 

 

0 Kudos
ashilkrishnan
VMware Employee
VMware Employee
Jump to solution

@nblr06 ,

Yes, you can run 'esxcli storage core device set --state=off -d NAA_ID' followed by the 'detached remove -d NAA ID' command

0 Kudos