mirror of
https://github.com/ceph/ceph
synced 2025-01-03 09:32:43 +00:00
402d2eacbc
The current documentation tries really hard to convince people to set both `osd_pool_default_pg_num` and `osd_pool_default_pgp_num` in their configs, but at least the latter has undesirable side effects on any Ceph version that has PG autoscaling enabled by default (at least quincy and beyond). Assume a cluster with defaults of `64` for `pg_num` and `pgp_num`. Starting `radosgw` will fail as it tries to create various pools without providing values for `pg_num` or `pgp_num`. This triggers the following in `OSDMonitor::prepare_new_pool()`: - `pg_num` is set to `1`, because autoscaling is enabled - `pgp_num` is set to `osd pool default pgp_num`, which we set to `64` - This is an invalid setup, so the pool creation fails Likewise, `ceph osd pool create mypool` (without providing values for `pg_num` or `pgp_num`) does not work. Following this rationale: - Not providing a default value for `pgp_num` will always do the right thing, unless you use advanced features, in which case you can be expected to set both values on pool creation - Setting `osd_pool_default_pgp_num` in your config breaks pool creation for various cases This commit: - Removes `osd_pool_default_pgp_num` from all example configs - Adds mentions of the autoscaling and how it interacts with the default values in various places For each file that was touched, the following maintenance was also performed: - Change interternal spaces to underscores for config values - Remove mentions of filestore or any of its settings - Fix minor inconsistencies, like indentation etc. There is also a ticket which I think is very relevant and fixed by this, though it only captures part of the broader issue addressed here: Fixes: https://tracker.ceph.com/issues/47176 Signed-off-by: Conrad Hoffmann <ch@bitfehler.net>
22 lines
1.1 KiB
Plaintext
22 lines
1.1 KiB
Plaintext
[global]
|
|
|
|
# By default, Ceph makes three replicas of RADOS objects. If you want
|
|
# to maintain four copies of an object the default value--a primary
|
|
# copy and three replica copies--reset the default values as shown in
|
|
# 'osd_pool_default_size'. If you want to allow Ceph to accept an I/O
|
|
# operation to a degraded PG, set 'osd_pool_default_min_size' to a
|
|
# number less than the 'osd_pool_default_size' value.
|
|
|
|
osd_pool_default_size = 3 # Write an object three times.
|
|
osd_pool_default_min_size = 2 # Accept an I/O operation to a PG that has two copies of an object.
|
|
|
|
# Note: by default, PG autoscaling is enabled and this value is used only
|
|
# in specific circumstances. It is however still recommend to set it.
|
|
# Ensure you have a realistic number of placement groups. We recommend
|
|
# approximately 100 per OSD. E.g., total number of OSDs multiplied by 100
|
|
# divided by the number of replicas (i.e., 'osd_pool_default_size'). So for
|
|
# 10 OSDs and 'osd_pool_default_size' = 4, we'd recommend approximately
|
|
# (100 * 10) / 4 = 250.
|
|
# Always use the nearest power of two.
|
|
osd_pool_default_pg_num = 256
|