diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 83e85847045..1378e93770e 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -2793,7 +2793,9 @@ int OSDMonitor::prepare_command_pool_set(map &cmdmap, ss << "error parsing integer value '" << val << "': " << interr; return -EINVAL; } - if (n > (int)p.get_pg_num()) { + if (n <= 0) { + ss << "specified pgp_num must > 0, but you set to " << n; + } else if (n > (int)p.get_pg_num()) { ss << "specified pgp_num " << n << " > pg_num " << p.get_pg_num(); } else if (!mon->pgmon()->pg_map.creating_pgs.empty()) { ss << "still creating pgs, wait";