Content library creation fails with "failed to create directory" error
search cancel

Content library creation fails with "failed to create directory" error

book

Article ID: 415341

calendar_today

Updated On:

Products

VMware vCenter Server 8.0 VMware vSAN 8.x

Issue/Introduction

  • Attempt to create content library fails with below error in vCenter:

    Failed to create directory: [vsanDatastore] contentlib-<ID> 

  • vCenter /var/log/vmware/content-library/cls.log has below error:

    Unable to update storage backing for library 
    com.vmware.vapi.std.errors.InternalServerError: InternalServerError (com.vmware.vapi.std.errors.internal_server_error) => {
        messages = [LocalizableMessage (com.vmware.vapi.std.localizable_message) => {
        id = com.vmware.vdcs.cls-main.fail_to_create_directory,
        defaultMessage = Failed to create directory: [vsanDatastore] contentlib-<ID>,
        args = [[vsanDatastore] contentlib-<ID>],
        params = <null>,
        localized = <null>
    }],
        data = <null>,
        errorType = INTERNAL_SERVER_ERROR

  • vCenter /var/log/vmware/vpxd/vpxd.log has error similar to:

    message = "There are currently 0 usable fault domains. The operation requires 3 more usable fault domains."
    ......
    file = "contentlib-<ID> (Cannot Create File)"

Environment

VMware vCenter Server 8.0
VMware vSAN 8.x

Cause

There's issue with the underlying vSAN storage preventing creation of directory on vSAN datastore which in turn causes content library creation failure.

Resolution

vSAN engineer needs to be engaged to further check why directory creation fails on vSAN datastore.

Additional Information

In this particular case, there's an additional ESXi host accidentally added to vSAN cluster without being removed properly, resulting in file and folder creation failure on vSAN datastore. The ESXi host needs to be removed from vSAN cluster with below command if it's confirmed that the ESXi host is not supposed to be present in vSAN cluster:

esxcli vsan cluster leave

Some other scenarios that could lead to the same error include:

Certain tasks in vCenter UI may result in 'Cannot complete file creation operation. There are currently 0 usable fault domains. The operation requires 3 more usable fault domains.'

Error: "Cannot complete file creation operation. There are currently 3 usable fault domains. The operation requires 1 more usable fault domain. Failed to create object." in the vCenter UI