diff --git a/_topic_map.yml b/_topic_map.yml index 7b5f11f10d83..4511ea5f63e8 100644 --- a/_topic_map.yml +++ b/_topic_map.yml @@ -898,7 +898,7 @@ Topics: - Name: OpenStack Manila CSI Driver Operator File: persistent-storage-csi-manila - Name: Red Hat Virtualization (oVirt) CSI Driver Operator - File: persistent-storage-csi-ovirt + File: persistent-storage-csi-rhv - Name: Expanding persistent volumes File: expanding-persistent-volumes Distros: openshift-enterprise,openshift-webscale,openshift-origin,openshift-dedicated diff --git a/modules/persistent-storage-csi-ovirt-dynamic-provisioning.adoc b/modules/persistent-storage-csi-ovirt-dynamic-provisioning.adoc new file mode 100644 index 000000000000..0da8470a497f --- /dev/null +++ b/modules/persistent-storage-csi-ovirt-dynamic-provisioning.adoc @@ -0,0 +1,90 @@ +// Module included in the following assemblies: +// +// * storage/container_storage_interface/persistent-storage-csi-rhv.adoc + +[id="persistent-storage-csi-ovirt-dynamic-provisioning_{context}"] += Dynamically provisioning {rh-virtualization} CSI volumes + +{product-title} installs a StorageClass for each available oVirt share type. + +The YAML files that are created are completely decoupled from {rh-virtualization} and from its Container Storage Interface (CSI) plug-in. +//As an application developer, you can dynamically provision ReadWriteMany (RWX) storage and deploy Pods with applications that safely consume the storage using YAML manifests. You can also provision other access modes, such as ReadWriteOnce (RWO). + +You can use the same Pod and persistent volume claim (PVC) definitions on-premise that you use with {product-title} on AWS, GCP, Azure, and other platforms, with the exception of the storage class reference in the PVC definition. + +.Prerequisites + +* {rh-ATTRIBUTE?} is deployed with appropriate {rh-virtualization} share infrastructure so that it can be used to dynamically provision and mount volumes in {product-title}. + +.Procedure (UI) + +To dynamically create an {rh-virtualization} CSI volume using the web console: + +. In the {product-title} console, click *Storage* → *Persistent Volume Claims*. + +. In the persistent volume claims overview, click *Create Persistent Volume Claim*. + +. Define the required options on the resulting page. + +.. Select the appropriate StorageClass. + +.. Enter a unique name for the storage claim. + +.. Select the access mode to specify read and write access for the PVC you are creating. ++ +[IMPORTANT] +==== +// * Use RWO_?? if you want the persistent volume (PV) that fulfills this PVC to be mounted to multiple Pods on multiple nodes in the cluster. + +* Use RWO mode if you want to prevent additional Pods from being dynamically provisioned. +==== + +. Define the size of the storage claim. + +. Click *Create* to create the PersistentVolumeClaim and generate a PersistentVolume. + +.Procedure (CLI) + +To dynamically create a {rh-virtualization} CSI volume using the command-line interface (CLI): + +. Create and save a file with the PersistentVolumeClaim object described by the following YAML: + ++ +.pvc-ovirt.yaml +[source,yaml] +---- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: pvc-ovirt +spec: + accessModes: <1> + - ReadWriteMany + resources: + requests: + storage: 10Gi + storageClassName: csi-ovirt-gold <2> +---- ++ +<1> Use ReadWriteOnce (RWO) mode to prevent additional Pods from being dynamically provisioned. +<2> The name of the storage class that provisions the storage back end. oVirt StorageClasses are provisioned by the Operator and have the `csi-ovirt-` prefix. ++ +. Create the object you saved in the previous step by running the following command: ++ +[source,terminal] +---- +$ oc create -f pvc-ovirt.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-ovirt +---- ++ +The `pvc-ovirt` shows that it is `Bound`. + +You can now use the new PVC to configure a Pod. diff --git a/storage/container_storage_interface/persistent-storage-csi-ovirt.adoc b/storage/container_storage_interface/persistent-storage-csi-rhv.adoc similarity index 91% rename from storage/container_storage_interface/persistent-storage-csi-ovirt.adoc rename to storage/container_storage_interface/persistent-storage-csi-rhv.adoc index 44eaca96fe66..f8562dfd5694 100644 --- a/storage/container_storage_interface/persistent-storage-csi-ovirt.adoc +++ b/storage/container_storage_interface/persistent-storage-csi-rhv.adoc @@ -1,7 +1,7 @@ [id="persistent-storage-csi-ovirt"] = Red Hat Virtualization (oVirt) CSI Driver Operator include::modules/common-attributes.adoc[] -:context: persistent-storage-csi-ovirt +:context: persistent-storage-csi-rhv toc::[] @@ -18,6 +18,7 @@ To create CSI-provisioned PVs that mount to Red Hat Virtualization (oVirt) stora * The _oVirt CSI driver_ enables you to create and mount oVirt PVs. include::modules/persistent-storage-csi-about.adoc[leveloffset=+1] +include::modules/persistent-storage-csi-ovirt-dynamic-provisioning.adoc[leveloffset=+1] .Additional resources * xref:../../storage/container_storage_interface/persistent-storage-csi.adoc#persistent-storage-csi[Configuring CSI volumes]