diff --git a/modules/lvms-about-adding-devices-to-a-vg.adoc b/modules/lvms-about-adding-devices-to-a-vg.adoc index 35b56081f82..84caa491965 100644 --- a/modules/lvms-about-adding-devices-to-a-vg.adoc +++ b/modules/lvms-about-adding-devices-to-a-vg.adoc @@ -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. 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). @@ -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". diff --git a/modules/lvms-about-creating-lvmcluster-cr.adoc b/modules/lvms-about-creating-lvmcluster-cr.adoc index 7153fba8e5b..6812441f20f 100644 --- a/modules/lvms-about-creating-lvmcluster-cr.adoc +++ b/modules/lvms-about-creating-lvmcluster-cr.adoc @@ -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. + diff --git a/modules/lvms-about-deleting-lvmcluster-cr.adoc b/modules/lvms-about-deleting-lvmcluster-cr.adoc index 5d7ba062468..e498f4ca689 100644 --- a/modules/lvms-about-deleting-lvmcluster-cr.adoc +++ b/modules/lvms-about-deleting-lvmcluster-cr.adoc @@ -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` diff --git a/modules/lvms-about-lvmcluster-cr.adoc b/modules/lvms-about-lvmcluster-cr.adoc index 57293c77ab5..849939a3f3e 100644 --- a/modules/lvms-about-lvmcluster-cr.adoc +++ b/modules/lvms-about-lvmcluster-cr.adoc @@ -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). @@ -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: diff --git a/modules/lvms-creating-lvmcluster-using-rhacm.adoc b/modules/lvms-creating-lvmcluster-using-rhacm.adoc index 561b7e75c54..78a9bd40cd9 100644 --- a/modules/lvms-creating-lvmcluster-using-rhacm.adoc +++ b/modules/lvms-creating-lvmcluster-using-rhacm.adoc @@ -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: @@ -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 -n <1> +$ oc create -f -n ---- -<1> Namespace of the {product-title} cluster on which {lvms} is installed. ++ +`` is the namespace of the {product-title} cluster on which {lvms} is installed. diff --git a/modules/lvms-creating-lvms-cluster-using-cli.adoc b/modules/lvms-creating-lvms-cluster-using-cli.adoc index 6f3db778038..cacad4b5889 100644 --- a/modules/lvms-creating-lvms-cluster-using-cli.adoc +++ b/modules/lvms-creating-lvms-cluster-using-cli.adoc @@ -6,7 +6,8 @@ [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] ==== @@ -14,19 +15,13 @@ You can only create a single instance of the `LVMCluster` custom resource (CR) o ==== .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 @@ -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: + @@ -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] ---- @@ -79,37 +74,38 @@ $ oc get lvmclusters.lvm.topolvm.io -o jsonpath='{.items[*].status}' -n +{"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: @@ -123,7 +119,7 @@ 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] ---- @@ -131,13 +127,13 @@ $ 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] ---- diff --git a/modules/lvms-creating-lvms-cluster-using-web-console.adoc b/modules/lvms-creating-lvms-cluster-using-web-console.adoc index 5d22ca15f4d..355752bc51c 100644 --- a/modules/lvms-creating-lvms-cluster-using-web-console.adoc +++ b/modules/lvms-creating-lvms-cluster-using-web-console.adoc @@ -6,7 +6,8 @@ [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] ==== @@ -14,17 +15,12 @@ You can only create a single instance of the `LVMCluster` custom resource (CR) o ==== .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}*. @@ -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*. diff --git a/modules/lvms-deleting-lvmcluster-using-cli.adoc b/modules/lvms-deleting-lvmcluster-using-cli.adoc index efef0cc436c..d29e1d29ba4 100644 --- a/modules/lvms-deleting-lvmcluster-using-cli.adoc +++ b/modules/lvms-deleting-lvmcluster-using-cli.adoc @@ -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: + @@ -24,7 +23,6 @@ $ oc delete lvmcluster -n ---- .Verification - * To verify that the `LVMCluster` CR has been deleted, run the following command: + [source,terminal] diff --git a/modules/lvms-deleting-lvmcluster-using-rhacm.adoc b/modules/lvms-deleting-lvmcluster-using-rhacm.adoc index 3e69237ee27..0351a9c7fd5 100644 --- a/modules/lvms-deleting-lvmcluster-using-rhacm.adoc +++ b/modules/lvms-deleting-lvmcluster-using-rhacm.adoc @@ -6,23 +6,25 @@ [id="lvms-deleting-lvmcluster-using-rhacm_{context}"] = Deleting an LVMCluster CR by using {rh-rhacm} -If you have installed {lvms} by using {rh-rhacm-first}, you can delete an `LVMCluster` CR by using {rh-rhacm}. +[role="_abstract"] +You can delete an `LVMCluster` custom resource (CR) when decommissioning {lvms} or reconfiguring storage by using {rh-rhacm-first}. -.Prerequisites +You can only delete an `LVMCluster` CR by using {rh-rhacm} If you installed {lvms} by using {rh-rhacm-first}. +.Prerequisites * You have access to the {rh-rhacm} cluster 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 {rh-rhacm} CLI using your {product-title} credentials. . Delete the `ConfigurationPolicy` CR YAML file that was created for the `LVMCluster` CR: + [source,terminal] ---- -$ oc delete -f -n <1> +$ oc delete -f -n ---- -<1> Namespace of the {product-title} cluster on which {lvms} is installed. ++ +`` is the namespace of the {product-title} cluster on which {lvms} is installed. . Create a `Policy` CR YAML file to delete the `LVMCluster` CR: + @@ -47,7 +49,7 @@ spec: metadata: name: policy-lvmcluster-removal spec: - remediationAction: enforce <1> + remediationAction: enforce severity: low object-templates: - complianceType: mustnothave @@ -56,7 +58,7 @@ spec: apiVersion: lvm.topolvm.io/v1alpha1 metadata: name: my-lvmcluster - namespace: openshift-lvm-storage <2> + namespace: openshift-lvm-storage --- apiVersion: policy.open-cluster-management.io/v1 kind: PlacementBinding @@ -79,16 +81,17 @@ spec: clusterConditions: - status: "True" type: ManagedClusterConditionAvailable - clusterSelector: <3> + clusterSelector: matchExpressions: - key: mykey operator: In values: - myvalue ---- -<1> The `spec.remediationAction` in `policy-template` is overridden by the preceding parameter value for `spec.remediationAction`. -<2> This `namespace` field must have the `openshift-lvm-storage` value. -<3> Configure the requirements to select the clusters. {lvms} is uninstalled on the clusters that match the selection criteria. ++ +* `spec.policy-templates.spec.remediationAction`: This field is overridden by the preceding parameter value for `spec.remediationAction`. +* `spec.policy-templates.objectDefinition.spec.objectDefinition.metadata.namespace`: This `namespace` field must have the `openshift-lvm-storage` value. +* `spec.clusterSelector`: Configures the requirements to select the clusters. {lvms} is uninstalled on the clusters that match the selection criteria. . Create the `Policy` CR by running the following command: + @@ -120,7 +123,7 @@ spec: metadata: name: policy-lvmcluster-removal-inform spec: - remediationAction: inform <1> + remediationAction: inform severity: low object-templates: - complianceType: mustnothave @@ -129,7 +132,7 @@ spec: apiVersion: lvm.topolvm.io/v1alpha1 metadata: name: my-lvmcluster - namespace: openshift-lvm-storage <2> + namespace: openshift-lvm-storage --- apiVersion: policy.open-cluster-management.io/v1 kind: PlacementBinding @@ -159,8 +162,9 @@ spec: values: - myvalue ---- -<1> The `policy-template` `spec.remediationAction` is overridden by the preceding parameter value for `spec.remediationAction`. -<2> The `namespace` field must have the `openshift-lvm-storage` value. ++ +* `spec.policy-templates.objectDefinition.spec.remediationAction`: This field is overridden by the preceding parameter value for `spec.remediationAction`. +* `spec.policy-templates.objectDefinition.spec.object-templates.objectDefinition.metadata.namespace`: This `namespace` field must have the `openshift-lvm-storage` value. . Create the `Policy` CR by running the following command: + diff --git a/modules/lvms-deleting-lvmcluster-using-web-console.adoc b/modules/lvms-deleting-lvmcluster-using-web-console.adoc index cb58e3dd1b8..db40909c2fc 100644 --- a/modules/lvms-deleting-lvmcluster-using-web-console.adoc +++ b/modules/lvms-deleting-lvmcluster-using-web-console.adoc @@ -6,15 +6,14 @@ [id="lvms-deleting-lvmcluster-using-web-console_{context}"] = Deleting an LVMCluster CR by using the web console -You can delete the `LVMCluster` custom resource (CR) using the {product-title} web console. +[role="_abstract"] +You can delete an `LVMCluster` custom resource (CR) when decommissioning {lvms} or reconfiguring storage by using the {product-title} web console. .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 {product-title} web console. . Click *Ecosystem* -> *Installed Operators* to view all the installed Operators. . Click *{lvms}* in the `openshift-lvm-storage` namespace. @@ -23,5 +22,4 @@ You can delete the `LVMCluster` custom resource (CR) using the {product-title} w . Click *Delete*. .Verification - * On the `LVMCLuster` page, check that the `LVMCluster` CR has been deleted. diff --git a/modules/lvms-reusing-vg-from-prev-installation.adoc b/modules/lvms-reusing-vg-from-prev-installation.adoc index 5de5d675b63..1ff23659e6c 100644 --- a/modules/lvms-reusing-vg-from-prev-installation.adoc +++ b/modules/lvms-reusing-vg-from-prev-installation.adoc @@ -6,9 +6,10 @@ [id="lvms-reusing-vg-from-prev-installation_{context}"] = Reusing a volume group from the previous LVM Storage installation -You can reuse an existing volume group (VG) from the previous {lvms} installation instead of creating a new VG. +[role="_abstract"] +You can reuse an existing volume group (VG) from a previous {lvms} installation to preserve your existing storage configuration and avoid recreating VGs when reinstalling or upgrading {lvms}. -You can only reuse a VG but not the logical volume associated with the VG. +You can only reuse a VG, but not the logical volume associated with the VG. [IMPORTANT] ==== @@ -16,12 +17,10 @@ You can perform this procedure only while creating an `LVMCluster` custom resour ==== .Prerequisites - * The VG that you want to reuse must not be corrupted. -* The VG that you want to reuse must have the `lvms` tag. For more information on adding tags to LVM 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]. +* The VG that you want to reuse must have the `lvms` tag. For more information on adding tags to LVM objects, see "Grouping LVM objects with tags". .Procedure - . Open the `LVMCluster` CR YAML file. . Configure the `LVMCluster` CR parameters as described in the following example: @@ -37,32 +36,31 @@ spec: # ... storage: deviceClasses: - - name: vg1 <1> - fstype: ext4 <2> + - name: vg1 + fstype: ext4 default: true - deviceSelector: <3> + deviceSelector: # ... - forceWipeDevicesAndDestroyAllData: false <4> - thinPoolConfig: <5> + forceWipeDevicesAndDestroyAllData: false + thinPoolConfig: # ... - nodeSelector: <6> + nodeSelector: # ... ---- -<1> Set this field to the name of a VG from the previous {lvms} installation. -<2> Set this field to `ext4` or `xfs`. By default, this field is set to `xfs`. -<3> You can add new devices to the VG that you want to reuse by specifying the new device paths in the `deviceSelector` field. If you do not want to add new devices to the VG, ensure that the `deviceSelector` configuration in the current {lvms} installation is same as that of the previous {lvms} installation. -<4> If this field is set to `true`, {lvms} wipes all the data on the devices that are added to the VG. -<5> To retain the `thinPoolConfig` configuration of the VG that you want to reuse, ensure that the `thinPoolConfig` configuration in the current {lvms} installation is same as that of the previous {lvms} installation. Otherwise, you can configure the `thinPoolConfig` field as required. -<6> Configure the requirements 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.storage.deviceClasses.name`: Specifies the name of a VG from the previous {lvms} installation. +* `spec.storage.deviceClasses.fstype`: Set this field to `ext4` or `xfs`. By default, this field is set to `xfs`. +* `spec.storage.deviceClasses.name.deviceSelector`: You can add new devices to the VG that you want to reuse by specifying the new device paths in the `deviceSelector` field. If you do not want to add new devices to the VG, ensure that the `deviceSelector` configuration in the current {lvms} installation is same as that of the previous {lvms} installation. +* `spec...forceWipeDevicesAndDestroyAllData`: If this field is set to `true`, {lvms} wipes all the data on the devices that are added to the VG. +* `spec....thinPoolConfig`: To retain the `thinPoolConfig` configuration of the VG that you want to reuse, ensure that the `thinPoolConfig` configuration in the current {lvms} installation is same as that of the previous {lvms} installation. Otherwise, you can configure the `thinPoolConfig` field as required. +* `spec...nodeSelector`: Configure the requirements 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. . Save the `LVMCluster` CR YAML file. -[NOTE] -==== +.Verification To view the devices that are part a volume group, run the following command: [source,terminal] ---- -$ pvs -S vgname= <1> +$ pvs -S vgname= ---- -<1> Replace `` with the name of the volume group. -==== \ No newline at end of file +Replace `` with the name of the volume group. \ No newline at end of file diff --git a/modules/lvms-unsupported-devices.adoc b/modules/lvms-unsupported-devices.adoc index 50ee9106ecb..605e1da50d2 100644 --- a/modules/lvms-unsupported-devices.adoc +++ b/modules/lvms-unsupported-devices.adoc @@ -6,7 +6,8 @@ [id="lvms-unsupported-devices_{context}"] = Devices not supported by {lvms} -When you are adding the device paths in the `deviceSelector` field of the `LVMCluster` custom resource (CR), ensure that the devices are supported by {lvms}. If you add paths to the unsupported devices, {lvms} excludes the devices to avoid complexity in managing logical volumes. +[role="_abstract"] +When adding device paths to the `LVMCluster` custom resource (CR), ensure devices are supported by {lvms}. {lvms} excludes unsupported devices to avoid complexity in managing logical volumes. If you do not specify any device path in the `deviceSelector` field, {lvms} adds only the unused devices that it supports. @@ -43,20 +44,21 @@ Devices that are part of another volume group:: To get the information about the + [source, terminal] ---- -$ pvs <1> +$ pvs ---- -<1> Replace `` with the device name. ++ +Where `` is the device name. Devices with bind mounts:: To get the mount points of a device, run the following command: + [source, terminal] ---- -$ cat /proc/1/mountinfo | grep <1> +$ cat /proc/1/mountinfo | grep ---- -<1> Replace `` with the device name. ++ +Where `` is the device name. Devices that contain children devices:: - [NOTE] ==== It is recommended to wipe the device before using it in {lvms} to prevent unexpected behavior.