Setting Ceph OSD full thresholds by updating the StorageCluster CR

Use this procedure to override the default settings and to set Ceph OSD full thresholds by updating the StorageCluster CR.

Procedure

You can update the StorageCluster CR to change the settings for fullRatio, backfillFullRatio, and nearFullRatio.

fullRatio

Use this argument to update full ratio of Ceph OSDs when Ceph prevents the IO operation on OSDs that reached the specified capacity. The default value is 0.85.

Important: Do not set the full ratio value of OSDs too close to 1.0 because the cluster becomes unrecoverable if the OSDs are full and have nowhere to grow.

For example, run the following command to set the fullRatio to 0.90:

 oc patch storagecluster ocs-storagecluster -n openshift-storage --type json --patch '[{ "op": "replace", "path": "/spec/managedResources/cephCluster/fullRatio", "value": 0.90 }]'

backfillFullRatio

Use this argument to update the backfillFull ratio of Ceph OSDs when Ceph denies backfilling to the OSDs that reached the specified capacity. The default value is 0.80.

Important: If the value is set too close to 1.0, the OSDs become full and prevent the cluster from backfilling.

For example, run the following command to set the backfillFullRatio to 0.85:

 oc patch storagecluster ocs-storagecluster -n openshift-storage --type json --patch '[{ "op": "replace", "path": "/spec/managedResources/cephCluster/backfillFullRatio", "value": 0.85 }]'

nearFullRatio

Use this subcommand to update the nearFull ratio of Ceph OSDs when the cluster reaches the specified capacity and Ceph returns the nearfull message of OSDs. The default value is 0.75.

For example, run the following command to set the nearFullRatio to 0.80:

 oc patch storagecluster ocs-storagecluster -n openshift-storage --type json --patch '[{ "op": "replace", "path": "/spec/managedResources/cephCluster/nearFullRatio", "value": 0.80 }]'