From 2a1cba8ce4bb1da2eae054bb2e00eac7d279fbd5 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 23 Mar 2021 11:56:59 -0500 Subject: [PATCH] os/bluestore: separate omap per-pool vs per-pg alerts Currently the health alert raised does not match the docs, and the docs do not describe what the health alert indicates. Octopus added per-pool omap storage. This improves space accounting and reporting. Pacific added per-pg omap storage (object hash in key). This speeds up PG removal. Separate everthing out into two distinct alerts raised from bluestore and surfaced as health alerts, with corresponding config options to disable, and update the docs accordingly. Also update the fsck options for warn vs error, and raise separate errors for the per-pg and per-pool cases. Signed-off-by: Sage Weil (cherry picked from commit f755e353e88b65fb923289464935ec635daf13b2) --- doc/rados/operations/health-checks.rst | 19 ++++++++ src/common/legacy_config_opts.h | 2 + src/common/options.cc | 8 ++++ src/mon/PGMap.cc | 4 +- src/os/bluestore/BlueStore.cc | 62 +++++++++++++++++++++----- src/os/bluestore/BlueStore.h | 3 +- 6 files changed, 84 insertions(+), 14 deletions(-) diff --git a/doc/rados/operations/health-checks.rst b/doc/rados/operations/health-checks.rst index c84efa155197c..242858718d2d6 100644 --- a/doc/rados/operations/health-checks.rst +++ b/doc/rados/operations/health-checks.rst @@ -511,6 +511,25 @@ This warning can be disabled with:: ceph config set global bluestore_warn_on_no_per_pool_omap false +BLUESTORE_NO_PER_PG_OMAP +__________________________ + +Starting with the Pacific release, BlueStore tracks omap space utilization +by PG, and one or more OSDs have volumes that were created prior to +Pacific. Per-PG omap enables faster PG removal when PGs migrate. + +The older OSDs can be updated to track by PG by stopping each OSD, +running a repair operation, and the restarting it. For example, if +``osd.123`` needed to be updated,:: + + systemctl stop ceph-osd@123 + ceph-bluestore-tool repair --path /var/lib/ceph/osd/ceph-123 + systemctl start ceph-osd@123 + +This warning can be disabled with:: + + ceph config set global bluestore_warn_on_no_per_pg_omap false + BLUESTORE_DISK_SIZE_MISMATCH ____________________________ diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index 88114a8ae9756..5f5a575fc7b18 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -1041,7 +1041,9 @@ OPTION(bluestore_warn_on_bluefs_spillover, OPT_BOOL) OPTION(bluestore_warn_on_legacy_statfs, OPT_BOOL) OPTION(bluestore_warn_on_spurious_read_errors, OPT_BOOL) OPTION(bluestore_fsck_error_on_no_per_pool_omap, OPT_BOOL) +OPTION(bluestore_fsck_error_on_no_per_pg_omap, OPT_BOOL) OPTION(bluestore_warn_on_no_per_pool_omap, OPT_BOOL) +OPTION(bluestore_warn_on_no_per_pg_omap, OPT_BOOL) OPTION(bluestore_log_op_age, OPT_DOUBLE) OPTION(bluestore_log_omap_iterator_age, OPT_DOUBLE) OPTION(bluestore_log_collection_list_age, OPT_DOUBLE) diff --git a/src/common/options.cc b/src/common/options.cc index 6f33372873aef..f166a5e3d6908 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -4816,10 +4816,18 @@ std::vector