a Content Library should be deleted
When attempting to delete the Content Library using the vSphere Client, the task fails
the Backing datastore the Content Library resided on is no longer accessible, has been unmounted or removed
Part of the deletion process for a Content Library is cleaning up the Content Library files which reside on a VMFS datastore.
If this part of the workflow fails, the deletion process will run into an error.
To remove the Content Library from vCenter, connect to the vCenter Database using to psql tool in the VCSA:
# /opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres
Then:
# select id,name from cl_library where name = '<cl_name>';
# select * from cl_library_storage where library_id = '<ID from step 1>';
# delete from cl_library_storage where library_id = '<ID from step 1>';
# delete from cl_storage where id = '<storage_id from step 2>';
# delete from cl_library where name = '<cl_name>';
# service-control --stop --all && service-control --start --all
The steps in this article do make changes in the vCenter database. Please ensure that a fresh backup or at the very least an offline snapshot (as in a snapshot of the vCenter in powered off state) exists.
If the vCenter Server is a member of a Linked Mode group, please be aware that backups / offline snapshots need to be taken for all of ELM nodes. Should a restore be required, all nodes need to be restored, otherwise there will be inconsistencies in the Linked Mode replication.