// Module included in the following assemblies:
//
// * storage/container_storage_interface/persistent-storage-csi-manila.adoc

:_mod-docs-content-type: PROCEDURE
[id="persistent-storage-csi-manila-dynamic-provisioning_{context}"]
= Dynamically provisioning Manila CSI volumes by by using the CLI

[role="_abstract"]
To dynamically provision shared storage volumes using the CLI, create and apply a persistent volume claim (PVC) YAML file that references a Manila CSI storage class.

.Prerequisites
* {rh-openstack} is deployed with appropriate Manila share infrastructure so that it can be used to dynamically provision and mount volumes in {product-title}.

.Procedure
. Create and save a file with the `PersistentVolumeClaim` object described by the following YAML:
+
.pvc-manila.yaml
[source,yaml]
----
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: pvc-manila
spec:
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 10Gi
  storageClassName: csi-manila-gold
----
+
* `spec.accessModes`: Use RWX if you want the PV that fulfills this PVC to be mounted to multiple pods on multiple nodes in the cluster.
* `spec.storageClassName`: Specifies the name of the storage class that provisions the storage back end. Manila storage classes are provisioned by the Operator and have the `csi-manila-` prefix.

. Create the object you saved in the previous step by running the following command:
+
[source,terminal]
----
$ oc create -f pvc-manila.yaml
----
+
A new PVC is created.

. To verify that the volume was created and is ready, run the following command:
+
[source,terminal]
----
$ oc get pvc pvc-manila
----
+
The `pvc-manila` shows that it is `Bound`.

.Results
You can now use the new PVC to configure a pod.
