Chapter 5. Creating mirroring StorageClass resource
The block volumes with mirroring enabled
must be created using a new StorageClass that has additional imageFeatures
required to enable faster image replication between managed clusters. The new features are exclusive-lock, object-map, and fast-diff. The default OpenShift Data Foundation StorageClass ocs-storagecluster-ceph-rbd
does not include these features.
Note
This resource must be created on the Primary managed cluster and the Secondary managed cluster.
Procedure
Save the following YAML to filename
ocs-storagecluster-ceph-rbdmirror.yaml
.allowVolumeExpansion: true apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: ocs-storagecluster-ceph-rbdmirror parameters: clusterID: openshift-storage csi.storage.k8s.io/controller-expand-secret-name: rook-csi-rbd-provisioner csi.storage.k8s.io/controller-expand-secret-namespace: openshift-storage csi.storage.k8s.io/fstype: ext4 csi.storage.k8s.io/node-stage-secret-name: rook-csi-rbd-node csi.storage.k8s.io/node-stage-secret-namespace: openshift-storage csi.storage.k8s.io/provisioner-secret-name: rook-csi-rbd-provisioner csi.storage.k8s.io/provisioner-secret-namespace: openshift-storage imageFeatures: layering,exclusive-lock,object-map,fast-diff imageFormat: "2" pool: ocs-storagecluster-cephblockpool provisioner: openshift-storage.rbd.csi.ceph.com reclaimPolicy: Delete volumeBindingMode: Immediate
Create the file on both the managed clusters.
$ oc create -f ocs-storagecluster-ceph-rbdmirror.yaml
Example output:
storageclass.storage.k8s.io/ocs-storagecluster-ceph-rbdmirror created