Skip to content

Commit 2448ce4

Browse files
committed
Add storage/ibm-fusion-access-san
1 parent df0f4d5 commit 2448ce4

File tree

11 files changed

+508
-0
lines changed

11 files changed

+508
-0
lines changed
145 KB
Loading
874 KB
Loading
418 KB
Loading
1.35 MB
Loading
Lines changed: 386 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,386 @@
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+
[![](mok.png)](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+
![](operatorhub.png)
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": { (1)!
190+
"auth": "...",
191+
"email": "..."
192+
}
193+
}
194+
}
195+
type: kubernetes.io/dockerconfigjson
196+
```
197+
198+
1. 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.
199+
200+
## Creating the `FusionAccess` custom resource
201+
202+
<https://www.ibm.com/docs/en/fusion-software/2.12.0?topic=san-creating-fusionaccess-cr>
203+
204+
Wait until the Web Console plugin is available to create the storage cluster.
205+
206+
![](create-storage-cluster.png)
207+
208+
## Creating a storage cluster
209+
210+
<https://www.ibm.com/docs/en/fusion-software/2.12.0?topic=san-creating-storage-cluster>
211+
212+
After creating the storage cluster, it's building the kernel module container image. Check builds in ibm-fusion-access project.
213+
214+
Check the pods in the following projects:
215+
216+
* `ibm-fusion-access`
217+
* `ibm-spectrum-scale`
218+
219+
To check which devices are found, you can run:
220+
221+
```shell
222+
oc describe LocalVolumeDiscoveryResult -n ibm-fusion-access
223+
```
224+
225+
Or check the pod logs of the following pods:
226+
227+
```shell
228+
oc get pods -l app=devicefinder-discovery -o wide -n ibm-fusion-access
229+
```
230+
231+
To check the kernel module build settings, look at:
232+
233+
```shell
234+
oc get module -n ibm-fusion-access gpfs-module -o yaml
235+
```
236+
237+
Here's an example:
238+
239+
```yaml hl_lines="30 34-46"
240+
apiVersion: kmm.sigs.x-k8s.io/v1beta1
241+
kind: Module
242+
metadata:
243+
finalizers:
244+
- kmm.node.kubernetes.io/module-finalizer
245+
name: gpfs-module
246+
namespace: ibm-fusion-access
247+
spec:
248+
imageRepoSecret:
249+
name: kmm-registry-push-pull-secret
250+
moduleLoader:
251+
container:
252+
imagePullPolicy: Always
253+
inTreeModuleToRemove: ''
254+
kernelMappings:
255+
- build:
256+
baseImageRegistryTLS: {}
257+
buildArgs:
258+
- name: IBM_SCALE
259+
value: 'cp.icr.io/cp/gpfs/ibm-spectrum-scale-core-init@sha256:51dc287dd9ae2f8dcb60c1678fe8b535bb72e29faad24108d55b7cfe62362777'
260+
dockerfileConfigMap:
261+
name: kmm-dockerfile
262+
containerImage: 'quay.io/rbohne/kernel-ibm-fusion-access:${KERNEL_FULL_VERSION}-51dc287dd9ae2f8dcb60c1678fe8b535'
263+
inTreeModuleToRemove: ''
264+
literal: ''
265+
regexp: ^.*\.x86_64$
266+
sign:
267+
certSecret:
268+
name: secureboot-signing-key-pub
269+
filesToSign:
270+
- '/opt/lib/modules/${KERNEL_FULL_VERSION}/mmfslinux.ko'
271+
- '/opt/lib/modules/${KERNEL_FULL_VERSION}/mmfs26.ko'
272+
- '/opt/lib/modules/${KERNEL_FULL_VERSION}/tracedev.ko'
273+
keySecret:
274+
name: secureboot-signing-key
275+
unsignedImageRegistryTLS: {}
276+
modprobe:
277+
dirName: /opt
278+
firmwarePath: /opt/lxtrace/
279+
moduleName: mmfs26
280+
modulesLoadingOrder:
281+
- mmfs26
282+
- mmfslinux
283+
- tracedev
284+
registryTLS: {}
285+
serviceAccountName: fusion-access-operator-controller-manager
286+
selector:
287+
kubernetes.io/arch: amd64
288+
scale.spectrum.ibm.com/role: storage
289+
status:
290+
devicePlugin: {}
291+
moduleLoader:
292+
nodesMatchingSelectorNumber: 3
293+
```
294+
295+
To watch the build logs:
296+
297+
```shell
298+
oc get builds -n ibm-fusion-access -l node.kubernetes.io/module.name=gpfs-module -l app.kubernetes.io/name=kmm
299+
```
300+
301+
After a successful build, the build objects disappear.
302+
303+
## Creating a filesystem
304+
305+
<https://www.ibm.com/docs/en/fusion-software/2.12.0?topic=san-creating-filesystem>
306+
307+
![](create-fs.png)
308+
309+
Check the details of the FileSystem if it takes too long.
310+
311+
In case you recognize the following message:
312+
313+
> 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.
314+
315+
Check the LocalDisk:
316+
317+
```shell
318+
% oc get LocalDisk -n ibm-spectrum-scale
319+
NAME TYPE READY USED AVAILABLE FILESYSTEM SIZE AGE
320+
0x5000c500155a3456 False False Unknown 26m
321+
```
322+
323+
If you are sure the shared disk can be wiped, set `existingDataSkipVerify` to `true`:
324+
325+
```shell
326+
oc patch LocalDisk -n ibm-spectrum-scale 0x5000c500155a3456 --type merge -p '{"spec":{"existingDataSkipVerify":true}}'
327+
```
328+
329+
## Don't forget to review the IBM Fusion dashboard
330+
331+
![](dashboard-link.png)
332+
333+
![](dashboard.png)
334+
335+
## Notes for various lab environments
336+
337+
Add a shared disk to all worker nodes.
338+
339+
### Plain KVM environment
340+
341+
I deployed via <https://github.com/RedHat-EMEA-SSA-Team/hetzner-ocp4>. Now let's add a shared LVM disk because everything is running on one node.
342+
343+
!!! info
344+
345+
The following issue is related to Secure Boot:
346+
347+
```log
348+
I0105 18:25:24.083670 1 funcs_kmod.go:12] "Starting worker" logger="kmm-worker" version="" git commit=""
349+
I0105 18:25:24.083696 1 funcs_kmod.go:24] "Reading config" logger="kmm-worker" path="/etc/kmm-worker/config.yaml"
350+
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"
351+
I0105 18:25:24.084219 1 modprobe.go:33] "Running modprobe" logger="kmm-worker" command="/usr/sbin/modprobe -vd /tmp/opt mmfs26"
352+
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"
353+
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"
354+
E0105 18:25:24.086679 1 cmdutils.go:11] "Fatal error" err="error while waiting on the command: exit status 1" logger="kmm-worker"
355+
```
356+
357+
Two options to solve:
358+
1) Disable Secure Boot
359+
2) Work with a KMM signing key / Machine Owner Key (MOK): <https://docs.redhat.com/en/documentation/openshift_container_platform/4.20/html/specialized_hardware_and_driver_enablement/kernel-module-management-operator#kmm-using-signing-with-kmm_kernel-module-management-operator>
360+
361+
```shell
362+
lvcreate -L1T -n fusion vg0
363+
```
364+
365+
```shell
366+
export CLUSTER_NAME=pluto
367+
for node in ${CLUSTER_NAME}-compute-0 ${CLUSTER_NAME}-compute-1 ${CLUSTER_NAME}-compute-2 ; do
368+
virsh attach-disk $node /dev/mapper/vg0-fusion sdb --targetbus scsi --cache none --persistent --live --wwn 5000c500155a3456
369+
done
370+
```
371+
372+
### iSCSI & RHCOS
373+
374+
This is ugly as hell, but works for quick testing.
375+
376+
=== "Apply iSCSI helper"
377+
378+
```
379+
oc apply -f {{ page.canonical_url }}iscsi-helper.yaml
380+
```
381+
382+
=== "iscsi-helper.yaml"
383+
384+
```yaml
385+
--8<-- "content/storage/ibm-fusion-access-san/iscsi-helper.yaml"
386+
```

0 commit comments

Comments
 (0)