Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions modules/ovirt-csi-driver-storage-class.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Module included in the following assemblies:
//
// * storage/container_storage_interface/persistent-storage-csi-ovirt.adoc

[id="ovirt-csi-driver-storage-class_{context}"]
= oVirt CSI driver storage class

{product-title} creates a default object of type `StorageClass` named `ovirt-csi-sc` which is used for creating dynamically provisioned persistent volumes.

To create additional storage classes for different configurations, create and save a file with the `StorageClass` object described by the following sample YAML:

[source,yaml]
----
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: <storage-class-name> <1>
annotations:
storageclass.kubernetes.io/is-default-class: "false" <2>
provisioner: csi.ovirt.org
parameters:
storageDomainName: <rhv-storage-domain-name> <3>
thinProvisioning: "true" <4>
csi.storage.k8s.io/fstype: ext4 <5>
----
<1> Name of the storage class.
<2> Set to `false` if the storage class is the default storage class in the cluster. If set to `true`, the existing default storage class must be edited and set to `false`.
<3> {rh-virtualization} storage domain name to use.
<4> Disk must be thin provisioned.
<5> File system type to be created.
69 changes: 69 additions & 0 deletions modules/persistent-storage-rhv.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
[id="persistent-storage-rhv_{context}"]
= Creating a persistent volume on RHV

When you create a `PersistentVolumeClaim` (PVC) object, {product-title} provisions a new persistent volume (PV) and creates a `PersistentVolume` object.

.Prerequisites
* You are logged in to a running {product-title} cluster.
* You provided the correct {rh-virtualization} credentials in `ovirt-credentials` secret.
* You have installed the oVirt CSI driver.
* You have defined at least one storage class.

.Procedure

* If you are using the we console to to dynamically create a persistent volume on {rh-virtualization} :
+
. 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` object, which is `ovirt-csi-sc` by default.
. Enter a unique name for the storage claim.
. Select the access mode. Currently, RWO (ReadWriteOnce) is the only supported access mode.
. Define the size of the storage claim.
. Select the Volume Mode:
+
`Filesystem`: Mounted into pods as a directory. This mode is the default.
+
`Block`: Block device, without any file system on it
+
. Click *Create* to create the `PersistentVolumeClaim` object and generate a `PersistentVolume` object.

* If you are using the command-line interface (CLI) to dynamically create a {rh-virtualization} CSI volume:
+
. Create and save a file with the `PersistentVolumeClaim` object described by the following sample YAML:
+
.pvc-ovirt.yaml
[source,yaml]
----
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-ovirt
spec:
storageClassName: ovirt-csi-sc <1>
accessModes:
- ReadWriteOnce
resources:
requests:
storage: <volume size> <2>
volumeMode: <volume mode> <3>
----
<1> Name of the required storage class.
<2> Volume size in GiB.
<3> Supported options:
** `Filesystem`: Mounted into pods as a directory. This mode is the default.
** `Block`: Block device, without any file system on it.
+
. Create the object you saved in the previous step by running the following command:
+
----
$ oc create -f pvc-ovirt.yaml
----
+
. To verify that the volume was created and is ready, run the following command:
+
----
$ oc get pvc pvc-ovirt
----
+
The `pvc-ovirt` shows that it is Bound.
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
[id="persistent-storage-csi-ovirt"]
= Red Hat Virtualization (oVirt) CSI Driver Operator
= Red Hat Virtualization CSI Driver Operator
include::modules/common-attributes.adoc[]
:context: persistent-storage-csi-ovirt

toc::[]

== Overview

{product-title} is capable of provisioning persistent volumes (PVs) using the Container Storage Interface (CSI) driver for Red Hat Virtualization (oVirt).
{product-title} is capable of provisioning persistent volumes (PVs) using the Container Storage Interface (CSI) driver for {rh-virtualization-first} ({rh-virtualization}).

Familiarity with xref:../../storage/understanding-persistent-storage.adoc#understanding-persistent-storage[persistent storage] and xref:../../storage/container_storage_interface/persistent-storage-csi.adoc#persistent-storage-csi[configuring CSI volumes] is recommended when working with a Container Storage Interface (CSI) Operator and driver.

To create CSI-provisioned PVs that mount to Red Hat Virtualization (oVirt) storage assets, {product-title} installs the oVirt CSI Driver Operator and the oVirt CSI driver by default in the `openshift-cluster-csi-drivers` namespace.
To create CSI-provisioned PVs that mount to {rh-virtualization-first} ({rh-virtualization}) storage assets, {product-title} installs the oVirt CSI Driver Operator and the oVirt CSI driver by default in the `openshift-cluster-csi-drivers` namespace.

* The _oVirt CSI Driver Operator_ provides a default storage class that you can use to create PVCs.
* The _oVirt CSI Driver Operator_ provides a default `StorageClass` object that you can use to create Persistent Volume Claims (PVCs).

* The _oVirt CSI driver_ enables you to create and mount oVirt PVs.

include::modules/persistent-storage-csi-about.adoc[leveloffset=+1]
include::modules/ovirt-csi-driver-storage-class.adoc[leveloffset=+1]
include::modules/persistent-storage-rhv.adoc[leveloffset=+1]

.Additional resources
* xref:../../storage/container_storage_interface/persistent-storage-csi.adoc#persistent-storage-csi[Configuring CSI volumes]
* xref:../../storage/container_storage_interface/persistent-storage-csi.adoc#csi-dynamic-provisioning_persistent-storage-csi[Dynamic Provisioning]