Just a quick one. Apparently a simple issue. I wanted to completely un-mount an iSCSI Datastore on just one ESXi host in a Cluster. In case you wonder why, the answer is “for testing purposes”.
The vSphere Client has an option to accomplish this task. Select the desired Datastore, right-click and select “Unmount” from the menu. After a few moments, the affected Datastores disappears from the overview. Now select the “Devices” view and you will notice that the device is still there. Select “Properties” and “Manage Paths..” and connections are still there.
I have tried quite a few things to completely remove all traces. Fortunately there is a simple solution. Just perform the following steps, you do not need to perform the unmount procedure.
The first step is to remove the ESXi host from the access list. This depends on the shared storage solution. In this example an Equallogic series. Select the Volume, go to the “Access” tab and remove the ESXi host from the list.
Then go to the “Connections” tab and notice that the connections are still there.
Now return to the vSphere Client and connect to your vCenter Server. Select the ESXi host. Go to the “Configuration” tab and from there, Software and “Storage adapters“. Select the “iSCSI Software adapter” (in this example the iSCSI adapter we use is vmhba38) and select “Properties“.
Select the “Static Discovery” tab. Select the iSCSI target you want to remove and click the “Remove” button.
Next, you will be asked to perform a rescan of the hba, that is a pretty good idea.
When finished, go to “Storage” and check the “Datastore” and “Devices” view, the Datastore is gone.
Final step return to your Storage management interface and notice that all Connections are gone now. The Datastore is completely removed from the host.
Thank you very much for reading. I hope it was helpful.