Skip to content

Commit ae46819

Browse files
Merge pull request #71446 from sr1kar99/doc-improv-gen
OCPBUGS#29279: Doc improvements
2 parents a28f25c + 4d932bf commit ae46819

20 files changed

+485
-324
lines changed

modules/lvms-about-volume-clones.adoc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Module included in the following assemblies:
2+
//
3+
// storage/persistent_storage/persistent_storage_local/persistent-storage-using-lvms.adoc
4+
5+
:_mod-docs-content-type: CONCEPT
6+
[id="lvms-about-volume-clones_{context}"]
7+
= About volume clones
8+
9+
A volume clone is a duplicate of an existing persistent volume claim (PVC). You can create a volume clone to make a point-in-time copy of the data.
10+
11+
== Limitations for creating volume clones in multi-node topology
12+
13+
{lvms} has the following limitations for creating volume clones in multi-node topology:
14+
15+
* Creating volume clones is based on the LVM thin pool capabilities.
16+
* The node must have additional storage after creating a volume clone for further updating the original data source.
17+
* You can create volume clones only on the node where you have deployed the original data source.
18+
* Pods relying on the PVC that uses the clone data can be scheduled only on the node where you have deployed the original data source.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Module included in the following assemblies:
2+
//
3+
// storage/persistent_storage/persistent_storage_local/persistent-storage-using-lvms.adoc
4+
5+
:_mod-docs-content-type: CONCEPT
6+
[id="lvms-about-volume-snapsot_{context}"]
7+
= About volume snapshots
8+
9+
You can create snapshots of persistent volume claims (PVCs) that are provisioned by {lvms}.
10+
11+
You can perform the following actions using the volume snapshots:
12+
13+
* Back up your application data.
14+
+
15+
[IMPORTANT]
16+
====
17+
Volume snapshots are located on the same devices as the original data. To use the volume snapshots as backups, you must move the snapshots to a secure location. You can use OpenShift API for Data Protection (OADP) backup and restore solutions. For information about OADP, see _OADP features_ in the _Additional resources_ section.
18+
====
19+
20+
* Revert to a state at which the volume snapshot was taken.
21+
22+
[NOTE]
23+
====
24+
You can also create volume snapshots of the volume clones.
25+
====
26+
27+
== Limitations for creating volume snapshots in multi-node topology
28+
29+
{lvms} has the following limitations for creating volume snapshots in multi-node topology:
30+
31+
* Creating volume snapshots is based on the LVM thin pool capabilities.
32+
* After creating a volume snapshot, the node must have additional storage space for further updating the original data source.
33+
* You can create volume snapshots only on the node where you have deployed the original data source.
34+
* Pods relying on the PVC that uses the snapshot data can be scheduled only on the node where you have deployed the original data source.

modules/lvms-creating-volume-clones-in-single-node-openshift.adoc

Lines changed: 0 additions & 53 deletions
This file was deleted.
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
// Module included in the following assemblies:
2+
//
3+
// storage/persistent_storage/persistent_storage_local/persistent-storage-using-lvms.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="lvms-creating-volume-clones_{context}"]
7+
= Creating volume clones
8+
9+
To create a clone of a persistent volume claim (PVC), you must create a `PersistentVolumeClaim` object in the namespace where you created the source PVC.
10+
11+
[IMPORTANT]
12+
====
13+
The cloned PVC has write access.
14+
====
15+
16+
.Prerequisites
17+
18+
* You ensured that the source PVC is in `Bound` state. This is required for a consistent clone.
19+
20+
.Procedure
21+
22+
. Log in to the OpenShift CLI (`oc`).
23+
24+
. Create a `PersistentVolumeClaim` object:
25+
+
26+
.Example `PersistentVolumeClaim` object to create a volume clone
27+
[source,yaml]
28+
----
29+
kind: PersistentVolumeClaim
30+
apiVersion: v1
31+
metadata:
32+
name: lvm-pvc-clone
33+
spec:
34+
accessModes:
35+
- ReadWriteOnce
36+
storageClassName: lvms-vg1 <1>
37+
volumeMode: Filesystem <2>
38+
dataSource:
39+
kind: PersistentVolumeClaim
40+
name: lvm-pvc <3>
41+
resources:
42+
requests:
43+
storage: 1Gi <4>
44+
----
45+
<1> Set this field to the value of the `storageClassName` field in the source PVC.
46+
<2> Set this field to the `volumeMode` field in the source PVC.
47+
<3> Specify the name of the source PVC.
48+
<4> Specify the storage size for the cloned PVC. The storage size of the cloned PVC must be greater than or equal to the storage size of the source PVC.
49+
50+
. Create the PVC in the namespace where you created the source PVC by running the following command:
51+
+
52+
[source,terminal]
53+
----
54+
$ oc create -f <file_name> -n <namespace>
55+
----
56+
57+
.Verification
58+
59+
* To verify that the volume clone is created, run the following command:
60+
+
61+
[source,terminal]
62+
----
63+
$ oc get pvc -n <namespace>
64+
----
65+
+
66+
.Example output
67+
+
68+
[source, terminal]
69+
----
70+
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
71+
lvm-block-1-clone Bound pvc-e90169a8-fd71-4eea-93b8-817155f60e47 1Gi RWO lvms-vg1 5s
72+
----

modules/lvms-creating-volume-snapshots-in-single-node-openshift.adoc

Lines changed: 0 additions & 42 deletions
This file was deleted.
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
// Module included in the following assemblies:
2+
//
3+
// storage/persistent_storage/persistent_storage_local/persistent-storage-using-lvms.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="lvms-creating-volume-snapshots_{context}"]
7+
= Creating volume snapshots
8+
9+
You can create volume snapshots based on the available capacity of the thin pool and the over-provisioning limits.
10+
To create a volume snapshot, you must create a `VolumeSnapshotClass` object.
11+
12+
.Prerequisites
13+
14+
* You have access to {product-title} as a user with `cluster-admin` permissions.
15+
* You ensured that the persistent volume claim (PVC) is in `Bound` state. This is required for a consistent snapshot.
16+
* You stopped all the I/O to the PVC.
17+
18+
.Procedure
19+
20+
. Log in to the OpenShift CLI (`oc`).
21+
22+
. Create a `VolumeSnapshot` object:
23+
+
24+
.Example `VolumeSnapshot` object
25+
[source,yaml]
26+
----
27+
apiVersion: snapshot.storage.k8s.io/v1
28+
kind: VolumeSnapshot
29+
metadata:
30+
name: lvm-block-1-snap <1>
31+
spec:
32+
source:
33+
persistentVolumeClaimName: lvm-block-1 <2>
34+
volumeSnapshotClassName: lvms-vg1 <3>
35+
----
36+
<1> Specify a name for the volume snapshot.
37+
<2> Specify the name of the source PVC. {lvms} creates a snapshot of this PVC.
38+
<3> Set this field to the name of a volume snapshot class.
39+
+
40+
[NOTE]
41+
====
42+
To get the list of available volume snapshot classes, run the following command:
43+
[source, terminal]
44+
----
45+
$ oc get volumesnapshotclass
46+
----
47+
====
48+
49+
. Create the volume snapshot in the namespace where you created the source PVC by running the following command:
50+
+
51+
[source,terminal]
52+
----
53+
$ oc create -f <file_name> -n <namespace>
54+
----
55+
+
56+
{lvms} creates a read-only copy of the PVC as a volume snapshot.
57+
58+
.Verification
59+
60+
* To verify that the volume snapshot is created, run the following command:
61+
+
62+
[source,terminal]
63+
----
64+
$ oc get volumesnapshot -n <namespace>
65+
----
66+
+
67+
.Example output
68+
+
69+
[source, terminal]
70+
----
71+
NAME READYTOUSE SOURCEPVC SOURCESNAPSHOTCONTENT RESTORESIZE SNAPSHOTCLASS SNAPSHOTCONTENT CREATIONTIME AGE
72+
lvm-block-1-snap true lvms-test-1 1Gi lvms-vg1 snapcontent-af409f97-55fc-40cf-975f-71e44fa2ca91 19s 19s
73+
----
74+
+
75+
The value of the `READYTOUSE` field for the volume snapshot that you created must be `true`.

modules/lvms-deleting-cloned-volumes-in-single-node-openshift.adoc

Lines changed: 0 additions & 18 deletions
This file was deleted.

modules/lvms-deleting-pvc.adoc

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Module included in the following assemblies:
2+
//
3+
// storage/persistent_storage/persistent_storage_local/persistent-storage-using-lvms.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="lvms-deleting-pvc_{context}"]
7+
= Deleting a persistent volume claim
8+
9+
You can delete a persistent volume claim (PVC) by using the OpenShift CLI (`oc`).
10+
11+
.Prerequisites
12+
13+
* You have access to {product-title} as a user with `cluster-admin` permissions.
14+
15+
.Procedure
16+
17+
. Log in to the OpenShift CLI (`oc`).
18+
19+
. Delete the PVC by running the following command:
20+
+
21+
[source,terminal]
22+
----
23+
$ oc delete pvc <pvc_name> -n <namespace>
24+
----
25+
26+
.Verification
27+
28+
* To verify that the PVC is deleted, run the following command:
29+
+
30+
[source,terminal]
31+
----
32+
$ oc get pvc -n <namespace>
33+
----
34+
+
35+
The deleted PVC must not be present in the output of this command.

0 commit comments

Comments
 (0)