In luminous we now have full support of ec pool, so it is not
good to continue hardcoding default pool type to "replicated".
Introduce a configurable osd_pool_default_type for this.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
OPTION(osd_pool_default_min_size, OPT_INT, 0) // 0 means no specific default; ceph will use size-size/2
OPTION(osd_pool_default_pg_num, OPT_INT, 8) // number of PGs for new pools. Configure in global or mon section of ceph.conf
OPTION(osd_pool_default_pgp_num, OPT_INT, 8) // number of PGs for placement purposes. Should be equal to pg_num
+OPTION(osd_pool_default_type, OPT_STR, "replicated")
OPTION(osd_pool_default_erasure_code_profile,
OPT_STR,
"plugin=jerasure "
string pool_type_str;
cmd_getval(g_ceph_context, cmdmap, "pool_type", pool_type_str);
if (pool_type_str.empty())
- pool_type_str = pg_pool_t::get_default_type();
+ pool_type_str = g_conf->osd_pool_default_type;
string poolstr;
cmd_getval(g_ceph_context, cmdmap, "pool", poolstr);
const char *get_type_name() const {
return get_type_name(type);
}
- static const char* get_default_type() {
- return "replicated";
- }
enum {
FLAG_HASHPSPOOL = 1<<0, // hash pg seed and pool together (instead of adding)