Skip to content

Commit 8e04ce1

Browse files
authored
Merge pull request #69065 from sr1kar99/add-new-param-to-deviceSelector
2 parents 164d384 + 799fc18 commit 8e04ce1

File tree

2 files changed

+39
-24
lines changed

2 files changed

+39
-24
lines changed

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

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,12 @@ spec:
5757
optionalPaths:
5858
- /dev/disk/by-path/pci-0000:89:00.0-nvme-1
5959
- /dev/disk/by-path/pci-0000:90:00.0-nvme-1
60+
forceWipeDevicesAndDestroyAllData: true <5>
6061
thinPoolConfig:
6162
name: thin-pool-1
6263
sizePercent: 90
6364
overprovisionRatio: 10
64-
nodeSelector: <5>
65+
nodeSelector: <6>
6566
nodeSelectorTerms:
6667
- matchExpressions:
6768
- key: app
@@ -76,7 +77,8 @@ When configuring multiple device classes, you must specify the device path for e
7677
<3> Mandatory: The `LVMCluster` resource must contain a single default storage class. Set `default: false` for secondary device storage classes.
7778
If you are updating the `LVMCluster` resource from a previous version, you must specify a single default device class.
7879
<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.
79-
<5> Optional: To control what worker nodes the `LVMCluster` CR is applied to, specify a set of node selector labels.
80+
<5> Optional: To force wipe the selected disks, set `forceWipeDevicesAndDestroyAllData` to true. This parameter is set to `false` by default.
81+
<6> Optional: To control what worker nodes the `LVMCluster` CR is applied to, specify a set of node selector labels.
8082
The specified labels must be present on the node in order for the `LVMCluster` to be scheduled on that node.
8183

8284
.. Create the `LVMCluster` CR:
@@ -97,6 +99,17 @@ The `LVMCluster` resource creates the following system-managed CRs:
9799
`LVMVolumeGroup`:: Tracks individual volume groups across multiple nodes.
98100
`LVMVolumeGroupNodeStatus`:: Tracks the status of the volume groups on a node.
99101

102+
[NOTE]
103+
====
104+
Wiping the disk can lead to inconsistencies in data integrity if any of the following conditions is met:
105+
106+
* The disk is being used as swap space.
107+
* The disk is part of the Redundant Array of Independent Disks (RAID).
108+
* The disk is mounted.
109+
110+
In this case, you must manually wipe the disk.
111+
====
112+
100113
.Verification
101114

102115
Verify that the `LVMCluster` resource has created the `StorageClass`, `LVMVolumeGroup`, and `LVMVolumeGroupNodeStatus` CRs.

modules/lvms-reference-file.adoc

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -39,36 +39,38 @@ spec:
3939
optionalPaths:
4040
- /dev/disk/by-path/pci-0000:89:00.0-nvme-1
4141
- /dev/disk/by-path/pci-0000:90:00.0-nvme-1
42-
thinPoolConfig: <6>
43-
name: thin-pool-1 <7>
44-
sizePercent: 90 <8>
45-
overprovisionRatio: 10 <9>
42+
forceWipeDevicesAndDestroyAllData: true <6>
43+
thinPoolConfig: <7>
44+
name: thin-pool-1 <8>
45+
sizePercent: 90 <9>
46+
overprovisionRatio: 10 <10>
4647
status:
47-
deviceClassStatuses: <10>
48+
deviceClassStatuses: <11>
4849
- name: vg1
49-
nodeStatus: <11>
50-
- devices: <12>
50+
nodeStatus: <12>
51+
- devices: <13>
5152
- /dev/nvme0n1
5253
- /dev/nvme1n1
5354
- /dev/nvme2n1
54-
node: my-node.example.com <13>
55-
status: Ready <14>
56-
ready: true <15>
57-
state: Ready <16>
55+
node: my-node.example.com <14>
56+
status: Ready <15>
57+
ready: true <16>
58+
state: Ready <17>
5859
----
5960
<1> The LVM volume groups to be created on the cluster. Currently, only a single `deviceClass` is supported.
6061
<2> The name of the LVM volume group to be created on the nodes.
6162
<3> The nodes on which to create the LVM volume group. If the field is empty, all nodes are considered.
6263
<4> A list of node selector requirements.
6364
<5> A list of device paths which is used to create the LVM volume group. If this field is empty, all unused disks on the node will be used.
64-
<6> The LVM thin pool configuration.
65-
<7> The name of the thin pool to be created in the LVM volume group.
66-
<8> The percentage of remaining space in the LVM volume group that should be used for creating the thin pool.
67-
<9> The factor by which additional storage can be provisioned compared to the available storage in the thin pool.
68-
<10> The status of the `deviceClass`.
69-
<11> The status of the LVM volume group on each node.
70-
<12> The list of devices used to create the LVM volume group.
71-
<13> The node on which the `deviceClass` was created.
72-
<14> The status of the LVM volume group on the node.
73-
<15> This field is deprecated.
74-
<16> The status of the `LVMCluster`.
65+
<6> To force wipe the selected disks, set this parameter to `true`. This parameter is set to `false` by default.
66+
<7> The LVM thin pool configuration.
67+
<8> The name of the thin pool to be created in the LVM volume group.
68+
<9> The percentage of remaining space in the LVM volume group that should be used for creating the thin pool.
69+
<10> The factor by which additional storage can be provisioned compared to the available storage in the thin pool.
70+
<11> The status of the `deviceClass`.
71+
<12> The status of the LVM volume group on each node.
72+
<13> The list of devices used to create the LVM volume group.
73+
<14> The node on which the `deviceClass` was created.
74+
<15> The status of the LVM volume group on the node.
75+
<16> This field is deprecated.
76+
<17> The status of the `LVMCluster`.

0 commit comments

Comments
 (0)