Skip to content

Commit 6532038

Browse files
authored
Merge pull request #72137 from sr1kar99/doc-improv-deleting-lvmcluster
/lgtm OCPBUGS#27147: Doc improvements related to "LVMCluster" custom resource
2 parents af50a88 + 2fa47e9 commit 6532038

16 files changed

+311
-95
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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="about-adding-devices-to-a-vg_{context}"]
7+
= About adding devices to a volume group
8+
9+
The `deviceSelector` field in the `LVMCluster` CR contains the configuration to specify the paths to the devices that you want to add to the LVM volume group.
10+
11+
You can specify the device paths in the `deviceSelector.paths` field, the `deviceSelector.optionalPaths` field, or both. If you do not specify the device paths in both the `deviceSelector.paths` field and the `deviceSelector.optionalPaths` field, {lvms} adds the supported unused devices to the LVM volume group.
12+
13+
The devices that you want to add to the volume group must be supported by {lvms}. For information about unsupported devices, see "Devices not supported by {lvms}" in the "Additional resources" section.
14+
15+
If you do not add the `deviceSelector` field in the `LVMCluster` CR, {lvms} automatically adds the new devices when the devices are available.
16+
17+
{lvms} adds the devices to the LVM volume group only if the following conditions are met:
18+
19+
* The device path exists.
20+
* The device is supported by {lvms}.
21+
22+
You can also add the path to the RAID arrays to integrate the RAID arrays with {lvms}. For more information, see "Integrating RAID arrays with {lvms}" in the "Additional resources" section.
23+
24+
[IMPORTANT]
25+
====
26+
After a device is added to the LVM volume group, it cannot be removed.
27+
====
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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="about-creating-lvmcluster-cr_{context}"]
7+
= Ways to create an LVMCluster custom resource
8+
9+
You can create an `LVMCluster` custom resource (CR) by using the OpenShift CLI (`oc`) or the {product-title} web console. If you have installed {lvms} by using {rh-rhacm-first}, you can also create an `LVMCluster` CR by using {rh-rhacm}.
10+
11+
Upon creating the `LVMCluster` CR, {lvms} creates the following system-managed CRs:
12+
13+
* A `storageClass` and `volumeSnapshotClass` for each device class.
14+
+
15+
[NOTE]
16+
====
17+
{lvms} configures the name of the storage class and volume snapshot class in the format `lvms-<device_class_name>`, where, `<device_class_name>` is the value of the `deviceClasses.name` field in the `LVMCluster` CR. For example, if the `deviceClasses.name` field is set to vg1, the name of the storage class and volume snapshot class is `lvms-vg1`.
18+
====
19+
20+
* `LVMVolumeGroup`: This CR is a specific type of persistent volume (PV) that is backed by an LVM volume group. It tracks the individual volume groups across multiple nodes.
21+
* `LVMVolumeGroupNodeStatus`: This CR tracks the status of the volume groups on a node.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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="about-deleting-lvmcluster-cr_{context}"]
7+
= Ways to delete an LVMCluster custom resource
8+
9+
You can delete an `LVMCluster` custom resource (CR) by using the OpenShift CLI (`oc`) or the {product-title} web console. If you have installed {lvms} by using {rh-rhacm-first}, you can also delete an `LVMCluster` CR by using {rh-rhacm}.
10+
11+
Upon deleting the `LVMCluster` CR, {lvms} deletes the following CRs:
12+
13+
* `storageClass`
14+
* `volumeSnapshotClass`
15+
* `LVMVolumeGroup`
16+
* `LVMVolumeGroupNodeStatus`

modules/lvms-about-lvm-storage-installation.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
:_mod-docs-content-type: CONCEPT
66
[id="lvms-about-lvm-storage-installation_{context}"]
7-
= Installing Logical Volume Manager Storage
7+
= Logical Volume Manager Storage installation
88

99
You can install Logical Volume Manager (LVM) Storage on a bare metal or user-provisioned infrastructure cluster and configure it to dynamically provision storage for your workloads.
1010

@@ -29,4 +29,4 @@ The prerequisites to install {lvms} are as follows:
2929
You cannot wipe the disks that are in use.
3030
====
3131

32-
* If you want to install {lvms} by using {rh-rhacm-first}, ensure that you have installed {rh-rhacm} on an {product-title} cluster. See the _Installing LVM Storage using RHACM_ section.
32+
* If you want to install {lvms} by using {rh-rhacm-first}, ensure that you have installed {rh-rhacm} on an {product-title} cluster. See the "Installing LVM Storage using RHACM" section.

modules/lvms-about-lvmcluster-cr.adoc

Lines changed: 12 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,19 @@
66
[id="about-lvmcluster_{context}"]
77
= About the LVMCluster custom resource
88

9-
After you have installed {lvms}, you must create an `LVMCluster` custom resource (CR) on a worker node.
10-
119
You can configure the `LVMCluster` CR to perform the following actions:
1210

1311
* Create LVM volume groups that you can use to provision persistent volume claims (PVCs).
1412
* Configure a list of devices that you want to add to the LVM volume groups.
1513
* Configure the requirements to select the nodes on which you want to create an LVM volume group, and the thin pool configuration for the volume group.
1614
* Force wipe the selected devices.
1715
18-
You can create an `LVMCluster` CR using the OpenShift CLI (`oc`) or the {product-title} web console.
16+
After you have installed {lvms}, you must create an `LVMCluster` custom resource (CR).
1917

2018
include::snippets/lvms-creating-lvmcluster.adoc[]
2119

2220
[discrete]
23-
== LVMCluster custom resource configuration
21+
== Explanation of fields in the LVMCluster CR
2422

2523
The `LVMCluster` CR fields are described in the following table:
2624

@@ -34,23 +32,13 @@ The `LVMCluster` CR fields are described in the following table:
3432
|`array`
3533
|Contains the configuration to assign the local storage devices to the LVM volume groups.
3634

37-
To create multiple device storage classes, create a device class for each storage class.
35+
LVM Storage creates a storage class and volume snapshot class for each device class that you create.
3836

3937
|`deviceClasses.name`
4038
|`string`
4139
|Specify a name for the LVM volume group (VG).
4240

43-
If this field is set to the name of a VG from the previous {lvms} installation, {lvms} recreates the resources related to that volume group in the current {lvms} installation.
44-
45-
You can only recover the VGs but not the logical volume associated with the VG.
46-
47-
[IMPORTANT]
48-
====
49-
Before recovering the VGs from the previous {lvms} installation, ensure that the following conditions are met:
50-
51-
* VGs must not be corrupted.
52-
* VGs must have the `lvms` tag. For more information on adding tags to LVMS objects, see link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/configuring_and_managing_logical_volumes/grouping-lvm-objects-with-tags_configuring-and-managing-logical-volumes#doc-wrapper[Grouping LVM objects with tags].
53-
====
41+
You can also configure this field to reuse a volume group that you created in the previous installation. For more information, see "Reusing a volume group from the previous LVM Storage installation" in the "Additional resources" section.
5442

5543
|`deviceClasses.fstype`
5644
|`string`
@@ -64,38 +52,20 @@ Before recovering the VGs from the previous {lvms} installation, ensure that the
6452
|`object`
6553
|Contains the configuration to choose the nodes on which you want to create the LVM volume group. If this field is empty, all nodes without no-schedule taints are considered.
6654

67-
[NOTE]
68-
====
6955
On the control-plane node, {lvms} detects and uses the additional worker nodes when the new nodes become active in the cluster.
70-
====
7156

7257
|`nodeSelector.nodeSelectorTerms`
7358
|`array`
7459
|Configure the requirements that are used to select the node.
7560

7661
|`deviceClasses.deviceSelector`
7762
|`object`
78-
|Contains the configuration to specify the paths to the devices that you want to add to the LVM volume group, and force wipe the devices that are added to the LVM volume group.
79-
80-
You can specify the device paths in the `paths` field, the `optionalPaths` field, or both. If you do not specify the device paths in both `paths` and `optionalPaths`, {lvms} adds the supported unused devices to the LVM volume group.
81-
82-
[IMPORTANT]
83-
====
84-
After a device is added to the LVM volume group, it cannot be removed.
85-
====
86-
87-
{lvms} adds the devices to the LVM volume group only if the following conditions are met:
88-
89-
* The device path exists.
90-
91-
* The device is supported by {lvms}.
63+
|Contains the configuration to perform the following actions:
9264

93-
[NOTE]
94-
====
95-
The devices that you want to add to the volume group must be supported by {lvms}. For information about unsupported devices, see _Devices not supported by {lvms}_ in _Additional resources_.
96-
====
65+
* Specify the paths to the devices that you want to add to the LVM volume group.
66+
* Force wipe the devices that are added to the LVM volume group.
9767

98-
You can also add the path to the RAID arrays to integrate the RAID arrays with {lvms}. For more information, see _Integrating RAID arrays with {lvms}_ in _Additional resources_.
68+
For more information, see "About adding devices to a volume group" in the "Additional resources" section.
9969

10070
|`deviceSelector.paths`
10171
|`array`
@@ -114,21 +84,18 @@ forceWipeDevicesAndDestroyAllData`
11484
|`boolean`
11585
|To force wipe the selected devices, set this field to `true`. By default, this field is set to `false`.
11686

117-
[IMPORTANT]
87+
[WARNING]
11888
====
89+
If this field is set to `true`, {lvms} wipes all previous data on the devices. Use this feature with caution.
90+
====
91+
11992
Wiping the device can lead to inconsistencies in data integrity if any of the following conditions are met:
12093

12194
* The device is being used as swap space.
12295
* The device is part of a RAID array.
12396
* The device is mounted.
12497

12598
If any of these conditions are true, do not force wipe the disk. Instead, you must manually wipe the disk.
126-
====
127-
128-
[WARNING]
129-
====
130-
If this field is set to `true`, {lvms} wipes all previous data on the devices. Use this feature with caution.
131-
====
13299

133100
|`deviceClasses.thinPoolConfig`
134101
|`object`
@@ -154,26 +121,6 @@ To disable over-provisioning, set this field to 1.
154121

155122
|====
156123

157-
Upon creating the `LVMCluster` CR, {lvms} creates a storage class and volume snapshot class for each device class.
158124

159-
[NOTE]
160-
====
161-
{lvms} configures the name of the storage class and volume snapshot class in the format `lvms-<device-class-name>`. Where, `<device-class-name>` is the value of the `deviceClasses.name` field in the `LVMCluster` CR. For example, if the `deviceClasses.name` field is set to vg1, the name of the storage class and volume snapshot class is `lvms-vg1`.
162-
163-
To get the list of storage classes, run the following command:
164-
[source,terminal]
165-
----
166-
$ oc get storageclass
167-
----
168-
169-
To get the list of volume snapshot classes, run the following command:
170-
[source,terminal]
171-
----
172-
$ oc get volumesnapshotclass
173-
----
174-
====
175125

176-
Upon creating the `LVMCluster` CR, {lvms} creates the following system-managed CRs:
177126

178-
* `LVMVolumeGroup`: This CR is a specific type of persistent volume (PV) that is backed by an LVM volume group. It tracks the individual volume groups across multiple nodes.
179-
* `LVMVolumeGroupNodeStatus`: This CR tracks the status of the volume groups on a node.

modules/lvms-about-scaling-storage-of-clusters.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
:_mod-docs-content-type: CONCEPT
66
[id="lvms-about-scaling-storage-of-cluster_{context}"]
7-
= Scaling up the storage of clusters
7+
= Ways to scale up the storage of clusters
88

99
{product-title} supports additional worker nodes for clusters on bare metal user-provisioned infrastructure. You can scale up the storage of clusters either by adding new worker nodes with available storage or by adding new devices to the existing worker nodes.
1010

modules/lvms-about-volume-snapshots.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ You can perform the following actions using the volume snapshots:
1414
+
1515
[IMPORTANT]
1616
====
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.
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.
1818
====
1919
2020
* Revert to a state at which the volume snapshot was taken.

modules/lvms-creating-lvms-cluster-using-cli.adoc

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ You can only create a single instance of the `LVMCluster` custom resource (CR) o
2323
2424
* You have installed a worker node in the cluster.
2525
26+
* You read the "About the LVMCluster custom resource" section. See the "Additional resources" section.
27+
2628
.Procedure
2729

2830
. Create an `LVMCluster` custom resource (CR) YAML file:
2931
+
30-
.Example `LVMCluster` CR
32+
.Example `LVMCluster` CR YAML file
3133
[source,yaml]
3234
----
3335
apiVersion: lvm.topolvm.io/v1alpha1
@@ -66,7 +68,7 @@ lvmcluster/lvmcluster created
6668

6769
.Verification
6870

69-
* Check that the `LVMCluster` CR is in the `Ready` state:
71+
. Check that the `LVMCluster` CR is in the `Ready` state:
7072
+
7173
[source, terminal]
7274
----
@@ -119,3 +121,31 @@ status:
119121
state: Failed
120122
----
121123
====
124+
125+
. Optional: To view the storage classes created by {lvms} for each device class, run the following command:
126+
+
127+
[source,terminal]
128+
----
129+
$ oc get storageclass
130+
----
131+
+
132+
.Example output
133+
[source, terminal]
134+
----
135+
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
136+
lvms-vg1 topolvm.io Delete WaitForFirstConsumer true 31m
137+
----
138+
139+
. Optional: To view the volume snapshot classes created by {lvms} for each device class, run the following command:
140+
+
141+
[source,terminal]
142+
----
143+
$ oc get volumesnapshotclass
144+
----
145+
+
146+
.Example output
147+
[source, terminal]
148+
----
149+
NAME DRIVER DELETIONPOLICY AGE
150+
lvms-vg1 topolvm.io Delete 24h
151+
----

modules/lvms-creating-lvms-cluster-using-web-console.adoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ You can only create a single instance of the `LVMCluster` custom resource (CR) o
2121
2222
* You have installed a worker node in the cluster.
2323
24+
* You read the "About the LVMCluster custom resource" section. See the "Additional resources" section.
25+
2426
.Procedure
2527

2628
. Log in to the {product-title} web console.
@@ -37,4 +39,6 @@ You can only create a single instance of the `LVMCluster` custom resource (CR) o
3739

3840
.Verification
3941

40-
* On the *LVMCLuster* page, check that the `LVMCluster` CR is in the `Ready` state.
42+
. On the *LVMCLuster* page, check that the `LVMCluster` CR is in the `Ready` state.
43+
. Optional: To view the available storage classes created by {lvms} for each device class, click *Storage* -> *StorageClasses*.
44+
. Optional: To view the available volume snapshot classes created by {lvms} for each device class, click *Storage* -> *VolumeSnapshotClasses*.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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-lvmcluster-using-cli_{context}"]
7+
= Deleting an LVMCluster CR by using the CLI
8+
9+
You can delete the `LVMCluster` custom resource (CR) using the OpenShift CLI (`oc`).
10+
11+
.Prerequisites
12+
13+
* You have access to {product-title} as a user with `cluster-admin` permissions.
14+
* You have deleted the persistent volume claims (PVCs), volume snapshots, and volume clones provisioned by {lvms}. You have also deleted the applications that are using these resources.
15+
16+
.Procedure
17+
18+
. Log in to the OpenShift CLI (`oc`).
19+
. Delete the `LVMCluster` CR by running the following command:
20+
+
21+
[source,terminal]
22+
----
23+
$ oc delete lvmcluster <lvmclustername> -n openshift-storage
24+
----
25+
26+
.Verification
27+
28+
* To verify that the `LVMCluster` CR has been deleted, run the following command:
29+
+
30+
[source,terminal]
31+
----
32+
$ oc get lvmcluster -n <namespace>
33+
----
34+
+
35+
.Example output
36+
[source,terminal]
37+
----
38+
No resources found in openshift-storage namespace.
39+
----

0 commit comments

Comments
 (0)