Editing the existing default CephFS data pool to replica-2

Use this procedure to edit the existing default CephFS pool to replica-2 and use it with the default CephFS storage class.

Procedure

  1. Patch the storagecluster to change default CephFS data pool to replica-2.
     oc patch storagecluster ocs-storagecluster -n openshift-storage --type json --patch '[{ "op": "replace", "path": "/spec/managedResources/cephFilesystems/dataPoolSpec/replicated/size", "value": 2 }]'
  2. Run the following command to verify the CephFS details:
     oc get cephfilesystem ocs-storagecluster-cephfilesystem -o=jsonpath='{.spec.dataPools}' | jq

    Example output:

    [
      {
        "application": "",
        "deviceClass": "ssd",
        "erasureCoded": {
          "codingChunks": 0,
          "dataChunks": 0
        },
        "failureDomain": "zone",
        "mirroring": {},
        "quotas": {},
        "replicated": {
          "replicasPerFailureDomain": 1,
          "size": 2,
          "targetSizeRatio": 0.49
        },
        "statusCheck": {
          "mirror": {}
        }
      }
    ]
  3. Run the following command to check the pool details:
     ceph osd pool ls | grep filesystem

    Example output:

    ocs-storagecluster-cephfilesystem-metadata
    ocs-storagecluster-cephfilesystem-data0