OPTION(mon_osd_min_up_ratio, OPT_DOUBLE, .3) // min osds required to be up to mark things down
OPTION(mon_osd_min_in_ratio, OPT_DOUBLE, .3) // min osds required to be in to mark things out
OPTION(mon_osd_max_op_age, OPT_DOUBLE, 32) // max op age before we get concerned (make it a power of 2)
+OPTION(mon_osd_max_split_ratio, OPT_INT, 8) // largest multiple allowed when doing PG split
OPTION(mon_stat_smooth_intervals, OPT_INT, 2) // smooth stats over last N PGMap maps
OPTION(mon_lease, OPT_FLOAT, 5) // lease interval
OPTION(mon_lease_renew_interval, OPT_FLOAT, 3) // on leader, to renew the lease
} else if (var == "pg_num") {
if (n <= p->get_pg_num()) {
ss << "specified pg_num " << n << " <= current " << p->get_pg_num();
+ } else if (n > (int)p->get_pg_num() * g_conf->mon_osd_max_split_ratio) {
+ ss << "specified pg_num " << n << " is too large (> current "
+ << p->get_pg_num() << '*' << g_conf->mon_osd_max_split_ratio << ')';
+ err = -E2BIG;
} else if (!mon->pgmon()->pg_map.creating_pgs.empty()) {
ss << "currently creating pgs, wait";
err = -EAGAIN;