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
15 changes: 8 additions & 7 deletions modules/lvms-about-adding-devices-to-a-vg.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
[id="about-adding-devices-to-a-vg_{context}"]
= About adding devices to a volume group

The `deviceSelector` field in the `LVMCluster` CR contains the configuration to specify the paths to the devices that you want to add to the Logical Volume Manager (LVM) volume group.
[role="_abstract"]
To add devices to the Logical Volume Manager (LVM) volume group, use the `deviceSelector` field in the `LVMCluster` Custom Resource (CR) to specify the paths to the devices.
Comment thread
lpettyjo marked this conversation as resolved.

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 volume group (VG).

Expand All @@ -16,19 +17,19 @@ It is recommended to avoid referencing disks using symbolic naming, such as `/de

With this change, you might need to adjust existing automation workflows in the cases where monitoring collects information about the install device for each node.

For more information, see the link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/managing_file_systems/assembly_overview-of-persistent-naming-attributes_managing-file-systems[{op-system-base} documentation].
For more information, see the "{op-system-base} documentation".
====

You can add the path to the Redundant Array of Independent Disks (RAID) arrays in the `deviceSelector` field to integrate the RAID arrays with {lvms}. You can create the RAID array by using the `mdadm` utility. {lvms} does not support creating a software RAID.

[NOTE]
====
You can create a RAID array only during an {product-title} installation. For information on creating a RAID array, see the following sections:
You can create a RAID array only during an {product-title} installation. For information on creating a RAID array, see:

* "Configuring a RAID-enabled data volume" in "Additional resources".
* link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/managing_storage_devices/managing-raid_managing-storage-devices#creating-a-software-raid-on-an-installed-system_managing-raid[Creating a software RAID on an installed system]
* link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/managing_storage_devices/managing-raid_managing-storage-devices#replacing-a-failed-disk-in-raid_managing-raid[Replacing a failed disk in RAID]
* link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/managing_storage_devices/managing-raid_managing-storage-devices#repairing-raid-disks_managing-raid[Repairing RAID disks]
* "Configuring a RAID-enabled data volume"
* "Creating a software RAID on an installed system"
* "Replacing a failed disk in RAID"
* "Repairing RAID disks"
====

You can also add encrypted devices to the volume group. You can enable disk encryption on the cluster nodes during an {product-title} installation. After encrypting a device, you can specify the path to the LUKS encrypted device in the `deviceSelector` field. For information on disk encryption, see "About disk encryption" and "Configuring disk encryption and mirroring".
Expand Down
7 changes: 5 additions & 2 deletions modules/lvms-about-creating-lvmcluster-cr.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@
[id="about-creating-lvmcluster-cr_{context}"]
= Ways to create an LVMCluster custom resource

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}.
[role="_abstract"]
You can create an `LVMCluster` custom resource (CR) to configure {lvms} deployment and provision storage for your workloads by using the {oc-first}, {product-title} web console, or {rh-rhacm-first}.

You must install {lvms} by using {rh-rhacm} if you want to create an `LVMCluster` CR by using {rh-rhacm}.

[IMPORTANT]
====
You must create the `LVMCluster` CR in the same namespace where you installed the {lvms} Operator, which is `openshift-storage` by default.
====

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

* A `storageClass` and `volumeSnapshotClass` for each device class.
+
Expand Down
7 changes: 5 additions & 2 deletions modules/lvms-about-deleting-lvmcluster-cr.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@
[id="about-deleting-lvmcluster-cr_{context}"]
= Ways to delete an LVMCluster custom resource

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}.
[role="_abstract"]
Delete an `LVMCluster` custom resource (CR) when decommissioning {lvms} or reconfiguring storage by using the OpenShift CLI (`oc`), {product-title} web console, or {rh-rhacm-first}.

Upon deleting the `LVMCluster` CR, {lvms} deletes the following CRs:
You must have installed {lvms} by using {rh-rhacm} to delete an `LVMCluster` CR by using {rh-rhacm}.

After deleting the `LVMCluster` CR, {lvms} deletes the following CRs:

* `storageClass`
* `volumeSnapshotClass`
Expand Down
5 changes: 4 additions & 1 deletion modules/lvms-about-lvmcluster-cr.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
[id="about-lvmcluster_{context}"]
= About the LVMCluster custom resource

[role="_abstract"]
The `LVMCluster` custom resource (CR) is the primary configuration for {lvms} deployment, defining how storage is provisioned across your cluster by specifying volume groups, devices, node selection, and thin pool settings to meet your workload requirements.

You can configure the `LVMCluster` CR to perform the following actions:

* Create LVM volume groups that you can use to provision persistent volume claims (PVCs).
Expand All @@ -17,7 +20,7 @@ After you have installed {lvms}, you must create an `LVMCluster` custom resource

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


[id="about-lvmcluster-explain-fields_{context}"]
== Explanation of fields in the LVMCluster CR

The `LVMCluster` CR fields are described in the following table:
Expand Down
27 changes: 14 additions & 13 deletions modules/lvms-creating-lvmcluster-using-rhacm.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@
[id="lvms-creating-lvmcluster-using-rhacm_{context}"]
= Creating an LVMCluster CR by using {rh-rhacm}

After you have installed {lvms} by using {rh-rhacm}, you must create an `LVMCluster` custom resource (CR).
[role="_abstract"]
After installing {lvms-first} by using {rh-rhacm}, create an `LVMCluster` custom resource (CR) to configure storage deployment, specify devices and volume groups, and provision storage for your workloads.

.Prerequisites

* You have installed {lvms} by using {rh-rhacm}.
* You have access to the {rh-rhacm} cluster using an account with `cluster-admin` permissions.
* You read the "About the LVMCluster custom resource" section.

.Procedure

. Log in to the {rh-rhacm} CLI using your {product-title} credentials.

. Create a `ConfigurationPolicy` CR YAML file with the configuration to create an `LVMCluster` CR:
Expand All @@ -39,26 +38,28 @@ spec:
namespace: openshift-lvm-storage
spec:
storage:
deviceClasses: <1>
deviceClasses:
# ...
deviceSelector: <2>
deviceSelector:
# ...
thinPoolConfig: <3>
thinPoolConfig:
# ...
nodeSelector: <4>
nodeSelector:
# ...
remediationAction: enforce
severity: low
----
<1> Contains the configuration to assign the local storage devices to the LVM volume groups.
<2> 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.
<3> Contains the configuration to create a thin pool in the LVM volume group. If you exclude this field, logical volumes are thick provisioned.
<4> Contains the configuration to choose the nodes on which you want to create the LVM volume groups. If this field is empty, then all nodes without no-schedule taints are considered.
+
* `spec.object-templates.objectDefinition.spec.storage.deviceClasses`: Specifies the configuration to assign the local storage devices to the LVM volume groups.
* `spec...deviceSelector`: 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.
* `spec...thinPoolConfig`: Contains the configuration to create a thin pool in the LVM volume group. If you exclude this field, logical volumes are thick provisioned.
* `spec...nodeSelector`: Contains the configuration to choose the nodes on which you want to create the LVM volume groups. If this field is empty, then all nodes without no-schedule taints are considered.

. Create the `ConfigurationPolicy` CR by running the following command:
+
[source,terminal]
----
$ oc create -f <file_name> -n <cluster_namespace> <1>
$ oc create -f <file_name> -n <cluster_namespace>
----
<1> Namespace of the {product-title} cluster on which {lvms} is installed.
+
`<cluster_namespace>` is the namespace of the {product-title} cluster on which {lvms} is installed.
68 changes: 32 additions & 36 deletions modules/lvms-creating-lvms-cluster-using-cli.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,22 @@
[id="lvms-creating-lvms-cluster-using-cli_{context}"]
= Creating an LVMCluster CR by using the CLI

You can create an `LVMCluster` custom resource (CR) on a worker node using the OpenShift CLI (`oc`).
[role="_abstract"]
You can create an `LVMCluster` custom resource (CR) on a worker node by using the OpenShift CLI (`oc`) to configure storage deployment and provision local storage for your workloads.

[IMPORTANT]
====
You can only create a single instance of the `LVMCluster` custom resource (CR) on an {product-title} cluster.
====

.Prerequisites

* You have installed the OpenShift CLI (`oc`).

* You have logged in to {product-title} as a user with `cluster-admin` privileges.

* You have installed {lvms}.

* You have installed a worker node in the cluster.

* You read the "About the LVMCluster custom resource" section.
* You read "About the LVMCluster custom resource".

.Procedure

. Create an `LVMCluster` custom resource (CR) YAML file:
+
.Example `LVMCluster` CR YAML file
Expand All @@ -40,19 +35,20 @@ metadata:
spec:
# ...
storage:
deviceClasses: <1>
deviceClasses:
# ...
nodeSelector: <2>
nodeSelector:
# ...
deviceSelector: <3>
deviceSelector:
# ...
thinPoolConfig: <4>
thinPoolConfig:
# ...
----
<1> Contains the configuration to assign the local storage devices to the LVM volume groups.
<2> 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.
<3> 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.
<4> Contains the configuration to create a thin pool in the LVM volume group. If you exclude this field, logical volumes are thick provisioned.
+
* `spec.storage.deviceClasses`: Specifies the configuration to assign the local storage devices to the LVM volume groups.
* `spec...nodeSelector`: Specifies 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.
* `spec...deviceSelector`: Specifies 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.
* `spec...thinPoolConfig`: Specifies the configuration to create a thin pool in the LVM volume group. If you exclude this field, logical volumes are thick provisioned.

. Create the `LVMCluster` CR by running the following command:
+
Expand All @@ -68,8 +64,7 @@ lvmcluster/lvmcluster created
----

.Verification

. Check that the `LVMCluster` CR is in the `Ready` state:
. Check that the `LVMCluster` CR is in the `Ready` state by running the following command:
+
[source, terminal]
----
Expand All @@ -79,37 +74,38 @@ $ oc get lvmclusters.lvm.topolvm.io -o jsonpath='{.items[*].status}' -n <namespa
.Example output
[source,json]
----
{"deviceClassStatuses": <1>
{"deviceClassStatuses":
[
{
"name": "vg1",
"nodeStatus": [ <2>
"nodeStatus": [
{
"devices": [ <3>
"devices": [
"/dev/nvme0n1",
"/dev/nvme1n1",
"/dev/nvme2n1"
],
"node": "kube-node", <4>
"status": "Ready" <5>
"node": "kube-node",
"status": "Ready"
}
]
}
]
"state":"Ready"} <6>
----
<1> The status of the device class.
<2> The status of the LVM volume group on each node.
<3> The list of devices used to create the LVM volume group.
<4> The node on which the device class is created.
<5> The status of the LVM volume group on the node.
<6> The status of the `LVMCluster` CR.
"state":"Ready"}
----
+
* `deviceClassStatuses`: Specifies the status of the device class.
* `nodeStatus`: Specifies the status of the LVM volume group on each node.
* `devices`: Specifies the list of devices used to create the LVM volume group.
* `node`: Specifies the node on which the device class is created.
* `status`: Specifies the status of the LVM volume group on the node.
* `state`: Specifies the status of the `LVMCluster` CR.
+
[NOTE]
====
If the `LVMCluster` CR is in the `Failed` state, you can view the reason for failure in the `status` field.

Example of `status` field with the reason for failue:
+
Example of `status` field with the reason for failure:
[source, yaml]
----
status:
Expand All @@ -123,21 +119,21 @@ status:
----
====

. Optional: To view the storage classes created by {lvms} for each device class, run the following command:
. To view the storage classes created by {lvms} for each device class, run the following command:
+
[source,terminal]
----
$ oc get storageclass
----
+
.Example output
[source, terminal]
[source,terminal]
----
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
lvms-vg1 topolvm.io Delete WaitForFirstConsumer true 31m
----

. Optional: To view the volume snapshot classes created by {lvms} for each device class, run the following command:
. To view the volume snapshot classes created by {lvms} for each device class, run the following command:
+
[source,terminal]
----
Expand Down
11 changes: 4 additions & 7 deletions modules/lvms-creating-lvms-cluster-using-web-console.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,21 @@
[id="lvms-creating-lvms-cluster-using-web-console_{context}"]
= Creating an LVMCluster CR by using the web console

You can create an `LVMCluster` CR on a worker node using the {product-title} web console.
[role="_abstract"]
You can create an `LVMCluster` custom resource (CR) on a worker node by using the {product-title} web console to configure storage deployment and provision local storage for your workloads.

[IMPORTANT]
====
You can only create a single instance of the `LVMCluster` custom resource (CR) on an {product-title} cluster.
====

.Prerequisites

* You have access to the {product-title} cluster with `cluster-admin` privileges.

* You have installed {lvms}.

* You have installed a worker node in the cluster.

* You read the "About the LVMCluster custom resource" section.

.Procedure

. Log in to the {product-title} web console.
. Click *Ecosystem* -> *Installed Operators*.
. In the `openshift-lvm-storage` namespace, click *{lvms}*.
Expand All @@ -38,7 +34,8 @@ You can only create a single instance of the `LVMCluster` custom resource (CR) o
.. Click *Save*.

.Verification

. On the *LVMCLuster* page, check that the `LVMCluster` CR is in the `Ready` state.

. Optional: To view the available storage classes created by {lvms} for each device class, click *Storage* -> *StorageClasses*.

. Optional: To view the available volume snapshot classes created by {lvms} for each device class, click *Storage* -> *VolumeSnapshotClasses*.
6 changes: 2 additions & 4 deletions modules/lvms-deleting-lvmcluster-using-cli.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@
[id="lvms-deleting-lvmcluster-using-cli_{context}"]
= Deleting an LVMCluster CR by using the CLI

You can delete the `LVMCluster` custom resource (CR) using the OpenShift CLI (`oc`).
[role="_abstract"]
You can delete an `LVMCluster` custom resource (CR) when decommissioning {lvms} or reconfiguring storage by using the {oc-first}.

.Prerequisites

* You have access to {product-title} as a user with `cluster-admin` permissions.
* 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.

.Procedure

. Log in to the OpenShift CLI (`oc`).
. Delete the `LVMCluster` CR by running the following command:
+
Expand All @@ -24,7 +23,6 @@ $ oc delete lvmcluster <lvm_cluster_name> -n <namespace>
----

.Verification

* To verify that the `LVMCluster` CR has been deleted, run the following command:
+
[source,terminal]
Expand Down
Loading