@@ -30,6 +30,7 @@ Synopsis
3030| **ceph-bluestore-tool** reshard --path *osd path* --sharding *new sharding* [ --sharding-ctrl *control string* ]
3131| **ceph-bluestore-tool** show-sharding --path *osd path*
3232| **ceph-bluestore-tool** trim --path *osd path*
33+ | **ceph-bluestore-tool** zap-device --dev *dev path*
3334
3435
3536Description
@@ -106,7 +107,8 @@ Commands
106107
107108:command: `show-label ` --dev *device * [...]
108109
109- Show device label(s).
110+ Show device label(s).
111+ The label may be printed while an OSD is running.
110112
111113:command: `free-dump ` --path *osd path * [ --allocator block/bluefs-wal/bluefs-db/bluefs-slow ]
112114
@@ -139,6 +141,10 @@ Commands
139141 and allows the drive to perform more efficient internal housekeeping.
140142 If BlueStore runs with discard enabled, this option may not be useful.
141143
144+ :command: `zap-device ` --dev *dev path *
145+
146+ Zeros all device label locations. This effectively makes device appear empty.
147+
142148Options
143149=======
144150
@@ -200,15 +206,19 @@ Useful to provide necessary configuration options when access to monitor/ceph.co
200206Device labels
201207=============
202208
203- Every BlueStore block device has a single block label at the beginning of the
204- device. You can dump the contents of the label with::
209+ Every BlueStore block device has a block label at the beginning of the device.
210+ You can dump the contents of the label with::
205211
206212 ceph-bluestore-tool show-label --dev *device*
207213
208214The main device will have a lot of metadata, including information
209215that used to be stored in small files in the OSD data directory. The
210216auxiliary devices (db and wal) will only have the minimum required
211217fields (OSD UUID, size, device type, birth time).
218+ The main device contains additional label copies at offsets: 1G, 10G, 100G and 1000G.
219+ Corrupted labels are fixed as part of repair::
220+
221+ ceph-bluestore-tool repair --dev *device*
212222
213223OSD directory priming
214224=====================
0 commit comments