Skip to main content
RunBook Academy

CephXXIII · ReplicationReplication

size and min_size: what each one controls

Foundation⏱ ~15 minceph

What you'll learn

  • Define size and min_size precisely
  • Explain what happens when available replicas fall below each
  • Set both on a pool and verify the setting
  • Reason about the durability/availability trade-off they encode

Prerequisites

None — start here.

Verified against Ceph Tentacle 20.2.x · Ceph Squid 19.2.x (supported previous) · cephadm matches the verified Ceph release · podman 4.x · csi-rbd and csi-cephfs current · RBD / CephFS / RGW current (matches Ceph release) · Linux kernel 5.15+ (5.10 minimum) · Ubuntu 24.04 LTS (Ceph host baseline) · Debian 12 (Bookworm) (Ceph host baseline) · Rocky Linux / RHEL / AlmaLinux 9.x (Ceph host baseline) · Proxmox VE 9.x (cross-course integration) · Kubernetes 1.31+ (cross-course integration) · 2026-08-18

Not yet marked complete on this device.

Why this matters in production

Almost every “Ceph lost my data” story reduces to a min_size that someone lowered during an incident and never raised again. These two numbers are the entire durability contract of a replicated pool, and they are two words apart in the command line.

The definitions

size — how many copies of each object the cluster maintains. The target.

min_size — how many copies must be available for the PG to accept I/O. The floor.

ceph osd pool get rbd-vms size min_size
# size: 3
# min_size: 2

size is what you want. min_size is what you insist on.

What happens at each boundary

Take size 3, min_size 2 and remove OSDs one at a time:

Available copiesPG stateClient I/ODurability
3active+cleannormalfull
2active+undersized+degradednormalreduced
1undersized+degraded+incompleteblockedone copy left
0downblockednone available

The critical row is the third. At one surviving copy Ceph stops serving the PG. Clients hang. This looks like a failure and is in fact the system doing exactly what you asked: refusing to accept writes it cannot make safely.

Why blocking is the correct behaviour

If Ceph accepted a write with one copy available, that write would exist in exactly one place. Lose that OSD before recovery completes and the write is gone — not degraded, gone, with no record that it ever existed. Worse, the acknowledged write means the client believes it is durable.

Blocking converts silent data loss into visible unavailability. That is always the right trade for a storage system, because unavailability is recoverable and data loss is not.

Setting them

ceph osd pool set rbd-vms size 3
ceph osd pool set rbd-vms min_size 2

Raising size triggers replication of every object in the pool to an additional OSD — significant data movement. Lowering it deletes copies, which is fast but irreversible in the sense that the redundancy is gone immediately.

ceph config set global osd_pool_default_size 3
ceph config set global osd_pool_default_min_size 2

Quiz

Knowledge check · 4 questions

  1. Q1. A pool has size 3 and min_size 2. Two of the three OSDs in a PG's acting set fail. What happens to that PG?

  2. Q2. When available copies drop from 3 to 2 on a size-3 min_size-2 pool, client I/O continues normally.

  3. Q3. Explain a partial outage to a stakeholder.

    Two OSDs on different hosts failed within minutes of each other. Most VMs on the cluster are running normally, but four of them have hung completely. The pool is size 3, min_size 2. Management wants to know why some workloads are fine and others are down.

  4. Q4. Why does Ceph block I/O below min_size rather than accepting writes to the single remaining copy?

Passing score: 75%. Answers are checked in this browser.

Production discipline

Treat min_size as a value that only ever goes up in normal operations. If an incident forces it down, set a timer and an owner for restoring it in the same breath, and monitor for pools whose min_size is below the standard so a temporary change cannot quietly become permanent.

Cross-course references

  • Kubernetes: a PodDisruptionBudget encodes the same floor — how much you may lose and still be serving
  • Linux: a RAID array going read-only when redundancy is exhausted is the identical trade