--- title: "Using Storage Classes" slug: "using-storage-classes-2-5" updated: 2026-11-06T01:00:44Z published: 2026-11-06T01:00:44Z canonical: "docs.vastdata.com/using-storage-classes-2-5" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.vastdata.com/llms.txt > Use this file to discover all available pages before exploring further. # Using Storage Classes VAST CSI Driver supports multiple Kubernetes storage classes, enabling you to provision multiple storage paths within VAST Cluster, each configured (via VMS) with its own set of access policies, path protection, or replication policies. Each storage class can have its own path, virtual IP pool, a set of mount options, and other parameters. A storage path is a path within VAST Cluster where VAST CSI Driver will create volume directories. The storage path is specified in the `root_export` parameter in the YAML configuration file; for example: `/a/b/c`. (Note that '/' cannot be used as a storage path.) The storage path must be mountable by VAST CSI Driver. During initial deployment of VAST CSI Driver, you define one or more storage classes in the VAST CSI Driver [Helm chart configuration file](/develop/docs/en/create-a-helm-chart-configuration-file-for-vast-csi-driver-2-5). Later you can add more storage classes by creating and applying a Kubernetes YAML configuration file. - [Adding a Storage Class](/develop/docs/en/using-storage-classes-2-5#adding-a-storage-class) - [Storage Class Option Reference](/develop/docs/en/using-storage-classes-2-5#storage-class-option-reference) ## Adding a Storage Class To add a storage class using a Kubernetes YAML configuration file: 1. Create a YAML configuration file that defines a new storage class with the following **required** parameters: > [!NOTE] > **Note** > > For a complete list of options that can be specified for a storage class, see [Storage Class Option Reference](/develop/docs/en/using-storage-classes-2-5#storage-class-option-reference).. ```plaintext apiVersion: storage.k8s.io/v1 kind: StorageClass metadata:  name: provisioner: csi.vastdata.com parameters:  subsystem:  vip_pool_fqdn: | vip_pool_name:  root_export: '/k8s-2'  view_policy: 'default'   ``` The following example shows creating a storage class named `vastdata-filesystem-2` that uses path `/k8s-2` , view policy `default`, and virtual IP pool `test1`. In the example, no custom mount options are set ( `mountOptions` is an empty string). > [!TIP] > **Tip** > > For more examples, see [https://github.com/vast-data/vast-csi/tree/v2.5/examples/csi](https://github.com/vast-data/vast-csi/tree/v2.5/examples/csi). ```plaintext apiVersion: storage.k8s.io/v1 kind: StorageClass metadata:  name: vastdata-filesystem-2 provisioner: csi.vastdata.com parameters:  csi.storage.k8s.io/controller-expand-secret-name: vast-mgmt  csi.storage.k8s.io/controller-expand-secret-namespace: default  csi.storage.k8s.io/controller-publish-secret-name: vast-mgmt  csi.storage.k8s.io/controller-publish-secret-namespace: default  csi.storage.k8s.io/node-publish-secret-name: vast-mgmt  csi.storage.k8s.io/node-publish-secret-namespace: default  csi.storage.k8s.io/node-stage-secret-name: vast-mgmt  csi.storage.k8s.io/node-stage-secret-namespace: default  csi.storage.k8s.io/provisioner-secret-name: vast-mgmt  csi.storage.k8s.io/provisioner-secret-namespace: default  vip_pool_fqdn: 'MyDomain'  root_export: '/k8s-2'  view_policy: 'default'  volume_name_fmt: csi:{namespace}:{name}:{id} mountOptions:  - '' allowVolumeExpansion: true ``` 2. Deploy the YAML configuration file: ```plaintext kubectl apply -f .yaml ``` 3. Verify that the storage class has been added: ```plaintext kubectl get storageclasses ``` The output is similar to the following: ```plaintext NAME                   PROVISIONER                 RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE standard (default)     k8s.io/minikube-hostpath    Delete        Immediate         false                4d1h vastdata-filesystem    (default) csi.vastdata.com  Delete        Immediate         true                 58m vastdata-filesystem-2  (default) csi.vastdata.com  Delete        Immediate         true                 56m vastdata-filesystem-3  (default) csi.vastdata.com  Delete        Immediate         true                 54m ``` ## Storage Class Option Reference You can specify storage class options as follows: - In the [Helm chart configuration file](/develop/docs/en/create-a-helm-chart-configuration-file-for-vast-csi-driver-2-5) created for VAST CSI Driver during initial deployment, - In a Kubernetes YAML configuration file [deployed](/develop/docs/en/using-storage-classes-2-5#adding-a-storage-class) at a later stage. - In VAST CSI Operator's `VastStorage` custom resource definition, when deploying in an OpenShift environment using VAST CSI Operator. | Option in Helm chart configuration file / VAST CSI Operator's `VastStorage` | Option in Kubernetes YAML configuration file | Description | | --- | --- | --- | | `ephemeralVolumeNameFormat: "<format>"` | `eph_volume_name_fmt: "<format>"` | A format string that controls naming of Kubernetes [ephemeral volumes](/develop/docs/en/provisioning-ephemeral-volumes-2-5) created through VAST CSI Driver. If not specified, the default format `csi:{namespace}:{name}:{id}` is used. | | `mountOptions: "<options>"` | `mount_options: "<options>"` | Specify [NFS mount options](/develop/docs/en/managing-nfs-mount-options-2-5) for VAST CSI Driver to use when mounting a volume for a PVC with this storage class. Examples: ```plaintext mountOptions: - "proto=rdma" - "port=20049" ``` ```plaintext mountOptions: - debug - nosuid - soft ``` ```plaintext mountOptions: - nfsvers=4 ``` > [!NOTE] > **Note** > > These mount options override host-specific mount options defined through `/etc/nfsmount.conf.d` . | | `qosPolicy: "<QoS policy name>"` | `qos_policy: "<QoS policy name>"` | The name of a Quality of Service (QoS) policy to be associated with automatically created views. The QoS policy can be passed either by its name or by its ID (in `qos_policy_id`). A QoS policy sets various performance limits per view. For more information, see [Configure a QoS Policy](/develop/docs/en/configure-vast-cluster-for-vast-csi-driver-2-5#configure-a-qos-policy). | | N/A | `qos_policy_id: "<QoS policy ID>"` | The ID of a Quality of Service (QoS) policy to be associated with automatically created views. The QoS policy can be passed either by its ID or by its name (in `qos_policy_name`). > [!NOTE] > **Note** > > This parameter is available starting with VAST CSI Driver 2.5.1. A QoS policy sets various performance limits per view. For more information, see [Configure a QoS Policy](/develop/docs/en/configure-vast-cluster-for-vast-csi-driver-2-5#configure-a-qos-policy). | | `secretName: "<secret name>"` `secretNamespace: "<secret's namespace>"` | `<pairs of secrets and secret namespaces for each provisioning stage>` | These options lets you supply information for communicating with the VAST cluster: - `<secret name>` is the name of the [Kubernetes secret](/develop/docs/en/create-a-kubernetes-secret-with-vms-user-credentials-for-vast-csi-driver-2-5) that contains information about the VAST cluster on which to provision volumes for this particular storage class, the corresponding VMS user credentials and, optionally, the SSL certificate. For more information, see [Provisioning Volumes on Multiple VAST Clusters](/develop/docs/en/provisioning-volumes-on-multiple-vast-clusters-2-5). - `<secret namespace>`: if the storage class [Kubernetes secret](/develop/docs/en/create-a-kubernetes-secret-with-vms-user-credentials-for-vast-csi-driver-2-5) was created in a namespace that is different from that used to install the driver's Helm chart, add this parameter to specify the namespace of the Kubernetes secret. If the secret and its namespace are defined as global options in the Helm chart configuration file, they are automatically propagated to each storage class and each provisioning stage therein. In this case, you do not need to explicitly include the per-stage secrets with their corresponding namespaces in the storage class definition. If no global settings exist for the secret and its namespace, you need to specify them directly in the storage class definition in the following format. Note that you can specify a different value for each stage: ```plaintext csi.storage.k8s.io/controller-expand-secret-name: csi.storage.k8s.io/controller-expand-secret-namespace: csi.storage.k8s.io/controller-publish-secret-name: csi.storage.k8s.io/controller-publish-secret-namespace: csi.storage.k8s.io/node-publish-secret-name: csi.storage.k8s.io/node-publish-secret-namespace: csi.storage.k8s.io/node-stage-secret-name: csi.storage.k8s.io/node-stage-secret-namespace: csi.storage.k8s.io/provisioner-secret-name: csi.storage.k8s.io/provisioner-secret-namespace: ``` | | `storagePath: "<path>"` | `root_export: "<path>"` | The storage path within VAST Cluster to be used when dynamically provisioning Kubernetes volumes. VAST CSI Driver will automatically create a VAST Cluster view for each volume being provisioned. > **Caution** > > Do not specify '/' as the `<path>`. This option is required when defining a storage class in the Helm chart configuration file. | | `viewPolicy: "<policy name>"` | `view_policy: "<policy name>"` | The name of the VAST Cluster view policy to be assigned to VAST Cluster views created by VAST CSI Driver. A view policy defines access settings for storage exposed through a VAST Cluster view. For more information, see [Configure View Policies](/develop/docs/en/configure-vast-cluster-for-vast-csi-driver-2-5#configure-view-policies). All view policies used with VAST CSI Driver must have the same security flavor. If you are going to use VAST CSI Driver with VAST Cluster 4.6 or later, a view policy set for a storage class must belong to the same VAST Cluster tenant as the virtual IP pool(s) specified for that storage class. This option is required when defining a storage class in the Helm chart configuration file. | | `vipPool: "<virtual IP pool name>"` | `vip_pool_name: "<virtual IP pool name>"` | The name of the virtual IP pool to be used by VAST CSI Driver. For more information, see [Set up Virtual IP Pools](/develop/docs/en/configure-vast-cluster-for-vast-csi-driver-2-5#set-up-virtual-ip-pools). If you are going to use VAST CSI Driver with VAST Cluster 4.6 or later, a virtual IP pool that you specify for a storage class must belong to the same VAST Cluster tenant as the view policy specified for this storage class. Either `vipPool` or `vipPoolFQDN` option is required when defining a storage class in the Helm chart configuration file. These options are mutually exclusive. When `vipPool` is used, VAST CSI Driver makes an additional call to the VMS to obtain the IP, which may impact performance when mounting volumes. | | `vipPoolFQDN: "virtual IP pool's domain name"` | `vip_pool_fqdn: "virtual IP pool's domain name"` | The domain name of the virtual IP pool to be used by VAST CSI Driver. For more information, see [Set up Virtual IP Pools](/develop/docs/en/configure-vast-cluster-for-vast-csi-driver-2-5#set-up-virtual-ip-pools). Either `vipPoolFQDN` or `vipPool` option is required when defining a storage class in the Helm chart configuration file. These options are mutually exclusive. With `vipPoolFQDN`, the IP for volume mounting is obtained through DNS, which improves mounting times. | | `volumeNameFormat: "<format>"` | `volume_name_fmt: "<format>"` | A format string that controls naming of volumes created through VAST CSI Driver. If not specified, the default format `csi:{namespace}:{name}:{id}` is used. |