advanced26 min studyLesson 315 in Engineering

Fragment placement determines which failures overlap

Connect Ceph placement groups and CRUSH topology to host, rack, and shared-dependency failures without assuming distinct disks imply independent risk.

On this page

What you’ll understand

  • Distinguish logical placement groups from physical failure domains.
  • Count lost fragments under a stated topology-wide failure.
  • Explain why a placement rule must be feasible and match actual infrastructure dependencies.

A redundancy count says how many fragments can be unavailable; placement says which real event removes them together. Six fragments on six disks can still share one host, rack, power feed, or software rollout. Ceph's placement-group and CRUSH mechanisms make that topology explicit in one concrete system. The goal is not to infer a universal provider layout from a bucket name, but to connect a stated placement rule to specific failure scenarios and the resources required to restore it.

Groups organize placement without becoming racks

In Ceph, objects map into placement groups, and placement groups map to storage daemons using the cluster's placement configuration. Grouping lets the system track and manage sets of objects rather than maintaining a fully separate global placement record for each object. A placement group is a logical management unit, not a physical rack or a promise that all its fragments fail independently. The actual acting and desired locations depend on cluster maps, rules, and current daemon state.

CRUSH uses a topology hierarchy and placement rules to select locations, with weights and failure-domain choices influencing the result. A rule separating fragments by host protects against a different set of correlated failures than a rule separating them by rack. The topology must accurately describe where devices reside, and enough eligible domains must exist to satisfy the rule. Changing a label in a map without changing shared physical dependencies does not create isolation from those dependencies.

L(F)=∑i=1k+m1{domain⁡(i)∈F}L(F)=\sum_{i=1}^{k+m}\mathbf{1}\{\operatorname{domain}(i)\in F\}
L(F) counts fragments whose stated placement domains lie in failed-domain set F. The indicator is one when the fragment is affected. This is a deterministic scenario count for a particular placement, not a probability model or a guarantee that all other fragments are valid.↔ Scroll wide equations horizontally.

Map a failure to fragments before claiming tolerance

For a host-separated 4+2 stripe with six fragments distributed two per rack across three racks, losing one complete rack removes two fragments and leaves four. This is not a one-fragment-per-rack placement rule. Losing two racks removes four and leaves only two, below the code's general reconstruction threshold. Placing each fragment on a distinct host is still useful within that layout, but it does not turn the three racks into six independent rack domains. State the largest failure unit the design claims to tolerate and test the actual allocation against it.

Physical and administrative correlations extend beyond the declared hierarchy. Shared network uplinks, controller firmware, credentials, and maintenance batches can affect several nominal domains at once. An independent-disk probability multiplied across replicas ignores those mechanisms. Also inspect temporary placement during expansion, recovery, and maintenance: the steady-state rule can be satisfied before a failure while the remaining eligible space is insufficient to restore it afterward. Capacity and failure-domain feasibility must be evaluated in the degraded topology too.

L(F)≤mL(F)\leq m
For the stated MDS same-generation valid-fragment model, this scenario condition leaves at least k fragments after the counted domain failure. It is necessary for that simple count argument, not sufficient for metadata availability, service policy, independence, or successful repair.↔ Scroll wide equations horizontally.

Rebalancing needs spare domains as well as bytes

A cluster can have aggregate free space yet lack a legal destination in the required failure domain. Rebalancing also consumes network and device bandwidth while clients continue using the surviving locations. Observe undersized, degraded, remapped, and recovery-related states according to the deployed Ceph version rather than flattening them into a single healthy/unhealthy badge. The states describe different relationships between desired redundancy, current placement, and ongoing work, and can call for different investigation.

Use the probability lab to challenge an independent-domain toy model. Reset, set both p=0.9 and n=3, interpret success as one rack being available, and predict the mass for at least two available racks. With the equal two-fragments-per-rack layout, that corresponds to retaining at least four fragments under the stated all-or-nothing rack model. Play or Step highlights exact outcomes only. It does not construct CRUSH placements, model shared power, or justify the assumed independence; compare the deterministic failure counts with the real topology first.

Compare disk and rack statements

A 4+2 stripe places six fragments on six distinct hosts, with two hosts in each of three racks. All remaining fragments are valid and readable. Evaluate a single-host failure and then a single-rack failure.

  1. One host failure removes one fragment, leaving five. That exceeds the four-fragment reconstruction threshold under the stated code assumptions.

  2. One rack failure removes its two hosts and therefore two fragments, leaving four. This reaches the threshold exactly; the fact that hosts were distinct did not reduce the rack's loss to one fragment.

  3. Two rack failures would remove four fragments and leave two, which is insufficient. If repair policy requires one fragment per distinct host, replacement also needs eligible hosts and free space in locations permitted by the configured rule.

The result

The layout's host and rack failure counts differ. It tolerates the stated single-rack loss algebraically but does not imply tolerance of any two-rack loss or unlimited repair capacity.

Explore the model

Interactive lab

Interactive lab · probability

Choose the failure unit before multiplying probabilities

Reset, set both independent rack-availability p=0.9 and rack count n=3, predict the mass for at least two successes, then Play or Step. The binomial bars are a toy all-or-nothing rack model, not CRUSH placement or a durability forecast.

Choose the failure unit before multiplying probabilitiesThese are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Current readings: Mean · np: 5; Variance · np(1−p): 2.5; Total probability: 1. All parameters are adjustable with the labeled controls below.03581000.070.150.220.3Successes kP(X = k)k = 0 · P = 9.77e-4
Exact probabilityHighlighted outcomeMean np
Mean · np
5
Variance · np(1−p)
2.5
Total probability
1
t = 0 s

These are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forA probability model is only meaningful after placement maps a real failure unit to the fragments it removes.

Check your understanding

Why can six fragments on six distinct hosts still fail together beyond a code's tolerance?

Try it yourself

A 6+3 stripe has nine fragments, three in each of three racks. How many remain after one rack fails, and why is saying 'three coding fragments means three rack failures are safe' incorrect?

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Count fragments removed per rack before applying m. The redundancy parameter counts fragments in this model, not arbitrary infrastructure failures.

Compare with the solution

One rack removes three fragments, leaving six, exactly the reconstruction threshold under the valid same-generation MDS assumptions. The parameter m=3 counts tolerated known fragment erasures. In this placement, a rack erases three at once, so two failed racks leave only three fragments and cannot support the general reconstruction claim. Rack tolerance depends on the actual distribution, not the name coding fragment.

Take it with you

  • Placement groups organize object placement; failure domains describe correlated physical loss.
  • Translate each failure scenario into a fragment count before applying a code threshold.
  • Repair needs eligible domains, free space, bandwidth, and accurate topology information.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.