select mark_for_delete from cns.volume_info where volume_id ='missing_pv_id';
Due to an internal sync logic, a volume gets marked as pending delete before the delete call to lower layers return successful. When there is snapshot on this volume, lower layers throw exception that is not handled successfully. The volume gets stuck in pending delete state.
The issue has been resolved in vCenter server 8.0 and higher versions.
To workaround the issue, run the below sql command after logging in to vCenter DB:
update cns.volume_info set mark_for_delete=false where volume_id='missing_pv_id';
This will bring back the volume from pending delete state and appear in CNS UI and query api.