From: Anthony D'Atri Date: Thu, 1 Dec 2022 19:04:30 +0000 (-0500) Subject: src/mon: clarify pool creation failure due to max_pgs_per_osd error message X-Git-Tag: v18.1.0~673^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=88e8eeca7571fc314bc30a52cd17218fa9fac500;p=ceph.git src/mon: clarify pool creation failure due to max_pgs_per_osd error message Signed-off-by: Anthony D'Atri --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index e9e7ce72a8b1..cbd48fbd27f8 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -7938,15 +7938,16 @@ int OSDMonitor::check_pg_num(int64_t pool, int pg_num, int size, int crush_rule, } } auto max_pgs = max_pgs_per_osd * num_osds; + auto projected_pgs_per_osd = projected / num_osds; if (projected > max_pgs) { if (pool >= 0) { *ss << "pool id " << pool; } *ss << " pg_num " << pg_num << " size " << size - << " would mean " << projected - << " total pgs, which exceeds max " << max_pgs - << " (mon_max_pg_per_osd " << max_pgs_per_osd - << " * num_in_osds " << num_osds << ")"; + << " for this new pool would result in " << projected_pgs_per_osd + << " cumulative PGs per OSD (" << projected + << " total PG replicas on " << num_osds + << " 'in' OSDs) which exceeds the mon_max_pg_per_osd value of " << max_pgs_per_osd; return -ERANGE; } return 0;