

















When an OSD fails or is removed, Ceph begins recovery to restore the cluster to its target replication or erasure-coded state. Recovery involves copying missing object replicas from surviving OSDs to either the returning OSD or a new one.
Recovery is distinct from backfill:
The process follows these stages:
degradedosd_recovery_delay_start seconds (default 0)degraded -> recovering -> active+cleanCheck current recovery state:
ceph -sExample output during recovery:
health: HEALTH_WARN
Degraded data: 23/150 objects degraded (15.333%)
recovery: 12345 kB/s, 4 keys/s, 1 objects/sMonitor recovery in detail:
ceph osd pool stats
ceph pg dump | grep -E "recovering|degraded"Watch live recovery progress:
watch -n 2 ceph -sGet per-OSD recovery statistics:
ceph osd perfImportant recovery configuration keys:
| Parameter | Default | Description |
|---|---|---|
osd_recovery_max_active | 3 | Max concurrent recovery ops per OSD |
osd_recovery_op_priority | 3 | Priority relative to client I/O |
osd_recovery_sleep | 0 | Delay between recovery ops (seconds) |
osd_backfill_scan_min | 64 | Min objects per backfill scan |
View current settings:
ceph config get osd osd_recovery_max_activeIn Rook, configure recovery parameters via the CephCluster spec or config overrides:
apiVersion: ceph.rook.io/v1
kind: CephCluster
metadata:
name: rook-ceph
namespace: rook-ceph
spec:
cephConfig:
osd:
osd_recovery_max_active: "3"
osd_recovery_op_priority: "3"
osd_recovery_sleep: "0"Apply at runtime using the toolbox:
kubectl -n rook-ceph exec -it deploy/rook-ceph-tools -- \
ceph config set osd osd_recovery_max_active 3During recovery:
min_size is still metmin_size, reads and writes to that PG are blockedMonitor minimum size compliance:
ceph osd pool get <pool-name> min_size
ceph osd pool get <pool-name> sizeCeph OSD recovery is an automated process that restores data redundancy after OSD failures. Understanding the recovery lifecycle, key parameters, and health indicators helps operators ensure recovery completes efficiently without starving client I/O. Rook exposes these settings through the CephCluster CRD for Kubernetes-native management.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。