From b5050352a3f69ed4667dfa1b4eee571d10b82325 Mon Sep 17 00:00:00 2001 From: Adam Kupczyk Date: Thu, 12 Sep 2024 10:46:33 +0000 Subject: [PATCH] tools/ceph-bluestore-tool: Added zap-device documentation - added zap documentation - explained show-label lock exclusion Signed-off-by: Adam Kupczyk (cherry picked from commit afeaeb711fafc55acd1cf056f721c62746ee596f) Conflicts: doc/man/8/ceph-bluestore-tool.rst Trivial conflict with 'trim' feature. --- doc/man/8/ceph-bluestore-tool.rst | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/doc/man/8/ceph-bluestore-tool.rst b/doc/man/8/ceph-bluestore-tool.rst index 8581566559ba6..7e9e3b2e8df0a 100644 --- a/doc/man/8/ceph-bluestore-tool.rst +++ b/doc/man/8/ceph-bluestore-tool.rst @@ -29,6 +29,7 @@ Synopsis | **ceph-bluestore-tool** free-dump|free-score --path *osd path* [ --allocator block/bluefs-wal/bluefs-db/bluefs-slow ] | **ceph-bluestore-tool** reshard --path *osd path* --sharding *new sharding* [ --sharding-ctrl *control string* ] | **ceph-bluestore-tool** show-sharding --path *osd path* +| **ceph-bluestore-tool** zap-device --dev *dev path* Description @@ -107,7 +108,8 @@ Commands :command:`show-label` --dev *device* [...] - Show device label(s). + Show device label(s). + The label may be printed while an OSD is running. :command:`free-dump` --path *osd path* [ --allocator block/bluefs-wal/bluefs-db/bluefs-slow ] @@ -133,6 +135,10 @@ Commands Show sharding that is currently applied to BlueStore's RocksDB. +:command: `zap-device` --dev *dev path* + + Zeros all device label locations. This effectively makes device appear empty. + Options ======= @@ -194,8 +200,8 @@ Useful to provide necessary configuration options when access to monitor/ceph.co Device labels ============= -Every BlueStore block device has a single block label at the beginning of the -device. You can dump the contents of the label with:: +Every BlueStore block device has a block label at the beginning of the device. +You can dump the contents of the label with:: ceph-bluestore-tool show-label --dev *device* @@ -203,6 +209,10 @@ The main device will have a lot of metadata, including information that used to be stored in small files in the OSD data directory. The auxiliary devices (db and wal) will only have the minimum required fields (OSD UUID, size, device type, birth time). +The main device contains additional label copies at offsets: 1G, 10G, 100G and 1000G. +Corrupted labels are fixed as part of repair:: + + ceph-bluestore-tool repair --dev *device* OSD directory priming ===================== -- 2.39.5