When attempting to synchronize or delete a Subscribed Content Library backed by a vSAN datastore, the operation fails with the following symptoms:
Source error: Invalid response code: 500./var/log/vmware/content-library/cls.log or vCenter Event Logs may indicate file not found or A specified parameter was not correct when interacting with the storage backing.contentlib-xxx directories via ESXi SSH using osfs-rmdir return errors indicating the directory is not empty or the object is locked.vCenter 8.x
This issue typically occurs when a vSAN cluster has been migrated from one vCenter Server to another.
vSAN datastores use Object Namespaces rather than a traditional file system. During a migration, the underlying vSAN datastore may retain legacy contentlib-xxx namespace objects and folders associated with the original vCenter environment. Because the new vCenter lacks the database references and permissions to manage these orphaned objects, the Content Library service cannot clean up or overwrite the existing directories, leading to an HTTP 500 (Internal Server Error).
To restore Content Library functionality, you must bypass the orphaned objects by provisioning a new storage namespace.
Note: This process forces vCenter to create a brand-new vSAN namespace object, bypassing the locks on the orphaned migration folders.
If the old library entry remains in the UI and cannot be deleted:
objtool utility via the ESXi CLI to forcefully remove the orphaned namespace objects associated with the old library ID.Related Information: For issues regarding duplicate vSAN UUIDs in host profiles