|
| 1 | +--- |
| 2 | +title: IBM Fusion Access SAN |
| 3 | +linktitle: IBM Fusion Access SAN |
| 4 | +description: IBM Fusion Access SAN |
| 5 | +tags: ['storage','v4.20'] |
| 6 | +icon: ibm/logo |
| 7 | +--- |
| 8 | +# IBM Fusion Access SAN |
| 9 | + |
| 10 | +Official documentation: [Deploying IBM Fusion Access for SAN](https://www.ibm.com/docs/en/fusion-software/2.12.0?topic=san-deploying-fusion-access) |
| 11 | + |
| 12 | +Tested with: |
| 13 | + |
| 14 | +|Component|Version| |
| 15 | +|---|---| |
| 16 | +|OpenShift|v4.20.4| |
| 17 | +|OpenShift Virt|v4.20.x| |
| 18 | +|IBM Fusion Access for SAN|2.12.0| |
| 19 | + |
| 20 | +## Prerequisites |
| 21 | + |
| 22 | +* IBM account (IBMid). Create an account via <https://www.ibm.com/account/reg/us-en/signup?formid=urx-19776> |
| 23 | +* Access to IBM Storage Fusion, for example via the [60-day trial](https://www.ibm.com/docs/en/storage-fusion/storage/2.6.0?topic=overview-storage-fusion-trial-version) |
| 24 | +* IBM Entitlement key to allow your OpenShift cluster to pull images from IBM Registry: <https://myibm.ibm.com/products-services/containerlibrary> |
| 25 | +* OpenShift cluster with at least three worker nodes, each with ~32 GB memory |
| 26 | + * All nodes (at least 3) need a shared disk (via iSCSI, FC, or shared disks in a KVM lab). |
| 27 | +* Access to a container registry for the GPFS kernel modules |
| 28 | + * Internal registry (requires registry storage) |
| 29 | + * External registry, for example quay.io with a private repository |
| 30 | +* If Secure Boot is enabled: Create and roll out your signing key. (IBM Fusion Access for SAN builds and loads its own kernel module via [KMM](https://docs.redhat.com/en/documentation/openshift_container_platform/4.20/html/specialized_hardware_and_driver_enablement/kernel-module-management-operator)) |
| 31 | + |
| 32 | +## Let's start the installation |
| 33 | + |
| 34 | +### If Secure Boot is enabled: Create and roll out your signing key |
| 35 | + |
| 36 | +Documentation: |
| 37 | + |
| 38 | +* [4.11. Adding the keys for secureboot](https://docs.redhat.com/en/documentation/openshift_container_platform/4.18/html/specialized_hardware_and_driver_enablement/kernel-module-management-operator#kmm-adding-the-keys-for-secureboot_kernel-module-management-operator) |
| 39 | +* [21.6. Generating a public and private key pair](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/managing_monitoring_and_updating_the_kernel/signing-a-kernel-and-modules-for-secure-boot_managing-monitoring-and-updating-the-kernel?extIdCarryOver=true&sc_cid=7013a000002w14NAAQ#generating-a-public-and-private-key-pair_signing-a-kernel-and-modules-for-secure-boot) |
| 40 | + |
| 41 | +#### Create an key pair |
| 42 | + |
| 43 | +Here are the commands executed on RHEL 10. |
| 44 | + |
| 45 | +* Create public and private key |
| 46 | + |
| 47 | + ```shell |
| 48 | + efikeygen --dbdir /etc/pki/pesign \ |
| 49 | + --self-sign \ |
| 50 | + --module \ |
| 51 | + --common-name 'CN=Organization signing key' \ |
| 52 | + --nickname 'Custom Secure Boot key' |
| 53 | + ``` |
| 54 | + |
| 55 | +* Export public key to `sb_cert.cer` |
| 56 | + |
| 57 | + ```shell |
| 58 | + certutil -d /etc/pki/pesign \ |
| 59 | + -n 'Custom Secure Boot key' \ |
| 60 | + -Lr \ |
| 61 | + > sb_cert.cer |
| 62 | + ``` |
| 63 | + |
| 64 | +* Export private key to `sb_cert.p12` |
| 65 | + |
| 66 | + ```shell |
| 67 | + pk12util -o sb_cert.p12 \ |
| 68 | + -n 'Custom Secure Boot key' \ |
| 69 | + -d /etc/pki/pesign |
| 70 | + ``` |
| 71 | + |
| 72 | +* Export the unencrypted private key: |
| 73 | + |
| 74 | + ```shell |
| 75 | + openssl pkcs12 \ |
| 76 | + -in sb_cert.p12 \ |
| 77 | + -out sb_cert.priv \ |
| 78 | + -nocerts \ |
| 79 | + -noenc |
| 80 | + ``` |
| 81 | + |
| 82 | +#### Roll out the public key |
| 83 | + |
| 84 | +This may differ in your environment. |
| 85 | + |
| 86 | +In my virtual lab environment running on KVM/libvirt with [hetzner-ocp4](https://github.com/RedHat-EMEA-SSA-Team/hetzner-ocp4/): |
| 87 | + |
| 88 | +* Copy the public key to the VM via SSH |
| 89 | + |
| 90 | + ```shell |
| 91 | + scp sb_cert.cer core@compute-X:~/ |
| 92 | + ``` |
| 93 | + |
| 94 | +* Check & import the key via `mokutil` on the node: |
| 95 | + |
| 96 | + ```shell |
| 97 | + % sudo mokutil --list-enrolled | grep 'Subject:' |
| 98 | + Subject: O=Red Hat, Inc., CN=Red Hat Secure Boot CA 5/[email protected] |
| 99 | + Subject: CN=Red Hat Secure Boot CA 8/[email protected] |
| 100 | +
|
| 101 | + # Set a simple password; it will be needed later in the UEFI shell. |
| 102 | + % sudo mokutil --import sb_cert.cer |
| 103 | + input password: |
| 104 | + input password again: |
| 105 | + ``` |
| 106 | + |
| 107 | +* Reboot the node, enter the MOK manager, and enroll the key |
| 108 | + |
| 109 | + [](https://www.youtube.com/watch?v=fgtSxcTE7_o) |
| 110 | + |
| 111 | +* Check the key via `mokutil` at the Node: |
| 112 | + |
| 113 | + ```shell |
| 114 | + % mokutil --list-enrolled | grep 'Subject:' |
| 115 | + Subject: O=Red Hat, Inc., CN=Red Hat Secure Boot CA 5/[email protected] |
| 116 | + Subject: CN=Red Hat Secure Boot CA 8/[email protected] |
| 117 | + Subject: CN=Organization signing key |
| 118 | + ``` |
| 119 | + |
| 120 | +### Install IBM Fusion Access for SAN operator |
| 121 | + |
| 122 | +<https://www.ibm.com/docs/en/fusion-software/2.12.0?topic=san-installing-fusion-access-operator> |
| 123 | + |
| 124 | +Do **NOT** create the `FusionAccess` custom resource yet! |
| 125 | + |
| 126 | +At this point there is a [YouTube video](https://www.youtube.com/watch?v=ayXgD4e61K4) available that does not cover Secure Boot or an external registry. |
| 127 | + |
| 128 | + |
| 129 | + |
| 130 | +### Create a pull secret with IBM Entitlement Key |
| 131 | + |
| 132 | +You can get/review the entitlement keys at the [IBM Container library](https://myibm.ibm.com/products-services/containerlibrary) |
| 133 | + |
| 134 | +```shell |
| 135 | +oc create secret -n ibm-fusion-access generic fusion-pullsecret \ |
| 136 | +--from-literal=ibm-entitlement-key=<ibm-entitlement-key> |
| 137 | +``` |
| 138 | + |
| 139 | +### If Secure Boot is enabled: provide signing key |
| 140 | + |
| 141 | +* Private key |
| 142 | + |
| 143 | + ```shell |
| 144 | + oc create secret generic secureboot-signing-key \ |
| 145 | + -n ibm-fusion-access \ |
| 146 | + --from-file=key=sb_cert.priv |
| 147 | + ``` |
| 148 | + |
| 149 | +* Public key |
| 150 | + |
| 151 | + ```shell |
| 152 | + oc create secret generic secureboot-signing-key-pub \ |
| 153 | + -n ibm-fusion-access \ |
| 154 | + --from-file=cert=sb_cert.cer |
| 155 | + ``` |
| 156 | + |
| 157 | +### Optional: Configure external registry for kernel module container image |
| 158 | + |
| 159 | +* Create ConfigMap with external registry information: |
| 160 | + |
| 161 | + ```yaml |
| 162 | + apiVersion: v1 |
| 163 | + kind: ConfigMap |
| 164 | + metadata: |
| 165 | + name: kmm-image-config |
| 166 | + namespace: ibm-fusion-access |
| 167 | + data: |
| 168 | + kmm_image_registry_url: quay.io |
| 169 | + kmm_image_repo: rbohne/kernel-ibm-fusion-access |
| 170 | + # kmm_tls_insecure: "false" |
| 171 | + # kmm_tls_skip_verify: "false" |
| 172 | +
|
| 173 | + # Contains the Red Hat pull secret and the secret used to push |
| 174 | + kmm_image_registry_secret_name: rbohne-robot-kernel-ibm-fusion-access-pull-secret |
| 175 | + ``` |
| 176 | + |
| 177 | +* Provide push secret to quay.io |
| 178 | + |
| 179 | + ```yaml hl_lines="10" |
| 180 | + apiVersion: v1 |
| 181 | + kind: Secret |
| 182 | + metadata: |
| 183 | + name: rbohne-robot-kernel-ibm-fusion-access-pull-secret |
| 184 | + namespace: ibm-fusion-access |
| 185 | + stringData: |
| 186 | + .dockerconfigjson: | |
| 187 | + { |
| 188 | + "auths": { |
| 189 | + "quay.io/rbohne/kernel-ibm-fusion-access": { |
| 190 | + "auth": "...", |
| 191 | + "email": "..." |
| 192 | + } |
| 193 | + } |
| 194 | + } |
| 195 | + type: kubernetes.io/dockerconfigjson |
| 196 | + ``` |
| 197 | + |
| 198 | + !!! note |
| 199 | + |
| 200 | + It's important to be as specific as possible here. If I only specify quay.io, the pull secret will also be used for pulling OpenShift images, which will then cause the build to fail. |
| 201 | +
|
| 202 | +### Creating the `FusionAccess` custom resource |
| 203 | +
|
| 204 | +<https://www.ibm.com/docs/en/fusion-software/2.12.0?topic=san-creating-fusionaccess-cr> |
| 205 | +
|
| 206 | +Wait until the Web Console plugin is available to create the storage cluster. |
| 207 | +
|
| 208 | + |
| 209 | +
|
| 210 | +### Creating a storage cluster |
| 211 | +
|
| 212 | +<https://www.ibm.com/docs/en/fusion-software/2.12.0?topic=san-creating-storage-cluster> |
| 213 | +
|
| 214 | +After creating the storage cluster, it's building the kernel module container image. Check builds in ibm-fusion-access project. |
| 215 | + |
| 216 | +Check the pods in the following projects: |
| 217 | + |
| 218 | +* `ibm-fusion-access` |
| 219 | +* `ibm-spectrum-scale` |
| 220 | + |
| 221 | +To check which devices are found, you can run: |
| 222 | + |
| 223 | +```shell |
| 224 | +oc describe LocalVolumeDiscoveryResult -n ibm-fusion-access |
| 225 | +``` |
| 226 | + |
| 227 | +Or check the pod logs of the following pods: |
| 228 | + |
| 229 | +```shell |
| 230 | +oc get pods -l app=devicefinder-discovery -o wide -n ibm-fusion-access |
| 231 | +``` |
| 232 | + |
| 233 | +To check the kernel module build settings, look at: |
| 234 | + |
| 235 | +```shell |
| 236 | +oc get module -n ibm-fusion-access gpfs-module -o yaml |
| 237 | +``` |
| 238 | + |
| 239 | +Here's an example: |
| 240 | +
|
| 241 | +```yaml hl_lines="23 27-36" |
| 242 | +apiVersion: kmm.sigs.x-k8s.io/v1beta1 |
| 243 | +kind: Module |
| 244 | +metadata: |
| 245 | + finalizers: |
| 246 | + - kmm.node.kubernetes.io/module-finalizer |
| 247 | + name: gpfs-module |
| 248 | + namespace: ibm-fusion-access |
| 249 | +spec: |
| 250 | + imageRepoSecret: |
| 251 | + name: kmm-registry-push-pull-secret |
| 252 | + moduleLoader: |
| 253 | + container: |
| 254 | + imagePullPolicy: Always |
| 255 | + inTreeModuleToRemove: '' |
| 256 | + kernelMappings: |
| 257 | + - build: |
| 258 | + baseImageRegistryTLS: {} |
| 259 | + buildArgs: |
| 260 | + - name: IBM_SCALE |
| 261 | + value: 'cp.icr.io/cp/gpfs/ibm-spectrum-scale-core-init@sha256:51dc287dd9ae2f8dcb60c1678fe8b535bb72e29faad24108d55b7cfe62362777' |
| 262 | + dockerfileConfigMap: |
| 263 | + name: kmm-dockerfile |
| 264 | + containerImage: 'quay.io/rbohne/kernel-ibm-fusion-access:${KERNEL_FULL_VERSION}-51dc287dd9ae2f8dcb60c1678fe8b535' |
| 265 | + inTreeModuleToRemove: '' |
| 266 | + literal: '' |
| 267 | + regexp: ^.*\.x86_64$ |
| 268 | + sign: |
| 269 | + certSecret: |
| 270 | + name: secureboot-signing-key-pub |
| 271 | + filesToSign: |
| 272 | + - '/opt/lib/modules/${KERNEL_FULL_VERSION}/mmfslinux.ko' |
| 273 | + - '/opt/lib/modules/${KERNEL_FULL_VERSION}/mmfs26.ko' |
| 274 | + - '/opt/lib/modules/${KERNEL_FULL_VERSION}/tracedev.ko' |
| 275 | + keySecret: |
| 276 | + name: secureboot-signing-key |
| 277 | + unsignedImageRegistryTLS: {} |
| 278 | + modprobe: |
| 279 | + dirName: /opt |
| 280 | + firmwarePath: /opt/lxtrace/ |
| 281 | + moduleName: mmfs26 |
| 282 | + modulesLoadingOrder: |
| 283 | + - mmfs26 |
| 284 | + - mmfslinux |
| 285 | + - tracedev |
| 286 | + registryTLS: {} |
| 287 | + serviceAccountName: fusion-access-operator-controller-manager |
| 288 | + selector: |
| 289 | + kubernetes.io/arch: amd64 |
| 290 | + scale.spectrum.ibm.com/role: storage |
| 291 | +status: |
| 292 | + devicePlugin: {} |
| 293 | + moduleLoader: |
| 294 | + nodesMatchingSelectorNumber: 3 |
| 295 | +``` |
| 296 | +
|
| 297 | +To watch the build logs: |
| 298 | +
|
| 299 | +```shell |
| 300 | +oc get builds -n ibm-fusion-access -l node.kubernetes.io/module.name=gpfs-module -l app.kubernetes.io/name=kmm |
| 301 | +``` |
| 302 | +
|
| 303 | +After a successful build, the build objects disappear. |
| 304 | +
|
| 305 | +### Creating a filesystem |
| 306 | +
|
| 307 | +<https://www.ibm.com/docs/en/fusion-software/2.12.0?topic=san-creating-filesystem> |
| 308 | +
|
| 309 | + |
| 310 | +
|
| 311 | +Check the details of the FileSystem if it takes too long. |
| 312 | +
|
| 313 | +In case you recognize the following message: |
| 314 | +
|
| 315 | +> Disk has Spectrum Scale filesystem data structures on it. Set the 'existingDataSkipVerify' spec-parameter of the LocalDisk 0x5000c500155a3456 to true if the disk should be formatted and re-used nevertheless. |
| 316 | +
|
| 317 | +Check the LocalDisk: |
| 318 | +
|
| 319 | +```shell |
| 320 | +% oc get LocalDisk -n ibm-spectrum-scale |
| 321 | +NAME TYPE READY USED AVAILABLE FILESYSTEM SIZE AGE |
| 322 | +0x5000c500155a3456 False False Unknown 26m |
| 323 | +``` |
| 324 | +
|
| 325 | +If you are sure the shared disk can be wiped, set `existingDataSkipVerify` to `true`: |
| 326 | +
|
| 327 | +```shell |
| 328 | +oc patch LocalDisk -n ibm-spectrum-scale 0x5000c500155a3456 --type merge -p '{"spec":{"existingDataSkipVerify":true}}' |
| 329 | +``` |
| 330 | +
|
| 331 | +### Don't forget to review the IBM Fusion dashboard |
| 332 | + |
| 333 | + |
| 334 | + |
| 335 | + |
| 336 | + |
| 337 | +## Notes for various lab environments |
| 338 | + |
| 339 | +Add a shared disk to all worker nodes. |
| 340 | + |
| 341 | +### Plain KVM environment |
| 342 | + |
| 343 | +I deployed via [hetzner-ocp4](https://github.com/RedHat-EMEA-SSA-Team/hetzner-ocp4). |
| 344 | +Now let's add a shared LVM disk because everything is running on one node. |
| 345 | +
|
| 346 | +!!! info |
| 347 | +
|
| 348 | + The following issue is related to Secure Boot: |
| 349 | +
|
| 350 | + ```log |
| 351 | + I0105 18:25:24.083670 1 funcs_kmod.go:12] "Starting worker" logger="kmm-worker" version="" git commit="" |
| 352 | + I0105 18:25:24.083696 1 funcs_kmod.go:24] "Reading config" logger="kmm-worker" path="/etc/kmm-worker/config.yaml" |
| 353 | + I0105 18:25:24.083968 1 worker.go:77] "preparing firmware for loading" logger="kmm-worker" image directory="/tmp/opt/lxtrace" host mount directory="/var/lib/firmware" |
| 354 | + I0105 18:25:24.084219 1 modprobe.go:33] "Running modprobe" logger="kmm-worker" command="/usr/sbin/modprobe -vd /tmp/opt mmfs26" |
| 355 | + I0105 18:25:24.086346 1 cmdlog.go:70] "modprobe: ERROR: could not insert 'mmfs26': Key was rejected by service" logger="kmm-worker.modprobe.stderr" |
| 356 | + I0105 18:25:24.086394 1 cmdlog.go:70] "insmod /tmp/opt/lib/modules/5.14.0-570.72.1.el9_6.x86_64/tracedev.ko " logger="kmm-worker.modprobe.stdout" |
| 357 | + E0105 18:25:24.086679 1 cmdutils.go:11] "Fatal error" err="error while waiting on the command: exit status 1" logger="kmm-worker" |
| 358 | + ``` |
| 359 | +
|
| 360 | + Two options to solve: |
| 361 | +
|
| 362 | + * Disable Secure Boot |
| 363 | + * Work with a KMM signing key / Machine Owner Key (MOK), documented above. |
| 364 | +
|
| 365 | +```shell |
| 366 | +lvcreate -L1T -n fusion vg0 |
| 367 | +``` |
| 368 | +
|
| 369 | +```shell |
| 370 | +export CLUSTER_NAME=pluto |
| 371 | +for node in ${CLUSTER_NAME}-compute-0 ${CLUSTER_NAME}-compute-1 ${CLUSTER_NAME}-compute-2 ; do |
| 372 | + virsh attach-disk $node /dev/mapper/vg0-fusion sdb --targetbus scsi --cache none --persistent --live --wwn 5000c500155a3456 |
| 373 | +done |
| 374 | +``` |
| 375 | +
|
| 376 | +### iSCSI & RHCOS |
| 377 | +
|
| 378 | +This is ugly as hell, but works for quick testing. |
| 379 | +
|
| 380 | +=== "Apply iSCSI helper" |
| 381 | +
|
| 382 | + ``` |
| 383 | + oc apply -f {{ page.canonical_url }}iscsi-helper.yaml |
| 384 | + ``` |
| 385 | +
|
| 386 | +=== "iscsi-helper.yaml" |
| 387 | +
|
| 388 | + ```yaml |
| 389 | + --8<-- "content/storage/ibm-fusion-access-san/iscsi-helper.yaml" |
| 390 | + ``` |
0 commit comments