]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon/OSDMonitor: allow 'osd pool set pgp_num_actual' 27010/head
authorSage Weil <sage@redhat.com>
Sat, 16 Mar 2019 20:06:00 +0000 (15:06 -0500)
committerSage Weil <sage@redhat.com>
Sat, 16 Mar 2019 20:06:00 +0000 (15:06 -0500)
commit0c6840e219cda053e137a8de8dd04dd348b6ed45
treebddd52a9c438c6f2bda535fb35a307d7ad372fec
parent578d8b82c88d19c4268fa3fb8a43a2c2b6408f9c
mon/OSDMonitor: allow 'osd pool set pgp_num_actual'

Normally we let the mgr control pgp_num_actual for us in a nice, safe, controlled
way.  However, it is very conservative, and only makes changes if all PGs are healthy.
There are situations where the user wants to be move aggressive than this.

For example, if you have a pool with many PGs (say, 4096) and set pg_num_target to a
small number like 4, the mgr will adjust pgp_num way down.  This can lead to an OSD
hitting max_pgs_per_osd.  That prevents the PGs from being active+clean, however,
which prevents the mgr adjusting pgp_num back up even if the user sets the target to
a larger value.

This patch lets the user directly adjust pgp_num_actual.  Note that we still do
not expose access to pg_num_actual, since there are much stricter conditions that
must be true in order to safely make downward adjustments.

Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/MonCommands.h