Proxmox VEVIII · CephCeph troubleshooting
Ceph troubleshooting scenarios
What you'll learn
- Investigate HEALTH_WARN from common causes
- Resolve full OSDs nearfull, full
- Fix a CRUSH rule that breaks placement
- Recover from a degraded cluster after cascading failures
Prerequisites
Verified against Proxmox VE 9.2.4 · Proxmox Backup Server 4.2.5 · Ceph Squid / Tentacle · Debian 13 (Trixie) · Linux kernel 7.0 (PVE 9.2 default) · 2026-08-12
Why this matters in production
Ceph incidents tend to look the same from the dashboard but have very different causes. This lesson walks through the most common patterns.
Pattern 1: HEALTH_WARN — nearfull on an OSD
health: HEALTH_WARN
1 nearfull OSD(s)
Cause: an OSD is using more than nearfull_ratio (default 0.85) of its capacity.
Diagnostic:
ceph osd df | head -20
Fixes:
- Add capacity (replace the OSD’s disk with a larger one).
- Rebalance data by adding more OSDs.
- Delete unused snapshots or data.
Pattern 2: PGs stuck in degraded
health: HEALTH_WARN
12 active+degraded+undersized+remapped pgs
Cause: not enough OSDs to satisfy the pool’s CRUSH rule. Common after a node failure when replicas cannot be placed.
Diagnostic:
ceph pg dump_stuck stale && ceph pg dump_stuck unclean && ceph pg dump_stuck inactive
Fix: restore the missing OSDs. Replace the hardware, fix the network, bring the node back. That is the entire correct response, and the reason it is worth stating flatly is that the tempting alternative is worse than the problem.
Pattern 3: OSD flapping
health: HEALTH_WARN
1 OSD(s) experiencing slow operations
An OSD is starting and stopping repeatedly. Common causes:
- Network instability.
- Disk failure (intermittent).
- Software bug in the OSD process.
Diagnostic:
ceph osd tree && ceph osd metadata 5 | grep -E 'host|addr'
ceph daemon osd.5 dump_ops_in_flight 2>/dev/null || journalctl -u ceph-osd@5 --since '10 minutes ago'Fix: identify the root cause (hardware replacement, network fix, software update).
Pattern 4: Slow ops cluster-wide
health: HEALTH_WARN
47 slow ops, oldest in 230s
Something in the cluster is bottlenecked. Diagnostic steps (see the Ceph performance lesson for detail):
ceph osd perf— find slow OSDs.ceph daemon osd.N perf dump— check op_queue vs op_process latency.- Check NIC counters.
- Check for stuck PGs (recovery in progress).
Fix: address the bottleneck. Common remedies: throttle recovery, replace slow disks, add network capacity.
Pattern 5: Full cluster (no recovery possible)
If the cluster reaches full_ratio (default 0.95), Ceph blocks all writes to prevent
data loss.
Diagnostic:
ceph df && ceph osd df tree | sort -k5 -n -r | head
Fix:
- Increase
full_ratioandnearfull_ratiotemporarily to give yourself room to investigate. This is a stopgap, not a fix. - Delete unused snapshots.
- Resize the cluster (add OSDs).
- Restore the ratios to defaults once stable.
# what are they now?
ceph osd dump | grep -E 'full_ratio|nearfull_ratio'
ceph osd set-full-ratio 0.97
ceph osd set-nearfull-ratio 0.90
ceph osd set-backfillfull-ratio 0.92Pattern 6: Cascading failure after node loss
When a node fails and recovery begins, surviving OSDs see increased load. If they were already at 70-80 % utilisation, the additional load can:
- Push them to nearfull.
- Slow response time.
- Trip Ceph’s slow-op detection.
- Cause recovery to stall.
This is the most dangerous Ceph failure mode. Prevention:
- Keep utilisation well below nearfull_ratio.
- Maintain N+2 capacity headroom (not just N+1).
- Test node failures on a non-production cluster.
A break/fix exercise
HEALTH_WARN: PGs stuck unclean after node failure
Symptoms
- After pve-02 lost power and rebooted, PGs are stuck in active+degraded+remapped
- Recovery never completes; ceph -s shows stalled recovery
- Some PGs show 2 of 3 replicas available
Available evidence
- ceph osd tree shows osd.4, osd.5 (on pve-02) up but empty
- ceph pg dump_stuck unclean shows PGs stuck
- ceph health detail says recovery is stalled because some OSDs are full
- ceph osd df shows pve-01 OSDs at 92% utilisation
Show diagnosis & remediation
Root cause
Cascading failure: node loss reduced cluster capacity, triggering backfill into already-full OSDs. Backfill blocks; recovery stalls.
Safe remediation
Step 1: Delete obsolete snapshots to free space. Step 2: Increase nearfull_ratio temporarily to unblock backfill. Step 3: Once backfill progresses, restore defaults. Step 4: Replace the failed node hardware to restore full redundancy.
Verification
ceph -s shows recovery progressing. ceph health detail returns to HEALTH_OK once backfill completes.
Prevention
Maintain at least 30% capacity headroom. N+1 sizing should account for backfill needs, not just for normal operation.
Production considerations
Common mistakes
- Raising full_ratio instead of adding capacity.
- Lowering
sizeormin_sizeto clear a degraded warning. It relabels the problem, discards the copy Ceph was rebuilding, and themin_sizeversion is almost never reverted afterwards. - Using
ceph osd set full_ratio 0.97. That is not the command:ceph osd settakes flags such asnoout. The threshold commands areceph osd set-full-ratio,set-nearfull-ratioandset-backfillfull-ratio. - Restarting OSDs in random order during a cascade.
- Trusting HEALTH_OK without checking recovery progress.
- Not having replacement OSDs on hand.
Key takeaways
- nearfull → add capacity.
- Degraded PGs → restore missing OSDs. Never lower
sizeormin_sizeto make the warning go away. - Slow ops → find the bottleneck (network/disk/load).
- Full cluster → raise the ratios by a small amount with
ceph osd set-full-ratio, and restore them in the same change record.
Knowledge check
Knowledge check · 4 questions
Q1. What is the most common cause of stalled recovery in a Ceph cluster?
Q2. Raising full_ratio above 0.97 is a sustainable long-term strategy for a full cluster.
Q3. Which command shows PGs stuck in unclean state?
Q4. A node is permanently dead and a size 3 pool has been reporting undersized+degraded for two days while a replacement is procured. A colleague proposes setting size 2 to clear the warning. Which objections are valid? Select all that apply.
Passing score: 75%. Answers are checked in this browser.