Use the ceph-objectstore-tool utility to remove an object. By removing
an object, its contents and references are removed from the placement group (PG).
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
Important: You cannot recreate an object after it is removed.
Procedure
- Log in to the OSD container.
cephadm shell --name osd.OSD_ID
For
example,
[root@host01 ~]# cephadm shell --name osd.0
- Remove an object.
ceph-objectstore-tool --data-path PATH_TO_OSD --pgid PG_ID \
OBJECT \
remove
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":""}' \
remove