Ceph

CLI

ceph -v
ceph -s
ceph df
 
ceph status
ceph health detail
ceph df detail
ceph osd lspools
osd pool ls detail
 
# disable rebuild
ceph osd set noout 
 
# enable rebuild
ceph osd unset noout
 
#default 1 3 3
ceph tell 'osd.*' injectargs '--osd_max_backfills 1 --osd_recovery_max_active 1 --osd_recovery_op_priority 3'

Monitoring
https://github.com/ceph/ceph-nagios-plugins/releases

# Build nagios-plugins-ceph
sudo apt-get install -y devscripts fakeroot build-essential dh-python
git clone https://github.com/ceph/ceph-nagios-plugins.git
cd ceph-nagios-plugins#
make deb
sudo dpkg -i nagios-plugins-ceph_*_all.deb
 
# create wrapper for kolla-ansible installation
cat <<EOF> /usr/bin/ceph
#!/bin/bash
docker exec -it ceph_mon ceph $@
EOF
chmod +x /usr/bin/ceph
 
/usr/lib/nagios/plugins/check_ceph_health

Replace OSD

ceph -s
ceph osd status
ceph osd df tree
 
# ssh ceph1-osd8-dev
systemctl status ceph-osd@32
lsblk
ls -la /var/lib/ceph/osd/ceph-32
ls -l /dev/disk/by-partuuid/c8af71de-f5ae-4f62-ab88-8c9aa30c0f0c
ls -l /dev/disk/by-partuuid/b03b6a29-94d0-4a6e-a740-5dabaa144231
ceph -w
 
# Remove OSD
ssh ceph1-admin1-dev
salt-run disengage.safety
salt-run remove.osd 32

Upgrading Ceph from Luminous to Nautilus
https://aptira.com/upgrading-ceph-from-luminous-to-nautilus/

Links
https://github.com/ceph/ceph-nagios-plugins