|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * post-installation-configuration/ibmz-post-install.adoc |
| 4 | + |
| 5 | +:_content-type: PROCEDURE |
| 6 | +[id="configure-additional-devices-using-mco_{context}"] |
| 7 | += Configuring additional devices using the Machine Config Operator (MCO) |
| 8 | + |
| 9 | +Tasks in this section describe how to use features of the Machine Config Operator to configure additional devices in an {ibmzProductName} or LinuxONE environment. Configuring devices with the MCO is persistent but only allows specific configurations for compute nodes. MCO does not allow control plane nodes to have different configurations. |
| 10 | + |
| 11 | +.Prerequisites |
| 12 | + |
| 13 | +* You are logged in to the cluster as a user with administrative privileges. |
| 14 | +* The device must be available to the z/VM guest. |
| 15 | +* The device is already attached. |
| 16 | +* The device is not included in the `cio_ignore` list, which can be set in the kernel parameters. |
| 17 | +* You have created a `MachineConfig` object file with the following YAML: |
| 18 | ++ |
| 19 | +[source,yaml] |
| 20 | +---- |
| 21 | +apiVersion: machineconfiguration.openshift.io/v1 |
| 22 | +kind: MachineConfigPool |
| 23 | +metadata: |
| 24 | + name: worker0 |
| 25 | +spec: |
| 26 | + machineConfigSelector: |
| 27 | + matchExpressions: |
| 28 | + - {key: machineconfiguration.openshift.io/role, operator: In, values: [worker,worker0]} |
| 29 | + nodeSelector: |
| 30 | + matchLabels: |
| 31 | + node-role.kubernetes.io/worker0: "" |
| 32 | +---- |
| 33 | +
|
| 34 | +[id="configuring-fcp-host"] |
| 35 | +== Configuring a Fibre Channel Protocol (FCP) host |
| 36 | + |
| 37 | +The following is an example of how to configure an FCP host adapter with N_Port Identifier Virtualization (NPIV) by adding a udev rule. |
| 38 | + |
| 39 | +.Procedure |
| 40 | + |
| 41 | +. Take the following sample udev rule `441-zfcp-host-0.0.8000.rules`: |
| 42 | ++ |
| 43 | +[source,terminal] |
| 44 | +---- |
| 45 | +ACTION=="add", SUBSYSTEM=="ccw", KERNEL=="0.0.8000", DRIVER=="zfcp", GOTO="cfg_zfcp_host_0.0.8000" |
| 46 | +ACTION=="add", SUBSYSTEM=="drivers", KERNEL=="zfcp", TEST=="[ccw/0.0.8000]", GOTO="cfg_zfcp_host_0.0.8000" |
| 47 | +GOTO="end_zfcp_host_0.0.8000" |
| 48 | +
|
| 49 | +LABEL="cfg_zfcp_host_0.0.8000" |
| 50 | +ATTR{[ccw/0.0.8000]online}="1" |
| 51 | +
|
| 52 | +LABEL="end_zfcp_host_0.0.8000" |
| 53 | +---- |
| 54 | + |
| 55 | +. Convert the rule to Base64 encoded, by running the following command: |
| 56 | ++ |
| 57 | +[source,terminal] |
| 58 | +---- |
| 59 | +$ base64 /path/to/file/ |
| 60 | +---- |
| 61 | + |
| 62 | +. Copy the following MCO sample profile into a YAML file: |
| 63 | ++ |
| 64 | +[source,yaml] |
| 65 | +---- |
| 66 | +apiVersion: machineconfiguration.openshift.io/v1 |
| 67 | +kind: MachineConfig |
| 68 | +metadata: |
| 69 | + labels: |
| 70 | + machineconfiguration.openshift.io/role: worker0 <1> |
| 71 | + name: 99-worker0-devices |
| 72 | +spec: |
| 73 | + config: |
| 74 | + ignition: |
| 75 | + version: 3.2.0 |
| 76 | + storage: |
| 77 | + files: |
| 78 | + - contents: |
| 79 | + source: data:text/plain;base64,<encoded_base64_string> <2> |
| 80 | + filesystem: root |
| 81 | + mode: 420 |
| 82 | + path: /etc/udev/rules.d/41-zfcp-host-0.0.8000.rules <3> |
| 83 | +---- |
| 84 | +<1> The role you have defined in the machine config file. |
| 85 | +<2> The Base64 encoded string that you have generated in the previous step. |
| 86 | +<3> The path where the udev rule is located. |
| 87 | + |
| 88 | +[id="configuring-fcp-lun"] |
| 89 | +== Configuring an FCP LUN |
| 90 | +The following is an example of how to configure an FCP LUN by adding a udev rule. You can add new FCP LUNs or add additional paths to LUNs that are already configured with multipathing. |
| 91 | + |
| 92 | +.Procedure |
| 93 | + |
| 94 | +. Take the following sample udev rule `41-zfcp-lun-0.0.8000:0x500507680d760026:0x00bc000000000000.rules`: |
| 95 | ++ |
| 96 | +[source,terminal] |
| 97 | +---- |
| 98 | +ACTION=="add", SUBSYSTEMS=="ccw", KERNELS=="0.0.8000", GOTO="start_zfcp_lun_0.0.8207" |
| 99 | +GOTO="end_zfcp_lun_0.0.8000" |
| 100 | +
|
| 101 | +LABEL="start_zfcp_lun_0.0.8000" |
| 102 | +SUBSYSTEM=="fc_remote_ports", ATTR{port_name}=="0x500507680d760026", GOTO="cfg_fc_0.0.8000_0x500507680d760026" |
| 103 | +GOTO="end_zfcp_lun_0.0.8000" |
| 104 | +
|
| 105 | +LABEL="cfg_fc_0.0.8000_0x500507680d760026" |
| 106 | +ATTR{[ccw/0.0.8000]0x500507680d760026/unit_add}="0x00bc000000000000" |
| 107 | +GOTO="end_zfcp_lun_0.0.8000" |
| 108 | +
|
| 109 | +LABEL="end_zfcp_lun_0.0.8000" |
| 110 | +---- |
| 111 | + |
| 112 | +. Convert the rule to Base64 encoded, by running the following command: |
| 113 | ++ |
| 114 | +[source,terminal] |
| 115 | +---- |
| 116 | +$ base64 /path/to/file/ |
| 117 | +---- |
| 118 | + |
| 119 | +. Copy the following MCO sample profile into a YAML file: |
| 120 | ++ |
| 121 | +[source,yaml] |
| 122 | +---- |
| 123 | +apiVersion: machineconfiguration.openshift.io/v1 |
| 124 | +kind: MachineConfig |
| 125 | +metadata: |
| 126 | + labels: |
| 127 | + machineconfiguration.openshift.io/role: worker0 <1> |
| 128 | + name: 99-worker0-devices |
| 129 | +spec: |
| 130 | + config: |
| 131 | + ignition: |
| 132 | + version: 3.2.0 |
| 133 | + storage: |
| 134 | + files: |
| 135 | + - contents: |
| 136 | + source: data:text/plain;base64,<encoded_base64_string> <2> |
| 137 | + filesystem: root |
| 138 | + mode: 420 |
| 139 | + path: /etc/udev/rules.d/41-zfcp-lun-0.0.8000:0x500507680d760026:0x00bc000000000000.rules <3> |
| 140 | +---- |
| 141 | +<1> The role you have defined in the machine config file. |
| 142 | +<2> The Base64 encoded string that you have generated in the previous step. |
| 143 | +<3> The path where the udev rule is located. |
| 144 | + |
| 145 | +[id="configuring-dasd"] |
| 146 | +== Configuring DASD |
| 147 | + |
| 148 | +The following is an example of how to configure a DASD device by adding a udev rule. |
| 149 | + |
| 150 | +.Procedure |
| 151 | + |
| 152 | +. Take the following sample udev rule `41-dasd-eckd-0.0.4444.rules`: |
| 153 | ++ |
| 154 | +[source,terminal] |
| 155 | +---- |
| 156 | +ACTION=="add", SUBSYSTEM=="ccw", KERNEL=="0.0.4444", DRIVER=="dasd-eckd", GOTO="cfg_dasd_eckd_0.0.4444" |
| 157 | +ACTION=="add", SUBSYSTEM=="drivers", KERNEL=="dasd-eckd", TEST=="[ccw/0.0.4444]", GOTO="cfg_dasd_eckd_0.0.4444" |
| 158 | +GOTO="end_dasd_eckd_0.0.4444" |
| 159 | +
|
| 160 | +LABEL="cfg_dasd_eckd_0.0.4444" |
| 161 | +ATTR{[ccw/0.0.4444]online}="1" |
| 162 | +
|
| 163 | +LABEL="end_dasd_eckd_0.0.4444" |
| 164 | +---- |
| 165 | + |
| 166 | +. Convert the rule to Base64 encoded, by running the following command: |
| 167 | ++ |
| 168 | +[source,terminal] |
| 169 | +---- |
| 170 | +$ base64 /path/to/file/ |
| 171 | +---- |
| 172 | + |
| 173 | +. Copy the following MCO sample profile into a YAML file: |
| 174 | ++ |
| 175 | +[source,yaml] |
| 176 | +---- |
| 177 | +apiVersion: machineconfiguration.openshift.io/v1 |
| 178 | +kind: MachineConfig |
| 179 | +metadata: |
| 180 | + labels: |
| 181 | + machineconfiguration.openshift.io/role: worker0 <1> |
| 182 | + name: 99-worker0-devices |
| 183 | +spec: |
| 184 | + config: |
| 185 | + ignition: |
| 186 | + version: 3.2.0 |
| 187 | + storage: |
| 188 | + files: |
| 189 | + - contents: |
| 190 | + source: data:text/plain;base64,<encoded_base64_string> <2> |
| 191 | + filesystem: root |
| 192 | + mode: 420 |
| 193 | + path: /etc/udev/rules.d/41-dasd-eckd-0.0.4444.rules <3> |
| 194 | +---- |
| 195 | +<1> The role you have defined in the machine config file. |
| 196 | +<2> The Base64 encoded string that you have generated in the previous step. |
| 197 | +<3> The path where the udev rule is located. |
| 198 | + |
| 199 | +[id="configuring-qeth"] |
| 200 | +== Configuring qeth |
| 201 | + |
| 202 | +The following is an example of how to configure a qeth device by adding a udev rule. |
| 203 | + |
| 204 | +.Procedure |
| 205 | + |
| 206 | +. Take the following sample udev rule `41-qeth-0.0.1000.rules`: |
| 207 | ++ |
| 208 | +[source,terminal] |
| 209 | +---- |
| 210 | +ACTION=="add", SUBSYSTEM=="drivers", KERNEL=="qeth", GOTO="group_qeth_0.0.1000" |
| 211 | +ACTION=="add", SUBSYSTEM=="ccw", KERNEL=="0.0.1000", DRIVER=="qeth", GOTO="group_qeth_0.0.1000" |
| 212 | +ACTION=="add", SUBSYSTEM=="ccw", KERNEL=="0.0.1001", DRIVER=="qeth", GOTO="group_qeth_0.0.1000" |
| 213 | +ACTION=="add", SUBSYSTEM=="ccw", KERNEL=="0.0.1002", DRIVER=="qeth", GOTO="group_qeth_0.0.1000" |
| 214 | +ACTION=="add", SUBSYSTEM=="ccwgroup", KERNEL=="0.0.1000", DRIVER=="qeth", GOTO="cfg_qeth_0.0.1000" |
| 215 | +GOTO="end_qeth_0.0.1000" |
| 216 | +
|
| 217 | +LABEL="group_qeth_0.0.1000" |
| 218 | +TEST=="[ccwgroup/0.0.1000]", GOTO="end_qeth_0.0.1000" |
| 219 | +TEST!="[ccw/0.0.1000]", GOTO="end_qeth_0.0.1000" |
| 220 | +TEST!="[ccw/0.0.1001]", GOTO="end_qeth_0.0.1000" |
| 221 | +TEST!="[ccw/0.0.1002]", GOTO="end_qeth_0.0.1000" |
| 222 | +ATTR{[drivers/ccwgroup:qeth]group}="0.0.1000,0.0.1001,0.0.1002" |
| 223 | +GOTO="end_qeth_0.0.1000" |
| 224 | +
|
| 225 | +LABEL="cfg_qeth_0.0.1000" |
| 226 | +ATTR{[ccwgroup/0.0.1000]online}="1" |
| 227 | +
|
| 228 | +LABEL="end_qeth_0.0.1000" |
| 229 | +---- |
| 230 | + |
| 231 | +. Convert the rule to Base64 encoded, by running the following command: |
| 232 | ++ |
| 233 | +[source,terminal] |
| 234 | +---- |
| 235 | +$ base64 /path/to/file/ |
| 236 | +---- |
| 237 | + |
| 238 | +. Copy the following MCO sample profile into a YAML file: |
| 239 | ++ |
| 240 | +[source,yaml] |
| 241 | +---- |
| 242 | +apiVersion: machineconfiguration.openshift.io/v1 |
| 243 | +kind: MachineConfig |
| 244 | +metadata: |
| 245 | + labels: |
| 246 | + machineconfiguration.openshift.io/role: worker0 <1> |
| 247 | + name: 99-worker0-devices |
| 248 | +spec: |
| 249 | + config: |
| 250 | + ignition: |
| 251 | + version: 3.2.0 |
| 252 | + storage: |
| 253 | + files: |
| 254 | + - contents: |
| 255 | + source: data:text/plain;base64,<encoded_base64_string> <2> |
| 256 | + filesystem: root |
| 257 | + mode: 420 |
| 258 | + path: /etc/udev/rules.d/41-dasd-eckd-0.0.4444.rules <3> |
| 259 | +---- |
| 260 | +<1> The role you have defined in the machine config file. |
| 261 | +<2> The Base64 encoded string that you have generated in the previous step. |
| 262 | +<3> The path where the udev rule is located. |
| 263 | + |
0 commit comments