Skip to content

Commit 25d2b99

Browse files
committed
TELCODOCS-1626: recovering vgs from prev lvms installation
1 parent 0ee2776 commit 25d2b99

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

modules/lvms-creating-logical-volume-manager-cluster.adoc

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,23 +52,23 @@ metadata:
5252
spec:
5353
storage:
5454
deviceClasses: <1>
55-
- name: vg1
56-
fstype: ext4 <2>
57-
default: true <3>
58-
deviceSelector: <4>
55+
- name: vg1 <2>
56+
fstype: ext4 <3>
57+
default: true <4>
58+
deviceSelector: <5>
5959
paths:
6060
- /dev/disk/by-path/pci-0000:87:00.0-nvme-1
6161
- /dev/disk/by-path/pci-0000:88:00.0-nvme-1
6262
- /dev/md/md-var
6363
optionalPaths:
6464
- /dev/disk/by-path/pci-0000:89:00.0-nvme-1
6565
- /dev/disk/by-path/pci-0000:90:00.0-nvme-1
66-
forceWipeDevicesAndDestroyAllData: true <5>
66+
forceWipeDevicesAndDestroyAllData: true <6>
6767
thinPoolConfig:
6868
name: thin-pool-1
6969
sizePercent: 90
7070
overprovisionRatio: 10
71-
nodeSelector: <6>
71+
nodeSelector: <7>
7272
nodeSelectorTerms:
7373
- matchExpressions:
7474
- key: app
@@ -80,12 +80,14 @@ spec:
8080
If you add or remove a `deviceClass`, then the update reflects in the cluster only after deleting and recreating the `TopoLVM-Node` pod.
8181
Configure the local device paths of the disks as an array of values in the `deviceSelector` field.
8282
When configuring multiple device classes, you must specify the device path for each device.
83-
<2> Set `fstype` to `ext4` or `xfs`. By default, it is set to `xfs` if the setting is not specified.
84-
<3> Mandatory: The `LVMCluster` resource must contain a single default storage class. Set `default: false` for secondary device storage classes.
83+
<2> Specify a name for the LVM volume group (VG). To recover VGs from the previous {lvms} installation, you must set this field to the name of the VG that you want to recover.
84+
You can only recover the VGs but not the logical volume associated with the VG.
85+
<3> Set `fstype` to `ext4` or `xfs`. By default, it is set to `xfs` if the setting is not specified.
86+
<4> Mandatory: The `LVMCluster` resource must contain a single default storage class. Set `default: false` for secondary device storage classes.
8587
If you are updating the `LVMCluster` resource from a previous version, you must specify a single default device class.
86-
<4> Optional. To control or restrict the volume group to your preferred devices, you can manually specify the local paths of the devices in the `deviceSelector` section of the `LVMCluster` YAML. The `paths` section refers to devices the `LVMCluster` adds, which means those paths must exist. The `optionalPaths` section refers to devices the `LVMCluster` might add. You must specify at least one of `paths` or `optionalPaths` when specifying the `deviceSelector` section. If you specify `paths`, it is not mandatory to specify `optionalPaths`. If you specify `optionalPaths`, it is not mandatory to specify `paths` but at least one optional path must be present on the node. If you do not specify any paths, then the `LVMCluster` adds the unused devices on the node. You can also add the path to the RAID arrays to integrate the RAID arrays with {lvms}. After a device is added to the `LVMCluster`, it cannot be removed.
87-
<5> Optional: To force wipe the selected disks, set `forceWipeDevicesAndDestroyAllData` to true. This parameter is set to `false` by default.
88-
<6> Optional: To control what worker nodes the `LVMCluster` CR is applied to, specify a set of node selector labels.
88+
<5> Optional. To control or restrict the volume group to your preferred devices, you can manually specify the local paths of the devices in the `deviceSelector` section of the `LVMCluster` YAML. The `paths` section refers to devices the `LVMCluster` adds, which means those paths must exist. The `optionalPaths` section refers to devices the `LVMCluster` might add. You must specify at least one of `paths` or `optionalPaths` when specifying the `deviceSelector` section. If you specify `paths`, it is not mandatory to specify `optionalPaths`. If you specify `optionalPaths`, it is not mandatory to specify `paths` but at least one optional path must be present on the node. If you do not specify any paths, then the `LVMCluster` adds the unused devices on the node. After a device is added to the `LVMCluster`, it cannot be removed.
89+
<6> Optional: To force wipe the selected disks, set `forceWipeDevicesAndDestroyAllData` to `true`. This parameter is set to `false` by default.
90+
<7> Optional: To control what worker nodes the `LVMCluster` CR is applied to, specify a set of node selector labels.
8991
The specified labels must be present on the node in order for the `LVMCluster` to be scheduled on that node.
9092

9193
.. Create the `LVMCluster` CR:
@@ -106,6 +108,11 @@ The `LVMCluster` resource creates the following system-managed CRs:
106108
`LVMVolumeGroup`:: Tracks individual volume groups across multiple nodes.
107109
`LVMVolumeGroupNodeStatus`:: Tracks the status of the volume groups on a node.
108110

111+
To recover VGs from the previous {lvms} installation, ensure that the following conditions are met:
112+
113+
* VGs must not be corrupted.
114+
* 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].
115+
109116
[NOTE]
110117
====
111118
Wiping the disk can lead to inconsistencies in data integrity if any of the following conditions is met:
@@ -229,4 +236,4 @@ spec:
229236
- /dev/nvme2n1
230237
name: vg1
231238
status: Ready
232-
----
239+
----

0 commit comments

Comments
 (0)