Skip to content

Commit 4ff89dd

Browse files
committed
Added optionalPaths to deviceSelector.
Signed-off-by: John Wilkins <[email protected]>
1 parent 8578958 commit 4ff89dd

6 files changed

+31
-16
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,18 @@ spec:
5050
- name: vg1
5151
fstype: ext4 <2>
5252
default: true <3>
53-
deviceSelector:
53+
deviceSelector: <4>
5454
paths:
5555
- /dev/disk/by-path/pci-0000:87:00.0-nvme-1
5656
- /dev/disk/by-path/pci-0000:88:00.0-nvme-1
57+
optionalPaths:
58+
- /dev/disk/by-path/pci-0000:89:00.0-nvme-1
59+
- /dev/disk/by-path/pci-0000:90:00.0-nvme-1
5760
thinPoolConfig:
5861
name: thin-pool-1
5962
sizePercent: 90
6063
overprovisionRatio: 10
61-
nodeSelector: <4>
64+
nodeSelector: <5>
6265
nodeSelectorTerms:
6366
- matchExpressions:
6467
- key: app
@@ -72,7 +75,8 @@ When configuring multiple device classes, you must specify the device path for e
7275
<2> Set `fstype` to `ext4` or `xfs`. By default, it is set to `xfs` if the setting is not specified.
7376
<3> Mandatory: The `LVMCluster` resource must contain a single default storage class. Set `default: false` for secondary device storage classes.
7477
If you are upgrading the `LVMCluster` resource from a previous version, you must specify a single default device class.
75-
<4> Optional: To control what worker nodes the `LVMCluster` CR is applied to, specify a set of node selector labels.
78+
<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`, you do not have to specify `optionalPaths`. If you specify `optionalPaths`, you do not have to specify `paths` but at least one optional path must be present on the node. If you do not specify any paths, it will add all 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.
7680
The specified labels must be present on the node in order for the `LVMCluster` to be scheduled on that node.
7781

7882
.. Create the `LVMCluster` CR:

modules/lvms-installing-logical-volume-manager-operator-using-cli.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ spec:
107107
paths:
108108
- /dev/disk/by-path/pci-0000:87:00.0-nvme-1
109109
- /dev/disk/by-path/pci-0000:88:00.0-nvme-1
110+
optionalPaths:
111+
- /dev/disk/by-path/pci-0000:89:00.0-nvme-1
112+
- /dev/disk/by-path/pci-0000:90:00.0-nvme-1
110113
thinPoolConfig:
111114
name: thin-pool-1
112115
sizePercent: 90

modules/lvms-installing-logical-volume-manager-operator-using-rhacm.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ spec:
135135
paths:
136136
- /dev/disk/by-path/pci-0000:87:00.0-nvme-1
137137
- /dev/disk/by-path/pci-0000:88:00.0-nvme-1
138+
optionalPaths:
139+
- /dev/disk/by-path/pci-0000:89:00.0-nvme-1
140+
- /dev/disk/by-path/pci-0000:90:00.0-nvme-1
138141
thinPoolConfig:
139142
name: thin-pool-1
140143
sizePercent: 90
@@ -150,7 +153,7 @@ spec:
150153
severity: low
151154
----
152155
<1> Replace the key and value in `PlacementRule.spec.clusterSelector` to match the labels set on the {sno} clusters on which you want to install {lvms}.
153-
<2> To control or restrict the volume group to your preferred disks, you can manually specify the local paths of the disks in the `deviceSelector` section of the `LVMCluster` YAML.
156+
<2> 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`, you do not have to specify `optionalPaths`. If you specify `optionalPaths`, you do not have to specify `paths` but at least one optional path must be present on the node. If you do not specify any paths, it will add all unused devices on the node.
154157
<3> To add a node filter, which is a subset of the additional worker nodes, specify the required filter in the `nodeSelector` section. {lvms} detects and uses the additional worker nodes when the new nodes show up.
155158
+
156159
--

modules/lvms-reference-file.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ spec:
3636
paths:
3737
- /dev/disk/by-path/pci-0000:87:00.0-nvme-1
3838
- /dev/disk/by-path/pci-0000:88:00.0-nvme-1
39+
optionalPaths:
3940
- /dev/disk/by-path/pci-0000:89:00.0-nvme-1
41+
- /dev/disk/by-path/pci-0000:90:00.0-nvme-1
4042
thinPoolConfig: <6>
4143
name: thin-pool-1 <7>
4244
sizePercent: 90 <8>

modules/lvms-scaling-storage-of-single-node-openshift-cluster-using-rhacm.adoc

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,19 @@ You can scale the storage capacity of your configured worker nodes on a {sno} cl
1010

1111
.Prerequisites
1212

13-
* You have access to the {rh-rhacm} cluster using an account with `cluster-admin` privilages.
14-
* You have additional unused disks on each {sno} cluster to be used by {lvms}.
13+
* You have access to the {rh-rhacm} cluster using an account with `cluster-admin` privileges.
14+
* You have additional unused devices on each {sno} cluster that {lvms} can use.
1515
1616
.Procedure
1717

1818
. Log in to the {rh-rhacm} CLI using your {product-title} credentials.
19-
. Find the disk that you want to add. The disk to be added needs to match with the device name and path of the existing disks.
19+
. Find the device that you want to add. The device to be added needs to match with the device name and path of the existing devices.
2020
. To add capacity to the {sno} cluster, edit the `deviceSelector` section of the existing policy YAML, for example, `policy-lvms-operator.yaml`.
2121

2222
+
2323
[NOTE]
2424
====
25-
In case the `deviceSelector` field is not included during the `LVMCluster` creation, it is not possible to add the `deviceSelector` section to the CR.
26-
You need to remove the `LVMCluster` and then recreate from the new CR.
25+
In case the `deviceSelector` field is not included during the `LVMCluster` creation, it is not possible to add the `deviceSelector` section to the CR. You need to remove the `LVMCluster` and then recreate it from the new CR.
2726
====
2827

2928
+
@@ -130,11 +129,13 @@ spec:
130129
deviceClasses:
131130
- name: vg1
132131
default: true
133-
deviceSelector:
132+
deviceSelector: <1>
134133
paths:
135134
- /dev/disk/by-path/pci-0000:87:00.0-nvme-1
136135
- /dev/disk/by-path/pci-0000:88:00.0-nvme-1
137-
- /dev/disk/by-path/pci-0000:89:00.0-nvme-1 # new disk is added
136+
optionalPaths:
137+
- /dev/disk/by-path/pci-0000:89:00.0-nvme-1
138+
- /dev/disk/by-path/pci-0000:90:00.0-nvme-1
138139
thinPoolConfig:
139140
name: thin-pool-1
140141
sizePercent: 90
@@ -149,6 +150,7 @@ spec:
149150
remediationAction: enforce
150151
severity: low
151152
----
153+
<1> 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`, you do not have to specify `optionalPaths`. If you specify `optionalPaths`, you do not have to specify `paths` but at least one optional path must be present on the node. If you do not specify any paths, it will add all unused devices on the node.
152154

153155
. Edit the policy by running the following command:
154156
+

modules/lvms-scaling-storage-of-single-node-openshift-cluster.adoc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,16 @@ spec:
4040
deviceClasses:
4141
- name: vg1
4242
default: true
43-
deviceSelector:
43+
deviceSelector: <1>
4444
paths:
45-
- /dev/disk/by-path/pci-0000:87:00.0-nvme-1 <1>
45+
- /dev/disk/by-path/pci-0000:87:00.0-nvme-1
4646
- /dev/disk/by-path/pci-0000:88:00.0-nvme-1
47-
- /dev/disk/by-path/pci-0000:89:00.0-nvme-1 <2>
47+
optionalPaths:
48+
- /dev/disk/by-path/pci-0000:89:00.0-nvme-1
49+
- /dev/disk/by-path/pci-0000:90:00.0-nvme-1
4850
thinPoolConfig:
4951
name: thin-pool-1
5052
sizePercent: 90
5153
overprovisionRatio: 10
5254
----
53-
<1> The path can be added by name (`/dev/sdb`) or by path.
54-
<2> A new disk is added.
55+
<1> 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`, you do not have to specify `optionalPaths`. If you specify `optionalPaths`, you do not have to specify `paths` but at least one optional path must be present on the node. If you do not specify any paths, it will add all unused devices on the node.

0 commit comments

Comments
 (0)