Datastore Conflicts with an Existing Datastore in the Datacenter That Has the Same URL when adding/reconnecting ESXi Host.<esxi-hostname/ip> has a datastore that conflicts with an existing datastore in the datacenter.

A datastore named "datastore_name" and backed by the same configuration exists in the current datacenter. Change the backing configuration to continue.

df -hVMFS - naa.################################- ########-########-####-############ (Original LUN)
VMFS - naa.###################################- ########-########-####-############ (Replica LUN/snapshot)
ls -lah /dev/disks/ | grep -i naa.################################ (Original LUN)
-rw------- 1 root root 400.0G MMM DD HH:MM naa.################################
-rw------- 1 root root 400.0G MMM DD HH:MM naa.################################:1
lrwxrwxrwx 1 root root 36 MMM DD HH:MM vml.######################################################-> naa.################################
lrwxrwxrwx 1 root root 38 MMM DD HH:MM vml.######################################################:1 -> naa.################################:1
ls -lah /dev/disks/ | grep -i naa.789############################# (Replica LUN/Snapshot)
-rw------- 1 root root 400.0G MMM DD HH:MM naa.################################
-rw------- 1 root root 400.0G MMM DD HH:MM naa.################################:1
lrwxrwxrwx 1 root root 36 MMM DD HH:MM vml.######################################################-> naa.################################
lrwxrwxrwx 1 root root 38 MMM DD HH:MM vml.######################################################:1 -> naa.################################:1
esxcfg-scsidevs -m
naa.################################:1 /vmfs/devices/disks/naa.################################:1 ########-########-####-############ 0 VMFS
esxcfg-scsidevs -m
naa.################################:1 /vmfs/devices/disks/naa.################################:1 ########-########-####-############ 0 VMFSesxcfg-volume -l
Scanning for VMFS-3/VMFS-5 host activity (512 bytes/HB, 2048 HBs).
VMFS UUID/label: 123#####-########-####-############/VMFS
Can mount: No (the original volume is still online)
Can resignature: Yes
Extent name: naa.################################:1 range: 0 - 6649855 (MB)esxcli storage vmfs snapshot list, but the output may not be the same as esxcfg-volume -lvmkfstools -Ph -v1 /vmfs/volumes/VMFS
VMFS-6.82 (Raw Major Version: 24) file system spanning 1 partitions.
File system label (if any): VMFS
Mode: public ATS-only
Capacity 399.8 GB, 234.4 GB available, file block size 1 MB, max supported file size 64 TB
Volume Creation Time: MMM DD HH:MM:SS 2024
Files (max/free): 16384/16248
Ptr Blocks (max/free): 0/0
Sub Blocks (max/free): 16384/16226
Secondary Ptr Blocks (max/free): 256/255
File Blocks (overcommit/used/overcommit %): 0/169280/0
Ptr Blocks (overcommit/used/overcommit %): 0/0/0
Sub Blocks (overcommit/used/overcommit %): 0/158/0
Large File Blocks (total/used/file block clusters): 800/222/192
Volume Metadata size: 1781989376
Disk Block Size: 512/16384/0
UUID: ########-########-####-############
Partitions spanned (on "lvm"):
naa.################################:1
Is Native Snapshot Capable: NO
OBJLIB-LIB: ObjLib cleanup done.
WORKER: asyncOps=0 maxActiveOps=0 maxPending=0 maxCompleted=0Datastore 'VMFS' conflicts with an existing datastore in the datacenter that has the same URL (ds:///vmfs/volumes/########-########-####-############/), but is backed by different physical storage.
Follow the procedure below to fix this error
Assuming the data is stored on this datastore and VMs are running on it, follow the procedure in the sequence mentioned below. This will require downtime of the VMs.
This will eliminate the replica/snapshot LUN.
Follow the procedure below to fix this error for only one ESXi host
Assuming the data is stored on this datastore and VMs are running on it, follow the procedure in the sequence mentioned below. This will require downtime of the VMs.
Repeat steps 1-3 for all datastores that have complaints when adding an ESXi host to vCenter.
esxcli storage core device set --state=off -d <NAA_ID>Note: This will fix the issue of not being able to add the ESXi host to vCenter, but it does not eliminate the replica/snapshot LUN.
Removal of a datastore from the vCenter database procedure must be followed when the datastore in question, as seen in the error, is not visible in the vCenter inventory or doesn't go away by performing a vCenter reboot.
Note: Ensure a snapshot is taken of the vCenter VM. In case of vCenter Servers in linked mode, take offline snapshots of all the nodes. This means that you must shut down all VCs or PSCs that are in the SSO domain at the same time, then snapshot them, and power them on again. If you need to revert to one of these snapshots, shut all the nodes down, and revert all nodes to the snapshot. Failure to perform these steps will lead to replication problems across the PSC databases.
To resolve this issue:
service-control --stop vpxd /opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgresselect id,name,storage_url from vpx_datastore; select * from vpx_datastore where storage_url='<storage URL from the error message>';select * from vpx_entity where id=(ID found on previous step);vpx_ds_assignment, vpx_vm_ds_space, vpx_datastore and vpx_entity using the following queries:Examples were the ID = ##1:
delete from vpx_ds_assignment where ds_id=##1;
delete from vpx_vm_ds_space where ds_id=##1;
delete from vpx_datastore where id=##1;
delete from vpx_entity where id=##1;service-control --restart vpxd