14장. Using 2-way replication with CephFS
To reduce storage overhead with CephFS when data resiliency is not a primary concern, you can opt for using 2-way replication (replica-2). This reduces the amount of storage space used and decreases the level of fault tolerance.
There are two ways to use replica-2 for CephFS:
14.1. 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 storageclass.
Procedure
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 }]' storagecluster.ocs.openshift.io/ocs-storagecluster patched$ oc get cephfilesystem ocs-storagecluster-cephfilesystem -o=jsonpath='{.spec.dataPools}' | jq [ { "application": "", "deviceClass": "ssd", "erasureCoded": { "codingChunks": 0, "dataChunks": 0 }, "failureDomain": "zone", "mirroring": {}, "quotas": {}, "replicated": { "replicasPerFailureDomain": 1, "size": 2, "targetSizeRatio": 0.49 }, "statusCheck": { "mirror": {} } } ]Check the pool details.
$ ceph osd pool ls | grep filesystem ocs-storagecluster-cephfilesystem-metadata ocs-storagecluster-cephfilesystem-data0