Unmounting and Removing a Datastore Being Retired Fails on a ESCi Host

Mindwatering Incorporated

Author: Tripp W Black

Created: 03/01/2019 at 02:14 AM

 

Category:
VMWare
Host Configuration

Issue:
We are retiring an old iSCSI storage from our vSphere environment.

Using the VSCA vSphere (HTML5) web client, we successfully used the Unmount and Remove Datastore commands to remove it from our hosts in a cluster.
Thinking we were really successful, we proceeded to shutdown and remove the iSCSI storage from the rack.

However, when visited one our ESXi hosts to confirm another datastore expansion was done okay, we found out that one host still had the datastore listed with the Inaccessible label.

Workaround:
We performed the following to unmount the datastore.

Use SSH to connect to the host.
$ ssh root@123.123.123.123
<login>

List the datastores on the host:
# esxcli storage filesystem list
--> this will list all the datastores on the host, we can use the UUID or the name of the datastore to unmount it. (e.g. MyOldDatastore1)
Unmount the datastore using it's name:
# esxcli storage filesystem unmount -l MyOldDatastore1

See if the storage still is present:
# esxcli storage filesystem list
--> this will again list all the datastores on the host. In our case, the old datastore was now not just unmounted, but gone complete.

Note:
We didn't actually have to remove the unmounted datastore.
e.g.
# esxcli storage core device set --state=off -d datastoreabcd123_ID
or
# esxcli storage vmfs extent list
# esxcli storage core device detached remove -d naa.datastore123...





previous page

×