Skip to content

Commit dfd6329

Browse files
authored
Merge pull request ceph#55633 from zdover23/wip-doc-2024-02-18-man-ceph-objectstore-tool
doc/man: edit "manipulating the omap key" Reviewed-by: Anthony D'Atri <[email protected]>
2 parents 34933f5 + 44ec668 commit dfd6329

File tree

1 file changed

+26
-15
lines changed

1 file changed

+26
-15
lines changed

doc/man/8/ceph-objectstore-tool.rst

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -246,45 +246,56 @@ Procedure
246246
Manipulating the Object Map Key
247247
-------------------------------
248248

249-
Use the **ceph-objectstore-tool** utility to change the object map (OMAP) key. You need to provide the data path, the placement group identifier (PG ID), the object, and the key in the OMAP.
250-
Note
249+
Use the **ceph-objectstore-tool** utility to change the object map (OMAP) key.
250+
Provide the data path, the placement group identifier (PG ID), the object, and
251+
the key in the OMAP.
251252

252253
Prerequisites
254+
^^^^^^^^^^^^^
253255

254256
* Having root access to the Ceph OSD node.
255257
* Stopping the ceph-osd daemon.
256258

257-
Procedure
259+
Commands
260+
^^^^^^^^
261+
262+
Run the commands in this section as ``root`` on an OSD node.
263+
264+
* **Getting the object map key**
258265

259-
Get the object map key:
266+
Syntax:
260267

261-
Syntax::
268+
.. code-block:: ini
262269
263-
ceph-objectstore-tool --data-path $PATH_TO_OSD --pgid $PG_ID $OBJECT get-omap $KEY > $OBJECT_MAP_FILE_NAME
270+
ceph-objectstore-tool --data-path $PATH_TO_OSD --pgid $PG_ID $OBJECT get-omap $KEY > $OBJECT_MAP_FILE_NAME
264271
265272
Example::
266273

267-
[root@osd ~]# ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --pgid 0.1c '{"oid":"zone_info.default","key":"","snapid":-2,"hash":235010478,"max":0,"pool":11,"namespace":""}' get-omap "" > zone_info.default.omap.txt
274+
ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --pgid 0.1c '{"oid":"zone_info.default","key":"","snapid":-2,"hash":235010478,"max":0,"pool":11,"namespace":""}' get-omap "" > zone_info.default.omap.txt
268275

269-
Set the object map key:
276+
* **Setting the object map key**
270277

271-
Syntax::
278+
Syntax:
279+
280+
.. code-block:: ini
272281
273-
ceph-objectstore-tool --data-path $PATH_TO_OSD --pgid $PG_ID $OBJECT set-omap $KEY < $OBJECT_MAP_FILE_NAME
282+
ceph-objectstore-tool --data-path $PATH_TO_OSD --pgid $PG_ID $OBJECT set-omap $KEY < $OBJECT_MAP_FILE_NAME
274283
275284
Example::
276285

277-
[root@osd ~]# ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --pgid 0.1c '{"oid":"zone_info.default","key":"","snapid":-2,"hash":235010478,"max":0,"pool":11,"namespace":""}' set-omap "" < zone_info.default.omap.txt
286+
ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --pgid 0.1c '{"oid":"zone_info.default","key":"","snapid":-2,"hash":235010478,"max":0,"pool":11,"namespace":""}' set-omap "" < zone_info.default.omap.txt
278287

279-
Remove the object map key:
288+
* **Removing the object map key**
280289

281-
Syntax::
290+
Syntax:
291+
292+
.. code-block:: ini
282293
283-
ceph-objectstore-tool --data-path $PATH_TO_OSD --pgid $PG_ID $OBJECT rm-omap $KEY
294+
ceph-objectstore-tool --data-path $PATH_TO_OSD --pgid $PG_ID $OBJECT rm-omap $KEY
284295
285296
Example::
286297

287-
[root@osd ~]# ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --pgid 0.1c '{"oid":"zone_info.default","key":"","snapid":-2,"hash":235010478,"max":0,"pool":11,"namespace":""}' rm-omap ""
298+
ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --pgid 0.1c '{"oid":"zone_info.default","key":"","snapid":-2,"hash":235010478,"max":0,"pool":11,"namespace":""}' rm-omap ""
288299

289300

290301
Listing an Object's Attributes

0 commit comments

Comments
 (0)