Creating a custom block pool using command-line interface

Before you begin

  • You have administrative access to Red Hat OpenShift Web Console.

  • Fusion Data Foundation client operator is installed and Fusion Data Foundation storage client is created.

About this task

You can create custom block pools to change the backend storage device used based on the requirement.

Procedure

  1. 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
  2. Create a new block pool.

    For example:

    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

  3. 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.

  4. To verify that the new storage classes are created, perform the following steps:
    1. Click StorageStorageClasses.
    2. Verify that a new storage class with the same name as the storage claim is created.