一键清理:
service ceph -a stop dirs=(/var/lib/ceph/bootstrap-mds/* /var/lib/ceph/bootstrap-osd/* /var/lib/ceph/mds/* \ /var/lib/ceph/mon/* /var/lib/ceph/tmp/* /var/lib/ceph/osd/* /var/run/ceph/* /var/log/ceph/* /etc/ceph/*)for d in ${dirs[@]};do rm -rf $d echo $d done donerm -rf /home/deploy/* rm -f /root/.cephdeploy.conf umount /var/lib/ceph/osd/*for disk in b1do /root/mkfs.xfs -d agcount=1 -f -i size=2048 /dev/sd$diskdone
一键部署:
cd /home/deployceph-deploy new `hostname`ceph-deploy --overwrite-conf mon create-initial ceph-deploy disk zap `hostname`:/dev/sdbceph-deploy osd prepare `hostname`:/dev/sdbceph-deploy osd activate `hostname`:/dev/sdb1