From: Zac Dover Date: Sun, 18 Feb 2024 06:01:46 +0000 (+1000) Subject: doc/man: edit "manipulating the omap key" X-Git-Tag: v17.2.8~520^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F55636%2Fhead;p=ceph.git 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) --- diff --git a/doc/man/8/ceph-objectstore-tool.rst b/doc/man/8/ceph-objectstore-tool.rst index 19acc5913201b..b649b1982538e 100644 --- a/doc/man/8/ceph-objectstore-tool.rst +++ b/doc/man/8/ceph-objectstore-tool.rst @@ -248,47 +248,58 @@ 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. If using FileStore as the OSD backend object store, then add the `--journal-path $PATH_TO_JOURNAL` argument when getting, setting or removing the object map key, where the `$PATH_TO_JOURNAL` variable is the absolute path to the OSD journal; for example `/var/lib/ceph/osd/ceph-0/journal`. 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