Monitoring Ceph OSDs
OSDs are the workhorses within a Ceph cluster; they are responsible for performing all the work to store and manage client data. Monitoring OSDs is crucial, though complex, because they are typically present in large numbers. This task is relatively trivial but even more critical in very small clusters with only 5 to 10 OSDs, especially if high availability and durability guarantees are required. We will take a look at the Ceph commands available for monitoring OSDs.
OSD tree lookup
If we need a quick view into the state and availability of all OSDs, we will use the OSD tree subcommand. This command is usually the second-most used (or abused) after the Ceph status command.
root@ceph-client0:~# ceph osd tree ID WEIGHT TYPE NAME UP/DOWN REWEIGHT PRIMARY-AFFINITY -1 0.06235 root default -2 0.02078 host ceph-osd1 0 0.01039 osd.0 up 1.00000 1.00000 3 0.01039 osd.3 up 1.00000 1.00000 -3 0.02078 host ceph-osd0 1 0.01039 osd.1 up 1.00000 1.00000 5 0.01039 osd.5 up 1.00000 1.00000...