Error "no datastores found to create file volume, vsan file service may be disabled' while creating PVC from TKG cluster.
search cancel

Error "no datastores found to create file volume, vsan file service may be disabled' while creating PVC from TKG cluster.

book

Article ID: 385907

calendar_today

Updated On:

Products

VMware vSAN VMware Tanzu Kubernetes Grid Service (TKGs)

Issue/Introduction

Symptoms:

While creating PVC from Tanzu on vSAN enabled cluster, it may report an error as below.

# kubectl describe pvc tkg-cluster-pvc -n dummy-prod-namespace

---

reason: failed to provision volume with StorageClass "tanzu-storage-policy": rpc error: code = FailedPrecondition desc = no datastores found to create file volume, vsan file service may be disabled.

Normal ExternalProvisioning 115s (x103 over 27m) persistentvolume-controller Waiting for a volume to be created either by the external provisioner 'csi.vsphere.vmware.com' or manually by the system administrator. If volume creation is delayed, please verify that the provisioner is running and correctly registered.

Environment

VMware vSAN 7.x

VMware vSAN 8.x

VMware Tanzu Kubernetes Grid (TKG)

Cause

The error is expected as vSAN file services is a prerequisite for the TKG cluster while using vSAN datastore to create volumes. 

Refer the below documents.

Using vSAN File Service to Create ReadWriteMany Volumes in vSphere IaaS Control Plane

Using vSAN File Service to Create ReadWriteMany Volumes in Supervisor Environment

Resolution

  • If the vSAN file service is not enabled, please enable vSAN file services. You may refer the below article for enabling file services on vSAN cluster.

Enable vSAN File Service

  • If the vSAN file service is enabled and unable to create the volumes (ReadWriteMany), please Activate File Volume Support.

    You can activate file volume support for Workload Management on the vSAN cluster to deploy ReadWriteMany volumes.

1. Navigate to the Workload Management >  Supervisor > Configure > Storage> File Volume

2. Enable  "Activate file volume support" using the toggle button.

Refer the article ReadWriteMany feature support on vSAN cluster and the screen below for reference: