From a79904de54dd2b373c189bbbfdfee301a96c2a77 Mon Sep 17 00:00:00 2001 From: Zac Dover Date: Sun, 18 Feb 2024 16:01:46 +1000 Subject: [PATCH] doc/man: edit "manipulating the omap key" Edit the section "Manipulating the Object Map Key" in doc/man/8/ceph-objectstore-tool.rst. Signed-off-by: Zac Dover (cherry picked from commit 44ec668d43951c2710271fb3ca1799c4c4ded940) --- doc/man/8/ceph-objectstore-tool.rst | 41 ++++++++++++++++++----------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/doc/man/8/ceph-objectstore-tool.rst b/doc/man/8/ceph-objectstore-tool.rst index de1304733bc76..9b5436f24ddac 100644 --- a/doc/man/8/ceph-objectstore-tool.rst +++ b/doc/man/8/ceph-objectstore-tool.rst @@ -244,45 +244,56 @@ Procedure Manipulating the Object Map Key ------------------------------- -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. -Note +Use the **ceph-objectstore-tool** utility to change the object map (OMAP) key. +Provide the data path, the placement group identifier (PG ID), the object, and +the key in the OMAP. Prerequisites +^^^^^^^^^^^^^ * Having root access to the Ceph OSD node. * Stopping the ceph-osd daemon. -Procedure +Commands +^^^^^^^^ + +Run the commands in this section as ``root`` on an OSD node. + +* **Getting the object map key** - Get the object map key: + Syntax: - Syntax:: + .. code-block:: ini - ceph-objectstore-tool --data-path $PATH_TO_OSD --pgid $PG_ID $OBJECT get-omap $KEY > $OBJECT_MAP_FILE_NAME + ceph-objectstore-tool --data-path $PATH_TO_OSD --pgid $PG_ID $OBJECT get-omap $KEY > $OBJECT_MAP_FILE_NAME Example:: - [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 + 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 - Set the object map key: +* **Setting the object map key** - Syntax:: + Syntax: + + .. code-block:: ini - ceph-objectstore-tool --data-path $PATH_TO_OSD --pgid $PG_ID $OBJECT set-omap $KEY < $OBJECT_MAP_FILE_NAME + ceph-objectstore-tool --data-path $PATH_TO_OSD --pgid $PG_ID $OBJECT set-omap $KEY < $OBJECT_MAP_FILE_NAME Example:: - [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 + 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 - Remove the object map key: +* **Removing the object map key** - Syntax:: + Syntax: + + .. code-block:: ini - ceph-objectstore-tool --data-path $PATH_TO_OSD --pgid $PG_ID $OBJECT rm-omap $KEY + ceph-objectstore-tool --data-path $PATH_TO_OSD --pgid $PG_ID $OBJECT rm-omap $KEY Example:: - [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 "" + 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 "" Listing an Object's Attributes -- 2.39.5