0

I have a Ceph system with 8 OSD's and 8 disks mapped 1:1.

One of the disks is giving me smart errors and I would like to replace it.

How do I know which physical disk is mapped to which OSD?

Mr. Diba
  • 128
  • 5

2 Answers2

1

You can use ceph device ls (alternatively ceph device ls-by-host <host> or by daemon) to see the mapping of host, OSD and device, including block.db devices in cases you have the rocksDB/WAL on faster devices.

eblock
  • 417
  • 2
  • 6
0

The command ceph-volume lvm list displays all the OSD's with the corresponding devices.

See https://docs.ceph.com/en/latest/man/8/ceph-volume/#list for more information.

List devices or logical volumes associated with Ceph. An association is determined if a device has information relating to an OSD. This is verified by querying LVM’s metadata and correlating it with devices.

The lvs associated with the OSD need to have been prepared previously by ceph-volume so that all needed tags and metadata exist.

Usage:

ceph-volume lvm list

List a particular device, reporting all metadata about it:

ceph-volume lvm list /dev/sda1

List a logical volume, along with all its metadata (vg is a volume group, and lv the logical volume name):

ceph-volume lvm list {vg/lv}

Mr. Diba
  • 128
  • 5
  • 1
    You can also use `ceph device ls` to see the mapping of host, OSD and device, including block.db devices in cases you have the rocksDB/WAL on faster devices. – eblock Mar 03 '23 at 09:54
  • @eblock you are totally right! If you could create an answer with this I can accept it as a solution. – Mr. Diba Mar 03 '23 at 10:03