Listing object attributes

Use the ceph-objectstore-tool utility to list object attributes.

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

The output provides you with the object’s keys and values.

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 attributes.
    ceph-objectstore-tool --data-path PATH_TO_OSD \
    --pgid PG_ID OBJECT \
    list-attrs
    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-attrs