Listing object map

Use the ceph-objectstore-tool utility to list the contents of the object map (OMAP).

Before you begin

Before you begin, make sure that you have the following prerequisites in place:
  • Root-level access to the Ceph OSD node.
  • Stopping the ceph-osd daemon.

About this task

Listing the contents of the OMAP provides a list of keys.

Procedure

  1. Verify that the appropriate OSD is down.
    systemctl status ceph-osd@OSD_ID
    For example,
    [root@host01 ~]# systemctl status ceph-osd@1
  2. Log in to the OSD container.
    cephadm shell --name osd.OSD_ID
    For example,
    [root@host01 ~]# cephadm shell --name osd.0
  3. List the object map.
    ceph-objectstore-tool --data-path PATH_TO_OSD --pgid PG_ID OBJECT list-omap
    For example,
    [ceph: root@host01 /]# 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":""}' \
    list-omap