full ratio.
*Incomplete*
- Ceph detects that a placement group is missing information about writes
- that may have occurred, or does not have enough healthy copies to reach
- the pool's configured min_size. If you see this state, try to start any
- failed OSDs that may contain the needed information or temporarily adjust
- min_size to allow recovery.
+ Ceph detects that a placement group is missing information about
+ writes that may have occurred, or does not have any healthy
+ copies. If you see this state, try to start any failed OSDs that may
+ contain the needed information or temporarily adjust min_size to
+ allow recovery.
*Stale*
The placement group is in an unknown state - the monitors have not received
*Undersized*
The placement group fewer copies than the configured pool replication level.
+*Peered*
+ The placement group has peered, but cannot serve client IO due to not having
+ enough copies to reach the pool's configured min_size parameter. Recovery
+ may occur in this state, so the pg may heal up to min_size eventually.
bool is_undersized() const { return state_test(PG_STATE_UNDERSIZED); }
bool is_scrubbing() const { return state_test(PG_STATE_SCRUBBING); }
+ bool is_peered() const {
+ return state_test(PG_STATE_ACTIVE) || state_test(PG_STATE_PEERED);
+ }
bool is_empty() const { return info.last_update == eversion_t(0,0); }
oss << "backfill_toofull+";
if (state & PG_STATE_INCOMPLETE)
oss << "incomplete+";
+ if (state & PG_STATE_PEERED)
+ oss << "peered+";
string ret(oss.str());
if (ret.length() > 0)
ret.resize(ret.length() - 1);
#define PG_STATE_RECOVERY_WAIT (1<<22) // waiting for recovery reservations
#define PG_STATE_UNDERSIZED (1<<23) // pg acting < pool size
#define PG_STATE_ACTIVATING (1<<24) // pg is peered but not yet active
+#define PG_STATE_PEERED (1<<25) // peered, cannot go active, can recover
std::string pg_state_string(int state);