// Module included in the following assemblies:
//
// * storage/persistent_storage/persistent_storage-cinder.adoc

:_mod-docs-content-type: PROCEDURE
[id="persistent-storage-cinder-creating-pv_{context}"]
= Creating the persistent volume

[role="_abstract"]
You can create a persistent volume (PV) that provisions storage from an {rh-openstack-first} Cinder volume for use with {product-title}.

.Prerequisites

* You have defined your PV in an object definition before creating it in {product-title}.

.Procedure

. Save your object definition to a file.
+
.cinder-persistentvolume.yaml
[source,yaml]
----
apiVersion: "v1"
kind: "PersistentVolume"
metadata:
  name: "pv0001"
spec:
  capacity:
    storage: "5Gi"
  accessModes:
    - "ReadWriteOnce"
  cinder:
    fsType: "ext3"
    volumeID: "f37a03aa-6212-4c62-a805-9ce139fab180"
----
+
where:
+
`metadata.name`:: Specifies the name of the volume that is used by persistent volume claims or pods.
`spec.capacity.storage`:: Specifies the amount of storage allocated to this volume.
`spec.cinder`:: Indicates `cinder` for {rh-openstack-first} Cinder volumes.
`spec.cinder.fsType`:: Specifies the file system that is created when the volume is mounted for the first time.
`spec.cinder.volumeID`:: Specifies the Cinder volume to use.
+

[IMPORTANT]
====
Do not change the `fstype` parameter value after the volume is formatted and provisioned. Changing this value can result in data loss and pod failure.
====

. Create the object definition file you saved in the previous step.
+
[source,terminal]
----
$ oc create -f cinder-persistentvolume.yaml
----
