How to bootstrap a new Ceph cluster
cephadm bootstrap --mon-ip 10.0.0.1 --cluster-network 128.0.0.0/16To add a host using cephadm
ceph orch host add node8 10.4.0.8 --cluster-network 128.0.0.0/16How to ZAP an OSD with Ceph Orch
ceph orch device zap stor1 /dev/sdb --forceHow to add an OSD to the Ceph cluster
ceph orch daemon add osd stor1:/dev/sdbHow to remove an OSD from Ceph
Mark the OSD as out:
ceph osd out <osd_id>Remove the OSD with rm:
ceph osd rm <osd_id>Delete OSD auth key
ceph auth del osd.<osd_id>Remove OSD from crush map
ceph osd crush remove osd.<osd_id>Purge the OSD:
ceph osd purge <osd_id>How to remove rogue OSD daemon
ceph orch daemon rm osd.93 --forceHow to check space used by image in RBD pool
rbd du -p your_pool_nameHow to remove image from RBD pool
rbd rm vm-166-disk-0 -p your_pool_nameHow to force backfill with Ceph
ceph pg force-backfill <pg_id>How to get the crush rule of a pool in Ceph
ceph osd pool get your_pool crush_ruleIdentify on which OSD’s an inconsistent PG is running
rados list-inconsistent-obj <pg_id> --format=json-prettyCreate replicated rule for SSD with replication on host level
ceph osd crush rule create-replicated <replicated_rule_name> default host ssdAssign replicated rule to specific pool
ceph osd pool set <pool_name> crush_rule <replicate_rule_name>