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?
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.
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}
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.