環境已安裝ceph-deployhtml
[cephde@controller03 cephcluster]$ ceph-deploy -h usage: ceph-deploy [-h] [-v | -q] [--version] [--username USERNAME] [--overwrite-conf] [--ceph-conf CEPH_CONF] COMMAND ... Easy Ceph deployment -^- / \ |O o| ceph-deploy v2.0.1 ).-.( '/|||\` | '|` | '|` Full documentation can be found at: http://ceph.com/ceph-deploy/docs optional arguments: -h, --help show this help message and exit -v, --verbose be more verbose -q, --quiet be less verbose --version the current installed version of ceph-deploy --username USERNAME the username to connect to the remote host --overwrite-conf overwrite an existing conf file on remote host (if present) --ceph-conf CEPH_CONF use (or reuse) a given ceph.conf file commands: COMMAND description new Start deploying a new cluster, and write a CLUSTER.conf and keyring for it. install Install Ceph packages on remote hosts. rgw Ceph RGW daemon management mgr Ceph MGR daemon management mds Ceph MDS daemon management mon Ceph MON Daemon management gatherkeys Gather authentication keys for provisioning new nodes. disk Manage disks on a remote host. osd Prepare a data disk on remote host. repo Repo definition management admin Push configuration and client.admin key to a remote host. config Copy ceph.conf to/from remote host(s) uninstall Remove Ceph packages from remote hosts. purgedata Purge (delete, destroy, discard, shred) any Ceph data from /var/lib/ceph purge Remove Ceph packages from remote hosts and purge all data. forgetkeys Remove authentication keys from the local directory. pkg Manage packages on remote hosts. calamari Install and configure Calamari nodes. Assumes that a repository with Calamari packages is already configured. Refer to the docs for examples (http://ceph.com/ceph-deploy/docs/conf.html) See 'ceph-deploy <command> --help' for help on a specific command
ceph-deploy purge controller01 ceph-deploy purge controller02 ceph-deploy purge controller03
ceph-deploy purgedata controller01 ceph-deploy purgedata controller02 ceph-deploy purgedata controller03
ceph-deploy forgetkeys<br><br>#檢查ceph-mon是否啓動 ps -ef|grep ceph or ps -A|grep ceph<br><br>#啓動ceph-mon ceph-mon --id=1
ceph-deploy purge controller01 ceph-deploy purgedata controller01 ceph-deploy forgetkeys
ps aux|grep ceph |awk '{print $2}'|xargs kill -9 ps aux|grep ceph |awk '{print $2}'|xargs kill -9 ps -ef|grep ceph
確保此時全部ceph進程都已經關閉!!!若是沒有關閉,多執行幾回。node
umount /var/lib/ceph/ osd /* rm -rf /var/lib/ceph/ osd /* rm -rf /var/lib/ceph/ mon /* rm -rf /var/lib/ceph/ mds /* rm -rf /var/lib/ceph/bootstrap- mds /* rm -rf /var/lib/ceph/bootstrap- osd /* rm -rf /var/lib/ceph/bootstrap- mon /* rm -rf /var/lib/ceph/ tmp /* rm -rf /etc/ceph/* rm -rf /var/run/ceph/*
# rpm -qa|grep ceph ceph-base-12.2.8-0.el7.x86_64 centos-release-ceph-luminous-1.1-2.el7.centos.noarch ceph-mgr-12.2.8-0.el7.x86_64 ceph-mds-12.2.8-0.el7.x86_64 libcephfs2-12.2.8-0.el7.x86_64 ceph-12.2.8-0.el7.x86_64 ceph-common-12.2.8-0.el7.x86_64 ceph-mon-12.2.8-0.el7.x86_64 ceph-radosgw-12.2.8-0.el7.x86_64 ceph-deploy-2.0.1-0.noarch python-cephfs-12.2.8-0.el7.x86_64 ceph-osd-12.2.8-0.el7.x86_64 ceph-selinux-12.2.8-0.el7.x86_64
yum remove ceph
ceph mon remove mon3
ceph osd rm osd.6 ceph osd rm osd.7 ceph osd rm osd.8 ceph osd crush rm osd.6 ceph osd crush rm osd.7 ceph osd crush rm osd.8 ceph auth del osd.6 ceph auth del osd.7 ceph auth del osd.8