Datastore conflicts with an existing datastore
- Multiple ESXi hosts in the same cluster may become unresponsive or go to a Disconnected or Not Responding state as a result of the attempt to add the ESXi host
Cause
This issue occurs due to a duplicate entry of the datastore UUID in the vCenter Server database
Impact / Risks
This process interacts directly with the vCenter Server Appliance (VCSA) Postgres Database, and it is recommended to have a snapshot of the VCSA prior to proceeding.
Resolution
Ensure a snapshot is taken of the vCenter VM. Then, to resolve this issue:
- Connect to the VCSA through SSH.
- Access the Bash Shell with the command shell.set --enabled true or just type shell.
- Stop the vpxd service with the command: service-control --stop vmware-vpxd
- Access the Postgres DB using this command:
/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres
- vCenter 6.5: Run the query select id,storage_url from vpx_datastore;
- vCenter 6.7/7.x: select * from vpx_datastore;
- Look for the affected datastore (DS) UUID and find the ID.
- To confirm the correct ID as needed, run select * from vpx_entity where id=(ID found on previous step);
- Delete the entry from vpx_ds_assignment, vpx_vm_ds_space, vpx_datastore and vpx_entity using query delete from vpx_ds_assignment where DS_id=XXXX;
Sample were the ID = 461:
delete from vpx_ds_assignment where ds_id=461;
delete from vpx_vm_ds_space where ds_id=461;
delete from vpx_datastore where id=461;
delete from vpx_entity where id=461;
- To quit from database use \q
- Start the vmware-vpxd service in order for changes to be reflected:
service-control --start vmware-vpxd
- Once the vmware-vpxd service is up again, proceed to add the ESXi host again back to the vCenter Server.
Comments
0 comments
Please sign in to leave a comment.