VMware: Unable to remove an inaccessible NFS datastore
The backend storage volume corresponding to the datastore has been removed and the datastore appears as Inactive, when I want to remove (via vSphere Client connected to vCenter server) the NFS datastore I receive this error message:
Unmounting the datastore in vCenter Server fails with the error:
‘Call “HostDatastoreSystem.RemoveDatastore” form object “datastoreSystem-28” on vCenter Server “xxxx” failed. CannotRemove datastore ‘datastore_name’ because Storage I/O control is enabled on it. Correct it and re-try the operation
Solution:
To resolve this issue, log in directly to each ESXi host that has access to the inactive datastore and manually remove it.
– Connect to the vSphere ESXi host using SSH
– Run this command to list the mounted datastores:
esxcli storage nfs list
– Run this command to unmount the NFS datastore:
esxcli storage nfs remove –v datastorename
The inactive NFS datastore has been removed
Note: if your datastore display name have some spaces, please use quotes
More information: VMware
Its still showing under “HOME > INVENTORY > DATASTORES AND DATASTORE CLUSTERS”, but showing greyed out and (inactive). Is there a way to force the vcenter server to forget about it?
Great common sense here. Wish I’d thugoht of that.
Hi
Usefult Tip. Thankyou for sharing it.