Happy Sunday everyone, I just wanted to share quick tip to remove an old datastore that has been decommissioned or is no longer functional. If you are unable to remove it using the vCenter Web UI, try the following. In order to remove it you need to SSH to any ESXi host that still have the Datastore setup. Run the following commands.

esxcfg-nas -l

You will get an output of all Datastores mounted as below. Notice “DatastoreNAME” is the Datastore we will be removing.

NetworkFileSystem41Impl: Unable to find saved UUID for volume DatastoreNAME
Datastore1 is /i-data/123abc/nfs/Datstore from 192.168.2.6 mounted available
DatastoreNAME is /Datastore from 192.168.0.7 unmounted unavailable


Now run the command, change “DatastoreNAME” to the name of the Datastore you wish to remove.

esxcfg-nas -d DatastoreNAME


Then we should see

NAS volume DatastoreNAME deleted.

Hope this helps.