Get status of monitors
ceph quorum_status --format json-pretty
Set the weight of a disk lower so it gets less IO, or use it to scale a disk in\out of a cluster
ceph osd reweight osd.30 .01 --cluster mycluster
Move an OSD to a node in the cursh map, usefull if your OSD comes up not attached to a node
ceph osd crush move osd.27 host=adleast-node04 --cluster mycluster
Ensure this OSD is never a primary – Requires a setting on the mon
ceph osd primary-affinity osd.27 0 --cluster mycluster
How many PG’s on OSD x are primary?
ceph pg dump | grep active+clean | egrep "\[0," | wc -l
Activate an existing bluestore disk
ceph-volume lvm activate --bluestore 34 2c9b2862-1db6-4863-935d-32b7289fee7d
Find all bluestore disk ID’s and UUID’s
(Used to generate the above command)
lvs -o lv_tags | awk -vFS=, /ceph.osd_fsid/'{ OSD_ID=gensub(".*ceph.osd_id=([0-9]+),.*", "\\1", ""); OSD_FSID=gensub(".*ceph.osd_fsid=([a-z0-9-]+),.*", "\\1", ""); print OSD_ID,OSD_FSID }' | sort -n | uniq