Friday, May 25, 2018

What is difference between rebalance and recovery in Ceph?

We set norebalance, noecover flags on a Ceph cluster during a cluster modification such as adding/removing OSDs. A cluster OSDs modification created a new mapping of PGs.

A new mapping of PG means:
  • The PG might move to a new primary
  • The PG might have a new secondary
  • A PG might have an all new primary and secondary
The first scenario means that PG is hosted on a new OSD so all of its data must move, by PG backfill. Since it's a new primary, the secondary OSDs might have changes too. A new seocndary means that backfill would start on secondaty OSDs too.
So, setting recover means that we don't do backfill and rather serve data from old mappings (which might have become unavailable if OSDs was down)
If we set norebalance, that means that we would not do backfill of secondary PGs and would rather live with fewer copies of PGs.


No comments:

Post a Comment