From 93e4c56ecc13560e0dad69aaa67afc3ca053fb4c Mon Sep 17 00:00:00 2001 From: Wido den Hollander Date: Tue, 16 Jun 2020 21:50:19 +0200 Subject: [PATCH] osd: Add config option to compact OSD's object store on start By setting this configuration option an OSD will compact it's store's OMAP on start. This way admin's can trigger an offline compaction by setting this configuration value to 'true' and then restarting the OSD. This is easier than using tools like 'ceph-kvstore-tool' with requires more manual work on the CLI and might be more difficult for users. Signed-off-by: Wido den Hollander --- PendingReleaseNotes | 4 ++++ src/common/options.cc | 4 ++++ src/osd/OSD.cc | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/PendingReleaseNotes b/PendingReleaseNotes index c487313ee4b34..b88f6001b8a86 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -92,3 +92,7 @@ ceph fs required_client_features add ceph fs required_client_features rm ceph fs feature ls + +* OSD: A new configuration option ``osd_compact_on_start`` has been added which triggers + an OSD compaction on start. Setting this option to ``true`` and restarting an OSD + will result in an offline compaction of the OSD prior to booting. diff --git a/src/common/options.cc b/src/common/options.cc index 0d7c6880e9ed2..3ff9807aca282 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -2514,6 +2514,10 @@ std::vector