You may get any error: “Datastore ‘StorageX’ conflicts with an existing datastore in the datacenter that has the same URL (ds:///vmfs/volumes/xxxxxxxx-xxxxxxxx-xxxx-xxxxxxxxxxxx/) but is backed by different physical storage.”
Below are the symtoms which you may encounter with:
- Unable to remove the datastore from the vCenter Server inventory.
- The datastore is grayed out.
- All options for the datastore are grayed out.
To resolve this issue, manually remove the datastore references from the vCenter Server Inventory.
- Run the following to identify the objects using the datastore:
select * from VPX_ENTITY where name = ‘<datastore_name>’ The above returns the ID
Run the following to see what uses it:select * from VPX_DS_ASSIGNMENT where DS_ID=<ID>;select * from VPX_VM_DS_SPACE where DS_ID=<ID>;select * from VPX_DATASTORE where ID=<ID>;select * from VPX_ENTITY where ID=<ID>;
- Identify and the objects identified by the second query from the inventory:
select ENTITY_ID from VPX_DS_ASSIGNMENT where DS_ID=<ID>; This returns the ENTITY_ID
select * from VPX_ENTITY where ID = <ENTITY_ID>
- Remove the objects (templates, VMs) using the vSphere Client from the inventory
The datastore should disappear after all objects using it are removed.