Skip to content
Open
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
4 changes: 3 additions & 1 deletion modules/immutable-fields-of-the-storage-class-options.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
= Immutable fields of the storage class options

[role="_abstract"]
After you create the `LVMCluster`, you cannot change the value of the some of the `storageClassOptions` fields such as `reclaimPolicy`, `volumeBindingMode`, and `additionalParameters`. This mirrors the behavior of Kubernetes StorageClasses, which do not allow changes to these fields after creation.
After you create the LVMCluster custom resource, you cannot change certain `storageClassOptions` fields, such as `reclaimPolicy`, `volumeBindingMode`, and `additionalParameters`. To change an immutable field, you must delete and recreate the LVMCluster with the new values.

This mirrors the behavior of Kubernetes `StorageClasses`, which do not allow changes to these fields after creation.

If you attempt to modify an immutable field, the API server rejects the request:

Expand Down
5 changes: 4 additions & 1 deletion modules/lvms-about-scaling-storage-of-clusters.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
[id="lvms-about-scaling-storage-of-cluster_{context}"]
= Ways to scale up the storage of clusters

{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.
[role="_abstract"]
Scale up worker node storage capacity when running out of space, adding new applications, or expanding cluster capacity by using the OpenShift CLI (`oc`) to add new devices or worker nodes.

{product-title} supports additional worker nodes for clusters on bare metal user-provisioned infrastructure.

{lvms-first} detects and uses additional worker nodes when the nodes become active.

Expand Down
6 changes: 2 additions & 4 deletions modules/lvms-deleting-pvc.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@
[id="lvms-deleting-pvc_{context}"]
= Deleting a persistent volume claim

You can delete a persistent volume claim (PVC) by using the OpenShift CLI (`oc`).
[role="_abstract"]
You can delete a persistent volume claim (PVC) when it is no longer needed to free up storage resources or when decommissioning an application by using the OpenShift CLI (`oc`).

.Prerequisites

* You have access to {product-title} as a user with `cluster-admin` permissions.
.Procedure

. Log in to the OpenShift CLI (`oc`).

. Delete the PVC by running the following command:
Expand All @@ -24,7 +23,6 @@ $ oc delete pvc <pvc_name> -n <namespace>
----

.Verification

* To verify that the PVC is deleted, run the following command:
+
[source,terminal]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

:_mod-docs-content-type: PROCEDURE
[id="lvms-provisioning-storage-using-lvms_{context}"]
= Provisioning storage
= Provisioning storage by using {lvms}

After you have created the LVM volume groups using the `LVMCluster` custom resource (CR), you can provision the storage by creating persistent volume claims (PVCs).
[role="_abstract"]
After you have created the LVM volume groups by using the `LVMCluster` custom resource (CR), you can provision storage for your workloads by creating persistent volume claims (PVCs) that dynamically allocate local storage from the volume groups.

The following are the minimum storage sizes that you can request for each file system type:

Expand All @@ -17,11 +18,9 @@ The following are the minimum storage sizes that you can request for each file s
To create a PVC, you must create a `PersistentVolumeClaim` object.

.Prerequisites

* You have created an `LVMCluster` CR.

.Procedure

. Log in to the OpenShift CLI (`oc`).

. Create a `PersistentVolumeClaim` object:
Expand All @@ -32,24 +31,26 @@ To create a PVC, you must create a `PersistentVolumeClaim` object.
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: lvm-block-1 <1>
name: lvm-block-1
namespace: default
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem <2>
volumeMode: Filesystem
resources:
requests:
storage: 10Gi <3>
storage: 10Gi
limits:
storage: 20Gi <4>
storageClassName: lvms-vg1 <5>
storage: 20Gi
storageClassName: lvms-vg1
----
<1> Specify a name for the PVC.
<2> To create a file PVC, set this field to `Filesystem`. To create a block PVC, set this field to `Block`.
<3> Specify the storage size. If the value is less than the minimum storage size, the requested storage size is rounded to the minimum storage size. The total storage size you can provision is limited by the size of the Logical Volume Manager (LVM) thin pool and the over-provisioning factor.
<4> Optional: Specify the storage limit. Set this field to a value that is greater than or equal to the minimum storage size. Otherwise, PVC creation fails with an error.
<5> The value of the `storageClassName` field must be in the format `lvms-<device_class_name>` where `<device_class_name>` is the value of the `deviceClasses.name` field in the `LVMCluster` CR.
+
* `metadata.name`: Specifies a name for the PVC.
* `spec.volumeMode`: To create a file PVC, set this field to `Filesystem`. To create a block PVC, set this field to `Block`.
* `spec.resources.requests.storage`: Specifies the storage size. If the value is less than the minimum storage size, the requested storage size is rounded to the minimum storage size. The total storage size you can provision is limited by the size of the Logical Volume Manager (LVM) thin pool and the over-provisioning factor.
* `spec.resources.limits.storage`: (optional) Specifies the storage limit. Set this field to a value that is greater than or equal to the minimum storage size. Otherwise, PVC creation fails with an error.
* `spec.storageClassName`: The value of the `storageClassName` field must be 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`, you must set the `storageClassName` field to `lvms-vg1`.
+
[NOTE]
Expand All @@ -70,7 +71,6 @@ The created PVCs remain in `Pending` state until you deploy the pods that use th
====

.Verification

* To verify that the PVC is created, run the following command:
+
[source, terminal]
Expand All @@ -79,7 +79,6 @@ $ oc get pvc -n <namespace>
----
+
.Example output
+
[source, terminal]
----
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
Expand Down
17 changes: 7 additions & 10 deletions modules/lvms-scaling-storage-expand-pvc.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,28 @@
[id="lvms-scaling-expand-pvc_{context}"]
= Expanding a persistent volume claim

After scaling up the storage of a cluster, you can expand the existing persistent volume claims (PVCs).

To expand a PVC, you must update the `storage` field in the PVC.
[role="_abstract"]
After scaling up cluster storage, you can expand existing persistent volume claims (PVCs) to increase their storage capacity by updating the `storage` field in the PVC.

.Prerequisites

* Dynamic provisioning is used.
* The `StorageClass` object associated with the PVC has the `allowVolumeExpansion` field set to `true`.

.Procedure

. Log in to the OpenShift CLI (`oc`).

. Update the value of the `spec.resources.requests.storage` field to a value that is greater than the current value by running the following command:
+
[source,terminal]
----
$ oc patch pvc <pvc_name> -n <application_namespace> \ <1>
--type=merge -p \ '{ "spec": { "resources": { "requests": { "storage": "<desired_size>" }}}}' <2>
$ oc patch pvc <pvc_name> -n <application_namespace> \
--type=merge -p \ '{ "spec": { "resources": { "requests": { "storage": "<desired_size>" }}}}'
----
<1> Replace `<pvc_name>` with the name of the PVC that you want to expand.
<2> Replace `<desired_size>` with the new size to expand the PVC.
+
* Replace `<pvc_name>` with the name of the PVC that you want to expand.
* Replace `<desired_size>` with the new size to expand the PVC.

.Verification

* To verify that resizing is completed, run the following command:
+
[source, terminal]
Expand Down
5 changes: 2 additions & 3 deletions modules/lvms-scaling-storage-of-clusters-using-cli.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@
[id="lvms-scaling-storage-of-clusters-using-cli_{context}"]
= Scaling up the storage of clusters by using the CLI

You can scale up the storage capacity of the worker nodes on a cluster by using the OpenShift CLI (`oc`).
[role="_abstract"]
Scale up worker node storage capacity when running out of space, adding new applications, or expanding cluster capacity by using the OpenShift CLI (`oc`) to add new devices or worker nodes.

.Prerequisites

* You have additional unused devices on each cluster to be used by {lvms-first}.
* You have installed the OpenShift CLI (`oc`).
* You have created an `LVMCluster` custom resource (CR).

.Procedure

. Edit the `LVMCluster` CR by running the following command:
+
[source, terminal]
Expand Down
27 changes: 14 additions & 13 deletions modules/lvms-scaling-storage-of-clusters-using-rhacm.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@
[id="lvms-scaling-storage-of-clusters-using-rhacm_{context}"]
= Scaling up the storage of clusters by using {rh-rhacm}

You can scale up the storage capacity of worker nodes on the clusters by using {rh-rhacm}.
[role="_abstract"]
Scale up worker node storage capacity when running out of space, adding new applications, or expanding cluster capacity by using {rh-rhacm} to add new devices or worker nodes.

.Prerequisites

* You have access to the {rh-rhacm} cluster using an account with `cluster-admin` privileges.
* You have created an `LVMCluster` custom resource (CR) by using {rh-rhacm}.
* You have additional unused devices on each cluster to be used by {lvms-first}.

.Procedure

. Log in to the {rh-rhacm} CLI using your {product-title} credentials.
. Edit the `LVMCluster` CR that you created using {rh-rhacm} by running the following command:
+
[source,terminal]
----
$ oc edit -f <file_name> -n <namespace> <1>
$ oc edit -f <file_name> -n <namespace>
----
<1> Replace `<file_name>` with the name of the `LVMCluster` CR.
+
Replace `<file_name>` with the name of the `LVMCluster` CR.

. In the `LVMCluster` CR, add the path to the new device in the `deviceSelector` field.
+
Expand All @@ -47,19 +47,20 @@ spec:
storage:
deviceClasses:
# ...
deviceSelector: <1>
paths: <2>
deviceSelector:
paths:
- /dev/disk/by-path/pci-0000:87:00.0-nvme-1
optionalPaths: <3>
optionalPaths:
- /dev/disk/by-path/pci-0000:89:00.0-nvme-1
# ...
----
<1> Contains the configuration to specify the paths to the devices that you want to add to the LVM volume group.
+
* `deviceSelector`: Contains the configuration to specify the paths to the devices that you want to add to the LVM volume group.
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-first} adds the supported unused devices to the LVM volume group. {lvms} adds the devices to the LVM volume group only if the following conditions are met:
* The device path exists.
* The device is supported by {lvms}. For information about unsupported devices, see "Devices not supported by {lvms}".
<2> Specify the device paths. If the device path specified in this field does not exist, or the device is not supported by {lvms}, the `LVMCluster` CR moves to the `Failed` state.
<3> Specify the optional device paths. If the device path specified in this field does not exist, or the device is not supported by {lvms}, {lvms} ignores the device without causing an error.
** The device path exists.
** The device is supported by {lvms}. For information about unsupported devices, see "Devices not supported by {lvms}".
* `paths`: Specifies the device paths. If the device path specified in this field does not exist, or the device is not supported by {lvms}, the `LVMCluster` CR moves to the `Failed` state.
* `optionalPaths`: Specifies the optional device paths. If the device path specified in this field does not exist, or the device is not supported by {lvms}, {lvms} ignores the device without causing an error.
+
[IMPORTANT]
====
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@
[id="lvms-scaling-storage-of-clusters-using-web-console_{context}"]
= Scaling up the storage of clusters by using the web console

You can scale up the storage capacity of the worker nodes on a cluster by using the {product-title} web console.
[role="_abstract"]
Scale up worker node storage capacity when running out of space, adding new applications, or expanding cluster capacity by using the {product-title} web console to add new devices or worker nodes.

.Prerequisites

* You have additional unused devices on each cluster to be used by {lvms-first}.
* You have created an `LVMCluster` custom resource (CR).
.Procedure

. Log in to the {product-title} web console.
. Click *Ecosystem* -> *Installed Operators*.
. Click *{lvms}* in the `openshift-lvm-storage` namespace.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
= StorageClass customization for LVMS device classes

[role="_abstract"]
You can customize the StorageClass for each device class by using the optional storageClassOptions field in the `LVMCluster` custom resource (CR).
You can customize the StorageClass for each device class by specifying reclaim policy, volume binding mode, parameters, and labels in the LVMCluster custom resource (CR).

Before, Logical Volume Manager Storage (LVMS) automatically created a StorageClass for each device class without allowing modification. If you attempted to manually edit a generated StorageClass, the Operator overwrote your changes during the next reconciliation loop.

Expand Down
4 changes: 2 additions & 2 deletions modules/storageclass-options.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

:_mod-docs-content-type: CONCEPT
[id="storageclass-options_{context}"]
= StorageClass options
= StorageClass options for LVMS device classes

[role="_abstract"]
You can configure custom StorageClass behaviors by defining the `storageClassOptions` field in your device class specification.
You can configure custom StorageClass behaviors for each device class, including reclaim policy, volume binding mode, and custom parameters and labels, by defining the storageClassOptions field in the LVMCluster custom resource.

If you set an empty configuration (storageClassOptions: {}) or omit the field entirely, the Operator uses the following default settings:

Expand Down
3 changes: 1 addition & 2 deletions modules/updating-lvm-cluster-labels.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
= Updating LVM cluster labels

[role="_abstract"]
To organize and categorize your storage resources, you can update, remove, or clear custom storage class labels by patching the `LVMCluster` custom resource. Labels are the only configuration field that you can modify after cluster creation.
To organize and categorize your storage resources, you can update, remove, or clear custom StorageClass labels by patching the additionalLabels field in the LVMCluster custom resource.

.Procedure

. Patch the `LVMCluster` resource to update `additionalLabels` by running the following command:
+
[source,terminal]
Expand Down
18 changes: 9 additions & 9 deletions snippets/lvms-scaling-up-storage-lvmcluster-cr-snippet.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ spec:
storage:
deviceClasses:
# ...
deviceSelector: <1>
paths: <2>
deviceSelector:
paths:
- /dev/disk/by-path/pci-0000:87:00.0-nvme-1
- /dev/disk/by-path/pci-0000:88:00.0-nvme-1
optionalPaths: <3>
optionalPaths:
- /dev/disk/by-path/pci-0000:89:00.0-nvme-1
- /dev/disk/by-path/pci-0000:90:00.0-nvme-1
# ...
----
<1> Contains the configuration to specify the paths to the devices that you want to add to the LVM volume group.
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-first} adds the supported unused devices to the LVM volume group. {lvms} adds the devices to the LVM volume group only if the following conditions are met:
* The device path exists.
* The device is supported by {lvms}. For information about unsupported devices, see "Devices not supported by {lvms}".
<2> Specify the device paths. If the device path specified in this field does not exist, or the device is not supported by {lvms}, the `LVMCluster` CR moves to the `Failed` state.
<3> Specify the optional device paths. If the device path specified in this field does not exist, or the device is not supported by {lvms}, {lvms} ignores the device without causing an error.
+
* `spec...deviceSelector`: Contains the configuration to specify the paths to the devices that you want to add to the LVM volume group. 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-first} adds the supported unused devices to the LVM volume group. {lvms} adds the devices to the LVM volume group only if the following conditions are met:
** The device path exists.
** The device is supported by {lvms}. For information about unsupported devices, see "Devices not supported by {lvms}".
* `spec...deviceSelector.paths`: Specifies the device paths. If the device path specified in this field does not exist, or the device is not supported by {lvms}, the `LVMCluster` CR moves to the `Failed` state.
* `spec...deviceSelector.optionalPaths`: Specifies the optional device paths. If the device path specified in this field does not exist, or the device is not supported by {lvms}, {lvms} ignores the device without causing an error.
+
[IMPORTANT]
====
Expand Down