From: Samuel Just Date: Tue, 17 Feb 2015 18:06:19 +0000 (-0800) Subject: PG: add a config option to enable (by default) recovery below min_size X-Git-Tag: v0.93~25^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1d0d3dc8dbd78a63153790741bd3fd4b27f90533;p=ceph.git PG: add a config option to enable (by default) recovery below min_size This may be useful at some point. Signed-off-by: Samuel Just --- diff --git a/src/common/config_opts.h b/src/common/config_opts.h index 7994e3e8fb4d1..5bc8c80668e02 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -505,6 +505,10 @@ OPTION(osd_erasure_code_plugins, OPT_STR, " isa" #endif ) // list of erasure code plugins + +// Allows the "peered" state for recovery and backfill below min_size +OPTION(osd_allow_recovery_below_min_size, OPT_BOOL, true) + OPTION(osd_pool_default_flags, OPT_INT, 0) // default flags for new pools OPTION(osd_pool_default_flag_hashpspool, OPT_BOOL, true) // use new pg hashing to prevent pool/pg overlap OPTION(osd_pool_default_flag_nodelete, OPT_BOOL, false) // pool can't be deleted diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 8c55007b6aa8c..b2f46f6a32551 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -1312,7 +1312,8 @@ bool PG::choose_acting(pg_shard_t &auth_log_shard_id) // Otherwise, we will go "peered", but not "active" if (num_want_acting < pool.info.min_size && (pool.info.ec_pool() || - !(get_min_peer_features() & CEPH_FEATURE_OSD_MIN_SIZE_RECOVERY))) { + (!(get_min_peer_features() & CEPH_FEATURE_OSD_MIN_SIZE_RECOVERY)) || + !cct->_conf->osd_allow_recovery_below_min_size)) { want_acting.clear(); dout(10) << "choose_acting failed, below min size" << dendl; return false;