Chapter 10. Troubleshooting Ceph objects
As a storage administrator, you can use the ceph-objectstore-tool
utility to perform high-level or low-level object operations. The ceph-objectstore-tool
utility can help you troubleshoot problems related to objects within a particular OSD or placement group.
You can also start OSD containers in rescue/maintenance mode to repair OSDs without installing Ceph packages on the OSD node.
Manipulating objects can cause unrecoverable data loss. Contact Red Hat support before using the ceph-objectstore-tool
utility.
10.1. Prerequisites Copy linkLink copied to clipboard!
- Verify there are no network-related issues.
10.2. Troubleshooting Ceph objects in a containerized environment Copy linkLink copied to clipboard!
The OSD container can be started in rescue/maintenance mode to repair OSDs in Red Hat Ceph Storage 4 without installing Ceph packages on the OSD node.
You can use ceph-bluestore-tool
to run consistency check with fsck
command, or to run consistency check and repair any errors with repair
command.
This procedure is specific to containerized deployments only. Skip this section for bare-metal deployments
Prerequisites
- A running Red Hat Ceph Storage cluster.
- Root-level access to the Ceph OSD node.
-
Stopping the
ceph-osd
daemon.
Procedure
Set
noout
flag on cluster.Example
ceph osd set noout
[root@mon ~]# ceph osd set noout
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Login to the node hosting the OSD container.
Backup
/etc/systemd/system/ceph-osd@.service
unit file to/root
directory.Example
cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.backup
[root@osd ~]# cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.backup
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Move
/run/ceph-osd@OSD_ID.service-cid
file to/root
.Example
mv /run/ceph-osd@0.service-cid /root
[root@osd ~]# mv /run/ceph-osd@0.service-cid /root
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Edit
/etc/systemd/system/ceph-osd@.service
unit file and add-it --entrypoint /bin/bash
option to podman command.Example
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Reload
systemd
manager configuration.Example
systemctl daemon-reload
[root@osd ~]# systemctl daemon-reload
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the OSD service associated with the
OSD_ID
.Syntax
systemctl restart ceph-osd@OSD_ID.service
systemctl restart ceph-osd@OSD_ID.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace
OSD_ID
with the ID of the OSD.Example
systemctl restart ceph-osd@0.service
[root@osd ~]# systemctl restart ceph-osd@0.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Login to the container associated with the
OSD_ID
.Syntax
podman exec -it ceph-osd-OSD_ID /bin/bash
podman exec -it ceph-osd-OSD_ID /bin/bash
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
podman exec -it ceph-osd-0 /bin/bash
[root@osd ~]# podman exec -it ceph-osd-0 /bin/bash
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Get
osd fsid
and activate the OSD to mount OSD’s logical volume (LV).Syntax
ceph-volume lvm list |grep -A15 "osd\.OSD_ID"|grep "osd fsid" ceph-volume lvm activate --bluestore OSD_ID OSD_FSID
ceph-volume lvm list |grep -A15 "osd\.OSD_ID"|grep "osd fsid" ceph-volume lvm activate --bluestore OSD_ID OSD_FSID
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run
fsck
andrepair
commands.Syntax
ceph-bluestore-tool fsck --path /var/lib/ceph/osd/ceph-OSD_ID ceph-bluestore-tool repair --path /var/lib/ceph/osd/ceph-OSD_ID
ceph-bluestore-tool fsck --path /var/lib/ceph/osd/ceph-OSD_ID ceph-bluestore-tool repair --path /var/lib/ceph/osd/ceph-OSD_ID
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
ceph-bluestore-tool fsck --path /var/lib/ceph/osd/ceph-0
[root@osd ~]# ceph-bluestore-tool fsck --path /var/lib/ceph/osd/ceph-0 fsck success
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ceph-bluestore-tool repair --path /var/lib/ceph/osd/ceph-0
[root@osd ~]# ceph-bluestore-tool repair --path /var/lib/ceph/osd/ceph-0 repair success
Copy to Clipboard Copied! Toggle word wrap Toggle overflow After exiting the container, copy
/etc/systemd/system/ceph-osd@.service
unit file from/root
directory.Example
cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.modified cp /root/ceph-osd@.service.backup /etc/systemd/system/ceph-osd@.service
[root@osd ~]# cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.modified [root@osd ~]# cp /root/ceph-osd@.service.backup /etc/systemd/system/ceph-osd@.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Reload
systemd
manager configuration.Example
systemctl daemon-reload
[root@osd ~]# systemctl daemon-reload
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Move
/run/ceph-osd@OSD_ID.service-cid
file to/tmp
.Example
mv /run/ceph-osd@0.service-cid /tmp
[root@osd ~]# mv /run/ceph-osd@0.service-cid /tmp
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the OSD service associated with the
OSD_ID
.Syntax
systemctl restart ceph-osd@OSD_ID.service
[root@osd ~]# systemctl restart ceph-osd@OSD_ID.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
systemctl restart ceph-osd@0.service
[root@osd ~]# systemctl restart ceph-osd@0.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.3. Troubleshooting high-level object operations Copy linkLink copied to clipboard!
As a storage administrator, you can use the ceph-objectstore-tool
utility to perform high-level object operations. The ceph-objectstore-tool
utility supports the following high-level object operations:
- List objects
- List lost objects
- Fix lost objects
Manipulating objects can cause unrecoverable data loss. Contact Red Hat support before using the ceph-objectstore-tool
utility.
10.3.1. Prerequisites Copy linkLink copied to clipboard!
- Root-level access to the Ceph OSD nodes.
10.3.2. Listing objects Copy linkLink copied to clipboard!
The OSD can contain zero to many placement groups, and zero to many objects within a placement group (PG). The ceph-objectstore-tool
utility allows you to list objects stored within an OSD.
Prerequisites
- Root-level access to the Ceph OSD node.
-
Stopping the
ceph-osd
daemon.
Procedure
Verify the appropriate OSD is down:
systemctl status ceph-osd@OSD_NUMBER
[root@osd ~]# systemctl status ceph-osd@OSD_NUMBER
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
systemctl status ceph-osd@1
[root@osd ~]# systemctl status ceph-osd@1
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For containerized deployments, to access the bluestore tool, follow the below steps:
Set
noout
flag on cluster.Example
ceph osd set noout
[root@mon ~]# ceph osd set noout
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Login to the node hosting the OSD container.
Backup
/etc/systemd/system/ceph-osd@.service
unit file to/root
directory.Example
cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.backup
[root@osd ~]# cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.backup
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Move
/run/ceph-osd@OSD_ID.service-cid
file to/root
.Example
mv /run/ceph-osd@0.service-cid /root
[root@osd ~]# mv /run/ceph-osd@0.service-cid /root
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Edit
/etc/systemd/system/ceph-osd@.service
unit file and add-it --entrypoint /bin/bash
option to podman command.Example
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Reload
systemd
manager configuration.Example
systemctl daemon-reload
[root@osd ~]# systemctl daemon-reload
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the OSD service associated with the
OSD_ID
.Syntax
systemctl restart ceph-osd@OSD_ID.service
systemctl restart ceph-osd@OSD_ID.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace
OSD_ID
with the ID of the OSD.Example
systemctl restart ceph-osd@0.service
[root@osd ~]# systemctl restart ceph-osd@0.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Login to the container associated with the
OSD_ID
.Syntax
podman exec -it ceph-osd-OSD_ID /bin/bash
podman exec -it ceph-osd-OSD_ID /bin/bash
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
podman exec -it ceph-osd-0 /bin/bash
[root@osd ~]# podman exec -it ceph-osd-0 /bin/bash
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Get
osd fsid
and activate the OSD to mount OSD’s logical volume (LV).Syntax
ceph-volume lvm list |grep -A15 "osd\.OSD_ID"|grep "osd fsid" ceph-volume lvm activate --bluestore OSD_ID OSD_FSID
ceph-volume lvm list |grep -A15 "osd\.OSD_ID"|grep "osd fsid" ceph-volume lvm activate --bluestore OSD_ID OSD_FSID
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Identify all the objects within an OSD, regardless of their placement group:
ceph-objectstore-tool --data-path PATH_TO_OSD --op list
[root@osd ~]# ceph-objectstore-tool --data-path PATH_TO_OSD --op list
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --op list
[root@osd ~]# ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --op list
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Identify all the objects within a placement group:
ceph-objectstore-tool --data-path PATH_TO_OSD --pgid PG_ID --op list
[root@osd ~]# ceph-objectstore-tool --data-path PATH_TO_OSD --pgid PG_ID --op list
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --pgid 0.1c --op list
[root@osd ~]# ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --pgid 0.1c --op list
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Identify the PG an object belongs to:
ceph-objectstore-tool --data-path PATH_TO_OSD --op list OBJECT_ID
[root@osd ~]# ceph-objectstore-tool --data-path PATH_TO_OSD --op list OBJECT_ID
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --op list default.region
[root@osd ~]# ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --op list default.region
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For containerized deployments, to revert the changes, follow the below steps:
After exiting the container, copy
/etc/systemd/system/ceph-osd@.service
unit file from/root
directory.Example
cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.modified cp /root/ceph-osd@.service.backup /etc/systemd/system/ceph-osd@.service
[root@osd ~]# cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.modified [root@osd ~]# cp /root/ceph-osd@.service.backup /etc/systemd/system/ceph-osd@.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Reload
systemd
manager configuration.Example
systemctl daemon-reload
[root@osd ~]# systemctl daemon-reload
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Move
/run/ceph-osd@OSD_ID.service-cid
file to/tmp
.Example
mv /run/ceph-osd@0.service-cid /tmp
[root@osd ~]# mv /run/ceph-osd@0.service-cid /tmp
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the OSD service associated with the
OSD_ID
.Syntax
systemctl restart ceph-osd@OSD_ID.service
[root@osd ~]# systemctl restart ceph-osd@OSD_ID.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
systemctl restart ceph-osd@0.service
[root@osd ~]# systemctl restart ceph-osd@0.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.3.3. Listing lost objects Copy linkLink copied to clipboard!
An OSD can mark objects as lost or unfound. You can use the ceph-objectstore-tool
to list the lost and unfound objects stored within an OSD.
Prerequisites
- Root-level access to the Ceph OSD node.
-
Stopping the
ceph-osd
daemon.
Procedure
Verify the appropriate OSD is down:
systemctl status ceph-osd@OSD_NUMBER
[root@osd ~]# systemctl status ceph-osd@OSD_NUMBER
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
systemctl status ceph-osd@1
[root@osd ~]# systemctl status ceph-osd@1
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For containerized deployments, to access the bluestore tool, follow the below steps:
Set
noout
flag on cluster.Example
ceph osd set noout
[root@mon ~]# ceph osd set noout
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Login to the node hosting the OSD container.
Backup
/etc/systemd/system/ceph-osd@.service
unit file to/root
directory.Example
cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.backup
[root@osd ~]# cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.backup
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Move
/run/ceph-osd@OSD_ID.service-cid
file to/root
.Example
mv /run/ceph-osd@0.service-cid /root
[root@osd ~]# mv /run/ceph-osd@0.service-cid /root
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Edit
/etc/systemd/system/ceph-osd@.service
unit file and add-it --entrypoint /bin/bash
option to podman command.Example
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Reload
systemd
manager configuration.Example
systemctl daemon-reload
[root@osd ~]# systemctl daemon-reload
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the OSD service associated with the
OSD_ID
.Syntax
systemctl restart ceph-osd@OSD_ID.service
systemctl restart ceph-osd@OSD_ID.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace
OSD_ID
with the ID of the OSD.Example
systemctl restart ceph-osd@0.service
[root@osd ~]# systemctl restart ceph-osd@0.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Login to the container associated with the
OSD_ID
.Syntax
podman exec -it ceph-osd-OSD_ID /bin/bash
podman exec -it ceph-osd-OSD_ID /bin/bash
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
podman exec -it ceph-osd-0 /bin/bash
[root@osd ~]# podman exec -it ceph-osd-0 /bin/bash
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Get
osd fsid
and activate the OSD to mount OSD’s logical volume (LV).Syntax
ceph-volume lvm list |grep -A15 "osd\.OSD_ID"|grep "osd fsid" ceph-volume lvm activate --bluestore OSD_ID OSD_FSID
ceph-volume lvm list |grep -A15 "osd\.OSD_ID"|grep "osd fsid" ceph-volume lvm activate --bluestore OSD_ID OSD_FSID
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Use the
ceph-objectstore-tool
utility to list lost and unfound objects. Select the appropriate circumstance:To list all the lost objects:
ceph-objectstore-tool --data-path PATH_TO_OSD --op list-lost
[root@osd ~]# ceph-objectstore-tool --data-path PATH_TO_OSD --op list-lost
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --op list-lost
[root@osd ~]# ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --op list-lost
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To list all the lost objects within a placement group:
ceph-objectstore-tool --data-path PATH_TO_OSD --pgid PG_ID --op list-lost
[root@osd ~]# ceph-objectstore-tool --data-path PATH_TO_OSD --pgid PG_ID --op list-lost
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --pgid 0.1c --op list-lost
[root@osd ~]# ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --pgid 0.1c --op list-lost
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To list a lost object by its identifier:
ceph-objectstore-tool --data-path PATH_TO_OSD --op list-lost OBJECT_ID
[root@osd ~]# ceph-objectstore-tool --data-path PATH_TO_OSD --op list-lost OBJECT_ID
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --op list-lost default.region
[root@osd ~]# ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --op list-lost default.region
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
For containerized deployments, to revert the changes, follow the below steps:
After exiting the container, copy
/etc/systemd/system/ceph-osd@.service
unit file from/root
directory.Example
cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.modified cp /root/ceph-osd@.service.backup /etc/systemd/system/ceph-osd@.service
[root@osd ~]# cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.modified [root@osd ~]# cp /root/ceph-osd@.service.backup /etc/systemd/system/ceph-osd@.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Reload
systemd
manager configuration.Example
systemctl daemon-reload
[root@osd ~]# systemctl daemon-reload
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Move
/run/ceph-osd@OSD_ID.service-cid
file to/tmp
.Example
mv /run/ceph-osd@0.service-cid /tmp
[root@osd ~]# mv /run/ceph-osd@0.service-cid /tmp
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the OSD service associated with the
OSD_ID
.Syntax
systemctl restart ceph-osd@OSD_ID.service
[root@osd ~]# systemctl restart ceph-osd@OSD_ID.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
systemctl restart ceph-osd@0.service
[root@osd ~]# systemctl restart ceph-osd@0.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.3.4. Fixing lost objects Copy linkLink copied to clipboard!
You can use the ceph-objectstore-tool
utility to list and fix lost and unfound objects stored within a Ceph OSD. This procedure applies only to legacy objects.
Prerequisites
- Root-level access to the Ceph OSD node.
-
Stopping the
ceph-osd
daemon.
Procedure
Verify the appropriate OSD is down:
Syntax
systemctl status ceph-osd@OSD_NUMBER
[root@osd ~]# systemctl status ceph-osd@OSD_NUMBER
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
systemctl status ceph-osd@1
[root@osd ~]# systemctl status ceph-osd@1
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For containerized deployments, to access the bluestore tool, follow the below steps:
Set
noout
flag on cluster.Example
ceph osd set noout
[root@mon ~]# ceph osd set noout
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Login to the node hosting the OSD container.
Backup
/etc/systemd/system/ceph-osd@.service
unit file to/root
directory.Example
cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.backup
[root@osd ~]# cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.backup
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Move
/run/ceph-osd@OSD_ID.service-cid
file to/root
.Example
mv /run/ceph-osd@0.service-cid /root
[root@osd ~]# mv /run/ceph-osd@0.service-cid /root
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Edit
/etc/systemd/system/ceph-osd@.service
unit file and add-it --entrypoint /bin/bash
option to podman command.Example
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Reload
systemd
manager configuration.Example
systemctl daemon-reload
[root@osd ~]# systemctl daemon-reload
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the OSD service associated with the
OSD_ID
.Syntax
systemctl restart ceph-osd@OSD_ID.service
systemctl restart ceph-osd@OSD_ID.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace
OSD_ID
with the ID of the OSD.Example
systemctl restart ceph-osd@0.service
[root@osd ~]# systemctl restart ceph-osd@0.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Login to the container associated with the
OSD_ID
.Syntax
podman exec -it ceph-osd-OSD_ID /bin/bash
podman exec -it ceph-osd-OSD_ID /bin/bash
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
podman exec -it ceph-osd-0 /bin/bash
[root@osd ~]# podman exec -it ceph-osd-0 /bin/bash
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Get
osd fsid
and activate the OSD to mount OSD’s logical volume (LV).Syntax
ceph-volume lvm list |grep -A15 "osd\.OSD_ID"|grep "osd fsid" ceph-volume lvm activate --bluestore OSD_ID OSD_FSID
ceph-volume lvm list |grep -A15 "osd\.OSD_ID"|grep "osd fsid" ceph-volume lvm activate --bluestore OSD_ID OSD_FSID
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
To list all the lost legacy objects:
Syntax
ceph-objectstore-tool --data-path PATH_TO_OSD --op fix-lost --dry-run
ceph-objectstore-tool --data-path PATH_TO_OSD --op fix-lost --dry-run
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --op fix-lost --dry-run
[root@osd ~]# ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --op fix-lost --dry-run
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Use the
ceph-objectstore-tool
utility to fix lost and unfound objects as aceph
user. Select the appropriate circumstance:To fix all lost objects:
Syntax
su - ceph -c 'ceph-objectstore-tool --data-path PATH_TO_OSD --op fix-lost'
su - ceph -c 'ceph-objectstore-tool --data-path PATH_TO_OSD --op fix-lost'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
su - ceph -c 'ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --op fix-lost'
[root@osd ~]# su - ceph -c 'ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --op fix-lost'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To fix all the lost objects within a placement group:
su - ceph -c 'ceph-objectstore-tool --data-path _PATH_TO_OSD_ --pgid _PG_ID_ --op fix-lost'
su - ceph -c 'ceph-objectstore-tool --data-path _PATH_TO_OSD_ --pgid _PG_ID_ --op fix-lost'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
su - ceph -c 'ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --pgid 0.1c --op fix-lost'
[root@osd ~]# su - ceph -c 'ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --pgid 0.1c --op fix-lost'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To fix a lost object by its identifier:
Syntax
su - ceph -c 'ceph-objectstore-tool --data-path PATH_TO_OSD --op fix-lost OBJECT_ID'
su - ceph -c 'ceph-objectstore-tool --data-path PATH_TO_OSD --op fix-lost OBJECT_ID'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
su - ceph -c 'ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --op fix-lost default.region'
[root@osd ~]# su - ceph -c 'ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --op fix-lost default.region'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
For containerized deployments, to revert the changes, follow the below steps:
After exiting the container, copy
/etc/systemd/system/ceph-osd@.service
unit file from/root
directory.Example
cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.modified cp /root/ceph-osd@.service.backup /etc/systemd/system/ceph-osd@.service
[root@osd ~]# cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.modified [root@osd ~]# cp /root/ceph-osd@.service.backup /etc/systemd/system/ceph-osd@.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Reload
systemd
manager configuration.Example
systemctl daemon-reload
[root@osd ~]# systemctl daemon-reload
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Move
/run/ceph-osd@OSD_ID.service-cid
file to/tmp
.Example
mv /run/ceph-osd@0.service-cid /tmp
[root@osd ~]# mv /run/ceph-osd@0.service-cid /tmp
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the OSD service associated with the
OSD_ID
.Syntax
systemctl restart ceph-osd@OSD_ID.service
[root@osd ~]# systemctl restart ceph-osd@OSD_ID.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
systemctl restart ceph-osd@0.service
[root@osd ~]# systemctl restart ceph-osd@0.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.4. Troubleshooting low-level object operations Copy linkLink copied to clipboard!
As a storage administrator, you can use the ceph-objectstore-tool
utility to perform low-level object operations. The ceph-objectstore-tool
utility supports the following low-level object operations:
- Manipulate the object’s content
- Remove an object
- List the object map (OMAP)
- Manipulate the OMAP header
- Manipulate the OMAP key
- List the object’s attributes
- Manipulate the object’s attribute key
Manipulating objects can cause unrecoverable data loss. Contact Red Hat support before using the ceph-objectstore-tool
utility.
10.4.1. Prerequisites Copy linkLink copied to clipboard!
- Root-level access to the Ceph OSD nodes.
10.4.2. Manipulating the object’s content Copy linkLink copied to clipboard!
With the ceph-objectstore-tool
utility, you can get or set bytes on an object.
Setting the bytes on an object can cause unrecoverable data loss. To prevent data loss, make a backup copy of the object.
Prerequisites
- Root-level access to the Ceph OSD node.
-
Stopping the
ceph-osd
daemon.
Procedure
Verify the appropriate OSD is down:
systemctl status ceph-osd@$OSD_NUMBER
[root@osd ~]# systemctl status ceph-osd@$OSD_NUMBER
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
systemctl status ceph-osd@1
[root@osd ~]# systemctl status ceph-osd@1
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For containerized deployments, to access the bluestore tool, follow the below steps:
Set
noout
flag on cluster.Example
ceph osd set noout
[root@mon ~]# ceph osd set noout
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Login to the node hosting the OSD container.
Backup
/etc/systemd/system/ceph-osd@.service
unit file to/root
directory.Example
cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.backup
[root@osd ~]# cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.backup
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Move
/run/ceph-osd@OSD_ID.service-cid
file to/root
.Example
mv /run/ceph-osd@0.service-cid /root
[root@osd ~]# mv /run/ceph-osd@0.service-cid /root
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Edit
/etc/systemd/system/ceph-osd@.service
unit file and add-it --entrypoint /bin/bash
option to podman command.Example
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Reload
systemd
manager configuration.Example
systemctl daemon-reload
[root@osd ~]# systemctl daemon-reload
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the OSD service associated with the
OSD_ID
.Syntax
systemctl restart ceph-osd@OSD_ID.service
systemctl restart ceph-osd@OSD_ID.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace
OSD_ID
with the ID of the OSD.Example
systemctl restart ceph-osd@0.service
[root@osd ~]# systemctl restart ceph-osd@0.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Login to the container associated with the
OSD_ID
.Syntax
podman exec -it ceph-osd-OSD_ID /bin/bash
podman exec -it ceph-osd-OSD_ID /bin/bash
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
podman exec -it ceph-osd-0 /bin/bash
[root@osd ~]# podman exec -it ceph-osd-0 /bin/bash
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Get
osd fsid
and activate the OSD to mount OSD’s logical volume (LV).Syntax
ceph-volume lvm list |grep -A15 "osd\.OSD_ID"|grep "osd fsid" ceph-volume lvm activate --bluestore OSD_ID OSD_FSID
ceph-volume lvm list |grep -A15 "osd\.OSD_ID"|grep "osd fsid" ceph-volume lvm activate --bluestore OSD_ID OSD_FSID
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- Find the object by listing the objects of the OSD or placement group (PG).
Before setting the bytes on an object, make a backup and a working copy of the object:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Edit the working copy object file and modify the object contents accordingly.
Set the bytes of the object:
ceph-objectstore-tool --data-path PATH_TO_OSD --pgid PG_ID \ OBJECT \ set-bytes < OBJECT_FILE_NAME
[root@osd ~]# ceph-objectstore-tool --data-path PATH_TO_OSD --pgid PG_ID \ OBJECT \ set-bytes < OBJECT_FILE_NAME
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
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-bytes < zone_info.default.working-copy
[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-bytes < zone_info.default.working-copy
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For containerized deployments, to revert the changes, follow the below steps:
After exiting the container, copy
/etc/systemd/system/ceph-osd@.service
unit file from/root
directory.Example
cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.modified cp /root/ceph-osd@.service.backup /etc/systemd/system/ceph-osd@.service
[root@osd ~]# cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.modified [root@osd ~]# cp /root/ceph-osd@.service.backup /etc/systemd/system/ceph-osd@.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Reload
systemd
manager configuration.Example
systemctl daemon-reload
[root@osd ~]# systemctl daemon-reload
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Move
/run/ceph-osd@OSD_ID.service-cid
file to/tmp
.Example
mv /run/ceph-osd@0.service-cid /tmp
[root@osd ~]# mv /run/ceph-osd@0.service-cid /tmp
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the OSD service associated with the
OSD_ID
.Syntax
systemctl restart ceph-osd@OSD_ID.service
[root@osd ~]# systemctl restart ceph-osd@OSD_ID.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
systemctl restart ceph-osd@0.service
[root@osd ~]# systemctl restart ceph-osd@0.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.4.3. Removing an object Copy linkLink copied to clipboard!
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).
You cannot recreate an object once it is removed.
Prerequisites
- Root-level access to the Ceph OSD node.
-
Stopping the
ceph-osd
daemon.
Procedure
Verify the appropriate OSD is down:
systemctl status ceph-osd@$OSD_NUMBER
[root@osd ~]# systemctl status ceph-osd@$OSD_NUMBER
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
systemctl status ceph-osd@1
[root@osd ~]# systemctl status ceph-osd@1
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For containerized deployments, to access the bluestore tool, follow the below steps:
Set
noout
flag on cluster.Example
ceph osd set noout
[root@mon ~]# ceph osd set noout
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Login to the node hosting the OSD container.
Backup
/etc/systemd/system/ceph-osd@.service
unit file to/root
directory.Example
cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.backup
[root@osd ~]# cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.backup
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Move
/run/ceph-osd@OSD_ID.service-cid
file to/root
.Example
mv /run/ceph-osd@0.service-cid /root
[root@osd ~]# mv /run/ceph-osd@0.service-cid /root
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Edit
/etc/systemd/system/ceph-osd@.service
unit file and add-it --entrypoint /bin/bash
option to podman command.Example
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Reload
systemd
manager configuration.Example
systemctl daemon-reload
[root@osd ~]# systemctl daemon-reload
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the OSD service associated with the
OSD_ID
.Syntax
systemctl restart ceph-osd@OSD_ID.service
systemctl restart ceph-osd@OSD_ID.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace
OSD_ID
with the ID of the OSD.Example
systemctl restart ceph-osd@0.service
[root@osd ~]# systemctl restart ceph-osd@0.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Login to the container associated with the
OSD_ID
.Syntax
podman exec -it ceph-osd-OSD_ID /bin/bash
podman exec -it ceph-osd-OSD_ID /bin/bash
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
podman exec -it ceph-osd-0 /bin/bash
[root@osd ~]# podman exec -it ceph-osd-0 /bin/bash
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Get
osd fsid
and activate the OSD to mount OSD’s logical volume (LV).Syntax
ceph-volume lvm list |grep -A15 "osd\.OSD_ID"|grep "osd fsid" ceph-volume lvm activate --bluestore OSD_ID OSD_FSID
ceph-volume lvm list |grep -A15 "osd\.OSD_ID"|grep "osd fsid" ceph-volume lvm activate --bluestore OSD_ID OSD_FSID
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Remove an object:
Syntax
ceph-objectstore-tool --data-path PATH_TO_OSD --pgid PG_ID \ OBJECT \ remove
ceph-objectstore-tool --data-path PATH_TO_OSD --pgid PG_ID \ OBJECT \ remove
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
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
[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":""}' \ remove
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For containerized deployments, to revert the changes, follow the below steps:
After exiting the container, copy
/etc/systemd/system/ceph-osd@.service
unit file from/root
directory.Example
cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.modified cp /root/ceph-osd@.service.backup /etc/systemd/system/ceph-osd@.service
[root@osd ~]# cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.modified [root@osd ~]# cp /root/ceph-osd@.service.backup /etc/systemd/system/ceph-osd@.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Reload
systemd
manager configuration.Example
systemctl daemon-reload
[root@osd ~]# systemctl daemon-reload
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Move
/run/ceph-osd@OSD_ID.service-cid
file to/tmp
.Example
mv /run/ceph-osd@0.service-cid /tmp
[root@osd ~]# mv /run/ceph-osd@0.service-cid /tmp
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the OSD service associated with the
OSD_ID
.Syntax
systemctl restart ceph-osd@OSD_ID.service
[root@osd ~]# systemctl restart ceph-osd@OSD_ID.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
systemctl restart ceph-osd@0.service
[root@osd ~]# systemctl restart ceph-osd@0.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.4.4. Listing the object map Copy linkLink copied to clipboard!
Use the ceph-objectstore-tool
utility to list the contents of the object map (OMAP). The output provides you a list of keys.
Prerequisites
- Root-level access to the Ceph OSD node.
-
Stopping the
ceph-osd
daemon.
Procedure
Verify the appropriate OSD is down:
systemctl status ceph-osd@OSD_NUMBER
[root@osd ~]# systemctl status ceph-osd@OSD_NUMBER
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
systemctl status ceph-osd@1
[root@osd ~]# systemctl status ceph-osd@1
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For containerized deployments, to access the bluestore tool, follow the below steps:
Set
noout
flag on cluster.Example
ceph osd set noout
[root@mon ~]# ceph osd set noout
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Login to the node hosting the OSD container.
Backup
/etc/systemd/system/ceph-osd@.service
unit file to/root
directory.Example
cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.backup
[root@osd ~]# cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.backup
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Move
/run/ceph-osd@OSD_ID.service-cid
file to/root
.Example
mv /run/ceph-osd@0.service-cid /root
[root@osd ~]# mv /run/ceph-osd@0.service-cid /root
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Edit
/etc/systemd/system/ceph-osd@.service
unit file and add-it --entrypoint /bin/bash
option to podman command.Example
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Reload
systemd
manager configuration.Example
systemctl daemon-reload
[root@osd ~]# systemctl daemon-reload
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the OSD service associated with the
OSD_ID
.Syntax
systemctl restart ceph-osd@OSD_ID.service
systemctl restart ceph-osd@OSD_ID.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace
OSD_ID
with the ID of the OSD.Example
systemctl restart ceph-osd@0.service
[root@osd ~]# systemctl restart ceph-osd@0.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Login to the container associated with the
OSD_ID
.Syntax
podman exec -it ceph-osd-OSD_ID /bin/bash
podman exec -it ceph-osd-OSD_ID /bin/bash
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
podman exec -it ceph-osd-0 /bin/bash
[root@osd ~]# podman exec -it ceph-osd-0 /bin/bash
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Get
osd fsid
and activate the OSD to mount OSD’s logical volume (LV).Syntax
ceph-volume lvm list |grep -A15 "osd\.OSD_ID"|grep "osd fsid" ceph-volume lvm activate --bluestore OSD_ID OSD_FSID
ceph-volume lvm list |grep -A15 "osd\.OSD_ID"|grep "osd fsid" ceph-volume lvm activate --bluestore OSD_ID OSD_FSID
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
List the object map:
ceph-objectstore-tool --data-path PATH_TO_OSD --pgid PG_ID \ OBJECT \ list-omap
[root@osd ~]# ceph-objectstore-tool --data-path PATH_TO_OSD --pgid PG_ID \ OBJECT \ list-omap
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
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
[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":""}' \ list-omap
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For containerized deployments, to revert the changes, follow the below steps:
After exiting the container, copy
/etc/systemd/system/ceph-osd@.service
unit file from/root
directory.Example
cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.modified cp /root/ceph-osd@.service.backup /etc/systemd/system/ceph-osd@.service
[root@osd ~]# cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.modified [root@osd ~]# cp /root/ceph-osd@.service.backup /etc/systemd/system/ceph-osd@.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Reload
systemd
manager configuration.Example
systemctl daemon-reload
[root@osd ~]# systemctl daemon-reload
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Move
/run/ceph-osd@OSD_ID.service-cid
file to/tmp
.Example
mv /run/ceph-osd@0.service-cid /tmp
[root@osd ~]# mv /run/ceph-osd@0.service-cid /tmp
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the OSD service associated with the
OSD_ID
.Syntax
systemctl restart ceph-osd@OSD_ID.service
[root@osd ~]# systemctl restart ceph-osd@OSD_ID.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
systemctl restart ceph-osd@0.service
[root@osd ~]# systemctl restart ceph-osd@0.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.4.5. Manipulating the object map header Copy linkLink copied to clipboard!
The ceph-objectstore-tool
utility will output the object map (OMAP) header with the values associated with the object’s keys.
Prerequisites
- Root-level access to the Ceph OSD node.
-
Stopping the
ceph-osd
daemon.
Procedure
For containerized deployments, to access the bluestore tool, follow the below steps:
Set
noout
flag on cluster.Example
ceph osd set noout
[root@mon ~]# ceph osd set noout
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Login to the node hosting the OSD container.
Backup
/etc/systemd/system/ceph-osd@.service
unit file to/root
directory.Example
cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.backup
[root@osd ~]# cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.backup
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Move
/run/ceph-osd@OSD_ID.service-cid
file to/root
.Example
mv /run/ceph-osd@0.service-cid /root
[root@osd ~]# mv /run/ceph-osd@0.service-cid /root
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Edit
/etc/systemd/system/ceph-osd@.service
unit file and add-it --entrypoint /bin/bash
option to podman command.Example
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Reload
systemd
manager configuration.Example
systemctl daemon-reload
[root@osd ~]# systemctl daemon-reload
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the OSD service associated with the
OSD_ID
.Syntax
systemctl restart ceph-osd@OSD_ID.service
systemctl restart ceph-osd@OSD_ID.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace
OSD_ID
with the ID of the OSD.Example
systemctl restart ceph-osd@0.service
[root@osd ~]# systemctl restart ceph-osd@0.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Login to the container associated with the
OSD_ID
.Syntax
podman exec -it ceph-osd-OSD_ID /bin/bash
podman exec -it ceph-osd-OSD_ID /bin/bash
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
podman exec -it ceph-osd-0 /bin/bash
[root@osd ~]# podman exec -it ceph-osd-0 /bin/bash
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Get
osd fsid
and activate the OSD to mount OSD’s logical volume (LV).Syntax
ceph-volume lvm list |grep -A15 "osd\.OSD_ID"|grep "osd fsid" ceph-volume lvm activate --bluestore OSD_ID OSD_FSID
ceph-volume lvm list |grep -A15 "osd\.OSD_ID"|grep "osd fsid" ceph-volume lvm activate --bluestore OSD_ID OSD_FSID
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verify the appropriate OSD is down:
Syntax
systemctl status ceph-osd@OSD_NUMBER
systemctl status ceph-osd@OSD_NUMBER
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
systemctl status ceph-osd@1
[root@osd ~]# systemctl status ceph-osd@1
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Get the object map header:
Syntax
ceph-objectstore-tool --data-path PATH_TO_OSD \ --pgid PG_ID OBJECT \ get-omaphdr > OBJECT_MAP_FILE_NAME
ceph-objectstore-tool --data-path PATH_TO_OSD \ --pgid PG_ID OBJECT \ get-omaphdr > OBJECT_MAP_FILE_NAME
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
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-omaphdr > zone_info.default.omaphdr.txt
[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-omaphdr > zone_info.default.omaphdr.txt
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the object map header:
Syntax
ceph-objectstore-tool --data-path PATH_TO_OSD \ --pgid PG_ID OBJECT \ get-omaphdr < OBJECT_MAP_FILE_NAME
ceph-objectstore-tool --data-path PATH_TO_OSD \ --pgid PG_ID OBJECT \ get-omaphdr < OBJECT_MAP_FILE_NAME
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
su - ceph -c '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-omaphdr < zone_info.default.omaphdr.txt
[root@osd ~]# su - ceph -c '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-omaphdr < zone_info.default.omaphdr.txt
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For containerized deployments, to revert the changes, follow the below steps:
After exiting the container, copy
/etc/systemd/system/ceph-osd@.service
unit file from/root
directory.Example
cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.modified cp /root/ceph-osd@.service.backup /etc/systemd/system/ceph-osd@.service
[root@osd ~]# cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.modified [root@osd ~]# cp /root/ceph-osd@.service.backup /etc/systemd/system/ceph-osd@.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Reload
systemd
manager configuration.Example
systemctl daemon-reload
[root@osd ~]# systemctl daemon-reload
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Move
/run/ceph-osd@OSD_ID.service-cid
file to/tmp
.Example
mv /run/ceph-osd@0.service-cid /tmp
[root@osd ~]# mv /run/ceph-osd@0.service-cid /tmp
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the OSD service associated with the
OSD_ID
.Syntax
systemctl restart ceph-osd@OSD_ID.service
[root@osd ~]# systemctl restart ceph-osd@OSD_ID.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
systemctl restart ceph-osd@0.service
[root@osd ~]# systemctl restart ceph-osd@0.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.4.6. Manipulating the object map key Copy linkLink copied to clipboard!
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.
Prerequisites
- Root-level access to the Ceph OSD node.
-
Stopping the
ceph-osd
daemon.
Procedure
For containerized deployments, to access the bluestore tool, follow the below steps:
Set
noout
flag on cluster.Example
ceph osd set noout
[root@mon ~]# ceph osd set noout
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Login to the node hosting the OSD container.
Backup
/etc/systemd/system/ceph-osd@.service
unit file to/root
directory.Example
cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.backup
[root@osd ~]# cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.backup
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Move
/run/ceph-osd@OSD_ID.service-cid
file to/root
.Example
mv /run/ceph-osd@0.service-cid /root
[root@osd ~]# mv /run/ceph-osd@0.service-cid /root
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Edit
/etc/systemd/system/ceph-osd@.service
unit file and add-it --entrypoint /bin/bash
option to podman command.Example
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Reload
systemd
manager configuration.Example
systemctl daemon-reload
[root@osd ~]# systemctl daemon-reload
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the OSD service associated with the
OSD_ID
.Syntax
systemctl restart ceph-osd@OSD_ID.service
systemctl restart ceph-osd@OSD_ID.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace
OSD_ID
with the ID of the OSD.Example
systemctl restart ceph-osd@0.service
[root@osd ~]# systemctl restart ceph-osd@0.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Login to the container associated with the
OSD_ID
.Syntax
podman exec -it ceph-osd-OSD_ID /bin/bash
podman exec -it ceph-osd-OSD_ID /bin/bash
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
podman exec -it ceph-osd-0 /bin/bash
[root@osd ~]# podman exec -it ceph-osd-0 /bin/bash
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Get
osd fsid
and activate the OSD to mount OSD’s logical volume (LV).Syntax
ceph-volume lvm list |grep -A15 "osd\.OSD_ID"|grep "osd fsid" ceph-volume lvm activate --bluestore OSD_ID OSD_FSID
ceph-volume lvm list |grep -A15 "osd\.OSD_ID"|grep "osd fsid" ceph-volume lvm activate --bluestore OSD_ID OSD_FSID
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Get the object map key:
Syntax
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
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
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
[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
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the object map key:
Syntax
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
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
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
[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
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Remove the object map key:
Syntax
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
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
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 ""
[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 ""
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
For containerized deployments, to revert the changes, follow the below steps:
After exiting the container, copy
/etc/systemd/system/ceph-osd@.service
unit file from/root
directory.Example
cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.modified cp /root/ceph-osd@.service.backup /etc/systemd/system/ceph-osd@.service
[root@osd ~]# cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.modified [root@osd ~]# cp /root/ceph-osd@.service.backup /etc/systemd/system/ceph-osd@.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Reload
systemd
manager configuration.Example
systemctl daemon-reload
[root@osd ~]# systemctl daemon-reload
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Move
/run/ceph-osd@OSD_ID.service-cid
file to/tmp
.Example
mv /run/ceph-osd@0.service-cid /tmp
[root@osd ~]# mv /run/ceph-osd@0.service-cid /tmp
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the OSD service associated with the
OSD_ID
.Syntax
systemctl restart ceph-osd@OSD_ID.service
[root@osd ~]# systemctl restart ceph-osd@OSD_ID.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
systemctl restart ceph-osd@0.service
[root@osd ~]# systemctl restart ceph-osd@0.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.4.7. Listing the object’s attributes Copy linkLink copied to clipboard!
Use the ceph-objectstore-tool
utility to list an object’s attributes. The output provides you with the object’s keys and values.
Prerequisites
- Root-level access to the Ceph OSD node.
-
Stopping the
ceph-osd
daemon.
Procedure
Verify the appropriate OSD is down:
systemctl status ceph-osd@OSD_NUMBER
[root@osd ~]# systemctl status ceph-osd@OSD_NUMBER
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
systemctl status ceph-osd@1
[root@osd ~]# systemctl status ceph-osd@1
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For containerized deployments, to access the bluestore tool, follow the below steps:
Set
noout
flag on cluster.Example
ceph osd set noout
[root@mon ~]# ceph osd set noout
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Login to the node hosting the OSD container.
Backup
/etc/systemd/system/ceph-osd@.service
unit file to/root
directory.Example
cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.backup
[root@osd ~]# cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.backup
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Move
/run/ceph-osd@OSD_ID.service-cid
file to/root
.Example
mv /run/ceph-osd@0.service-cid /root
[root@osd ~]# mv /run/ceph-osd@0.service-cid /root
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Edit
/etc/systemd/system/ceph-osd@.service
unit file and add-it --entrypoint /bin/bash
option to podman command.Example
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Reload
systemd
manager configuration.Example
systemctl daemon-reload
[root@osd ~]# systemctl daemon-reload
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the OSD service associated with the
OSD_ID
.Syntax
systemctl restart ceph-osd@OSD_ID.service
systemctl restart ceph-osd@OSD_ID.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace
OSD_ID
with the ID of the OSD.Example
systemctl restart ceph-osd@0.service
[root@osd ~]# systemctl restart ceph-osd@0.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Login to the container associated with the
OSD_ID
.Syntax
podman exec -it ceph-osd-OSD_ID /bin/bash
podman exec -it ceph-osd-OSD_ID /bin/bash
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
podman exec -it ceph-osd-0 /bin/bash
[root@osd ~]# podman exec -it ceph-osd-0 /bin/bash
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Get
osd fsid
and activate the OSD to mount OSD’s logical volume (LV).Syntax
ceph-volume lvm list |grep -A15 "osd\.OSD_ID"|grep "osd fsid" ceph-volume lvm activate --bluestore OSD_ID OSD_FSID
ceph-volume lvm list |grep -A15 "osd\.OSD_ID"|grep "osd fsid" ceph-volume lvm activate --bluestore OSD_ID OSD_FSID
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
List the object’s attributes:
ceph-objectstore-tool --data-path PATH_TO_OSD \ --pgid PG_ID OBJECT \ list-attrs
ceph-objectstore-tool --data-path PATH_TO_OSD \ --pgid PG_ID OBJECT \ list-attrs
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
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
[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":""}' \ list-attrs
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For containerized deployments, to revert the changes, follow the below steps:
After exiting the container, copy
/etc/systemd/system/ceph-osd@.service
unit file from/root
directory.Example
cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.modified cp /root/ceph-osd@.service.backup /etc/systemd/system/ceph-osd@.service
[root@osd ~]# cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.modified [root@osd ~]# cp /root/ceph-osd@.service.backup /etc/systemd/system/ceph-osd@.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Reload
systemd
manager configuration.Example
systemctl daemon-reload
[root@osd ~]# systemctl daemon-reload
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Move
/run/ceph-osd@OSD_ID.service-cid
file to/tmp
.Example
mv /run/ceph-osd@0.service-cid /tmp
[root@osd ~]# mv /run/ceph-osd@0.service-cid /tmp
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the OSD service associated with the
OSD_ID
.Syntax
systemctl restart ceph-osd@OSD_ID.service
[root@osd ~]# systemctl restart ceph-osd@OSD_ID.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
systemctl restart ceph-osd@0.service
[root@osd ~]# systemctl restart ceph-osd@0.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.4.8. Manipulating the object attribute key Copy linkLink copied to clipboard!
Use the ceph-objectstore-tool
utility to change an object’s attributes. To manipulate the object’s attributes you need the data and journal paths, the placement group identifier (PG ID), the object, and the key in the object’s attribute.
Prerequisites
- Root-level access to the Ceph OSD node.
-
Stopping the
ceph-osd
daemon.
Procedure
Verify the appropriate OSD is down:
systemctl status ceph-osd@$OSD_NUMBER
[root@osd ~]# systemctl status ceph-osd@$OSD_NUMBER
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
systemctl status ceph-osd@1
[root@osd ~]# systemctl status ceph-osd@1
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For containerized deployments, to access the bluestore tool, follow the below steps:
Set
noout
flag on cluster.Example
ceph osd set noout
[root@mon ~]# ceph osd set noout
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Login to the node hosting the OSD container.
Backup
/etc/systemd/system/ceph-osd@.service
unit file to/root
directory.Example
cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.backup
[root@osd ~]# cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.backup
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Move
/run/ceph-osd@OSD_ID.service-cid
file to/root
.Example
mv /run/ceph-osd@0.service-cid /root
[root@osd ~]# mv /run/ceph-osd@0.service-cid /root
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Edit
/etc/systemd/system/ceph-osd@.service
unit file and add-it --entrypoint /bin/bash
option to podman command.Example
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Reload
systemd
manager configuration.Example
systemctl daemon-reload
[root@osd ~]# systemctl daemon-reload
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the OSD service associated with the
OSD_ID
.Syntax
systemctl restart ceph-osd@OSD_ID.service
systemctl restart ceph-osd@OSD_ID.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace
OSD_ID
with the ID of the OSD.Example
systemctl restart ceph-osd@0.service
[root@osd ~]# systemctl restart ceph-osd@0.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Login to the container associated with the
OSD_ID
.Syntax
podman exec -it ceph-osd-OSD_ID /bin/bash
podman exec -it ceph-osd-OSD_ID /bin/bash
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
podman exec -it ceph-osd-0 /bin/bash
[root@osd ~]# podman exec -it ceph-osd-0 /bin/bash
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Get
osd fsid
and activate the OSD to mount OSD’s logical volume (LV).Syntax
ceph-volume lvm list |grep -A15 "osd\.OSD_ID"|grep "osd fsid" ceph-volume lvm activate --bluestore OSD_ID OSD_FSID
ceph-volume lvm list |grep -A15 "osd\.OSD_ID"|grep "osd fsid" ceph-volume lvm activate --bluestore OSD_ID OSD_FSID
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Get the object’s attributes:
Syntax
ceph-objectstore-tool --data-path PATH_TO_OSD \ --pgid PG_ID OBJECT \ get-attrs KEY > OBJECT_ATTRS_FILE_NAME
ceph-objectstore-tool --data-path PATH_TO_OSD \ --pgid PG_ID OBJECT \ get-attrs KEY > OBJECT_ATTRS_FILE_NAME
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
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-attrs "oid" > zone_info.default.attr.txt
[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-attrs "oid" > zone_info.default.attr.txt
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set an object’s attributes:
Syntax
ceph-objectstore-tool --data-path PATH_TO_OSD \ --pgid PG_ID OBJECT \ set-attrs KEY < OBJECT_ATTRS_FILE_NAME
ceph-objectstore-tool --data-path PATH_TO_OSD \ --pgid PG_ID OBJECT \ set-attrs KEY < OBJECT_ATTRS_FILE_NAME
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
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-attrs "oid" < zone_info.default.attr.txt
[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-attrs "oid" < zone_info.default.attr.txt
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Remove an object’s attributes:
Syntax
ceph-objectstore-tool --data-path PATH_TO_OSD \ --pgid PG_ID OBJECT \ rm-attrs KEY
ceph-objectstore-tool --data-path PATH_TO_OSD \ --pgid PG_ID OBJECT \ rm-attrs KEY
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
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-attrs "oid"
[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-attrs "oid"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For containerized deployments, to revert the changes, follow the below steps:
After exiting the container, copy
/etc/systemd/system/ceph-osd@.service
unit file from/root
directory.Example
cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.modified cp /root/ceph-osd@.service.backup /etc/systemd/system/ceph-osd@.service
[root@osd ~]# cp /etc/systemd/system/ceph-osd@.service /root/ceph-osd@.service.modified [root@osd ~]# cp /root/ceph-osd@.service.backup /etc/systemd/system/ceph-osd@.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Reload
systemd
manager configuration.Example
systemctl daemon-reload
[root@osd ~]# systemctl daemon-reload
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Move
/run/ceph-osd@OSD_ID.service-cid
file to/tmp
.Example
mv /run/ceph-osd@0.service-cid /tmp
[root@osd ~]# mv /run/ceph-osd@0.service-cid /tmp
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the OSD service associated with the
OSD_ID
.Syntax
systemctl restart ceph-osd@OSD_ID.service
[root@osd ~]# systemctl restart ceph-osd@OSD_ID.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
systemctl restart ceph-osd@0.service
[root@osd ~]# systemctl restart ceph-osd@0.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.5. Additional Resources Copy linkLink copied to clipboard!
- For Red Hat Ceph Storage support, see the Red Hat Customer Portal.