Deleting the datastore where a content library is hosted is probably not the best idea but … yes stupid error and now what. If you are not faint of heart (and now how to take a snapshot), you can rectify this. You should contact GSS as there is not documented solution and this might break.
Take a snapshot and verify if the vCenter backups are in a healthy status. Yes? Ok go ahead.
Log on to the vCenter and create a new Content Library and name it ‘i-made-an-error’. Use the new datastore you want to use and keep the rest of the settings default as these don’t really matter.
Open an SSH session to the vCenter and connect to the Postgress DB ‘VCDB’
psql -d VCDB -U postgres
To show which tables are present within the database:
Show an overview of the Content Libraries added ( make sure to add the trailing ;):
SELECT id,name FROM cl_library;
Now that we have an overview of the Content Libraries, with the one that is throwing an error highlighted.
In the following overview we find the library id from the new Content Library we just added and also the corresponding storage id.
SELECT * FROM cl_library_storage;
I will update the storage id from the faulty one we found on the previous screenshot with the one we found for the new Content Library.
SET storage_id = 'ae80d942-d7e2-4ab8-b0c1-93405ff4db38'
WHERE library_id = '6c7851ed-6166-44b9-b439-5bcd2f9742eb';
There are a couple of places that helped me in solving this: