From: Sage Weil Date: Sat, 16 Mar 2019 20:06:00 +0000 (-0500) Subject: mon/OSDMonitor: allow 'osd pool set pgp_num_actual' X-Git-Tag: v14.2.1~113^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=4dd62dff4c5da4de3d707300ebff32eb8f85f1c9;p=ceph.git 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 (cherry picked from commit 0c6840e219cda053e137a8de8dd04dd348b6ed45) --- diff --git a/src/mon/MonCommands.h b/src/mon/MonCommands.h index 38f605bed9b03..fdbee9dde1689 100644 --- a/src/mon/MonCommands.h +++ b/src/mon/MonCommands.h @@ -996,7 +996,7 @@ COMMAND("osd pool get " \ "get pool parameter ", "osd", "r") COMMAND("osd pool set " \ "name=pool,type=CephPoolname " \ - "name=var,type=CephChoices,strings=size|min_size|pg_num|pgp_num|crush_rule|hashpspool|nodelete|nopgchange|nosizechange|write_fadvise_dontneed|noscrub|nodeep-scrub|hit_set_type|hit_set_period|hit_set_count|hit_set_fpp|use_gmt_hitset|target_max_bytes|target_max_objects|cache_target_dirty_ratio|cache_target_dirty_high_ratio|cache_target_full_ratio|cache_min_flush_age|cache_min_evict_age|min_read_recency_for_promote|min_write_recency_for_promote|fast_read|hit_set_grade_decay_rate|hit_set_search_last_n|scrub_min_interval|scrub_max_interval|deep_scrub_interval|recovery_priority|recovery_op_priority|scrub_priority|compression_mode|compression_algorithm|compression_required_ratio|compression_max_blob_size|compression_min_blob_size|csum_type|csum_min_block|csum_max_block|allow_ec_overwrites|fingerprint_algorithm|pg_autoscale_mode|pg_num_min|target_size_bytes|target_size_ratio " \ + "name=var,type=CephChoices,strings=size|min_size|pg_num|pgp_num|pgp_num_actual|crush_rule|hashpspool|nodelete|nopgchange|nosizechange|write_fadvise_dontneed|noscrub|nodeep-scrub|hit_set_type|hit_set_period|hit_set_count|hit_set_fpp|use_gmt_hitset|target_max_bytes|target_max_objects|cache_target_dirty_ratio|cache_target_dirty_high_ratio|cache_target_full_ratio|cache_min_flush_age|cache_min_evict_age|min_read_recency_for_promote|min_write_recency_for_promote|fast_read|hit_set_grade_decay_rate|hit_set_search_last_n|scrub_min_interval|scrub_max_interval|deep_scrub_interval|recovery_priority|recovery_op_priority|scrub_priority|compression_mode|compression_algorithm|compression_required_ratio|compression_max_blob_size|compression_min_blob_size|csum_type|csum_min_block|csum_max_block|allow_ec_overwrites|fingerprint_algorithm|pg_autoscale_mode|pg_num_min|target_size_bytes|target_size_ratio " \ "name=val,type=CephString " \ "name=yes_i_really_mean_it,type=CephBool,req=false", \ "set pool parameter to ", "osd", "rw")