About this task
You can create custom block pools to change the backend storage device used based on the
requirement.
Procedure
-
In the provider storage cluster CR, edit the
storageDeviceSets
to add the
device of your choice. For example:
- config: {}
name: test-2
deviceClass: fast
dataPVCTemplate:
metadata: {}
spec:
storageClassName: local-block
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
volumeMode: Block
count: 3
placement: {}
replica: 1
- Create a new block pool.
apiVersion: ceph.rook.io/v1
kind: CephBlockPool
metadata:
name: fast-cbp
namespace: openshift-storage
spec:
deviceClass: fast
application: ""
enableRBDStats: true
erasureCoded:
codingChunks: 0
dataChunks: 0
failureDomain: host
mirroring: {}
quotas: {}
replicated:
replicasPerFailureDomain: 1
size: 3
targetSizeRatio: 0.49
statusCheck:
mirror: {}
In the
, edit the
- In the
StorageClaim
, edit the storageProfile
to use the
custom block pool with a new device class that is created in the provider cluster. For
example:
piversion: ocs.openshift.io/v1alpha1
Kind: StorageClaim
Metadata:
Name: <storage_claim_name>
Spec:
storageClient: ocs-storagecluster
storageProfile: <block_pool_name>
type : block
This creates a new storage class with the new device class and when the applications use these
storage classes, the block pool is used to store the data on the newly configured device.
- To verify that the new storage classes are created, perform the following steps:
- Click Storage → StorageClasses.
- Verify that a new storage class with the same name as the storage claim is
created.