Here is how I worked around Disk type is not compatible with the selected backing storage:
- Encoded the
queue/rotational=0
cat << EOF | base64 -w0
ACTION=="add|change", SUBSYSTEM=="block", KERNEL=="dm-[1,3]", ATTR{queue/rotational}="0"
EOF
Encoded
QUNUSU9OPT0iYWRkfGNoYW5nZSIsIFNVQlNZU1RFTT09ImJsb2NrIiwgS0VSTkVMPT0iZG0tWzEsM10iLCAgQVRUUntxdWV1ZS9yb3RhdGlvbmFsfT0iMCIK
- Create the MachineConfig –
99-worker-udev-non-rotational
cat << EOF > ./99-worker-udev-configuration.yaml
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
labels:
machineconfiguration.openshift.io/role: worker
name: 99-worker-udev-non-rotational
spec:
config:
ignition:
version: 3.2.0
storage:
files:
- contents:
source: data:text/plain;charset=utf-8;base64,QUNUSU9OPT0iYWRkfGNoYW5nZSIsIFNVQlNZU1RFTT09ImJsb2NrIiwgS0VSTkVMPT0iZG0tWzEsM10iLCAgQVRUUntxdWV1ZS9yb3RhdGlvbmFsfT0iMCIK
verification: {}
filesystem: root
mode: 420
path: /etc/udev/rules.d/99-worker-udev-non-rotational.rules
EOF
oc apply -f 99-worker-udev-configuration.yaml
Check the MachineConfigPool/worker, and then proceeded with the setup.
Yamls
Here are the YAMLs:
apiVersion: local.storage.openshift.io/v1alpha1
kind: LocalVolumeDiscovery
metadata:
name: auto-discover-devices
namespace: openshift-local-storage
spec:
nodeSelector:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- worker1.removed
- worker2.removed
- worker3.removed
apiVersion: local.storage.openshift.io/v1alpha1
kind: LocalVolumeSet
metadata:
name: lvs-san-x
namespace: openshift-local-storage
spec:
deviceInclusionSpec:
deviceTypes:
- disk
- part
- mpath
minSize: 1Gi
nodeSelector:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- worker1.removed
- worker2.removed
- worker3.removed
storageClassName: lvs-san-x
volumeMode: Block
References
1. Override device rotational flag in OCS/ODF environments https://access.redhat.com/articles/6547891