ceph的正常卸載與非正常卸載

1、ceph的正常卸載與非正常卸載

  1、正常卸載(經過ceph-deploy卸載)

  環境已安裝ceph-deployhtml

  一、查看ceph-deploy的幫助信息

[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

  2、非正常卸載

    一、ceph安裝失敗,想從頭再來,不用刪除客戶端。能夠使用下面的命令將環境恢復到剛安裝完客戶端的狀態。
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

    二、若是想完全清除環境,而不是想從新安裝。那麼ceph軟件包也要卸載
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/*
    三、查看安裝哪些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

  3、ceph 更換controller3 服務器,ceph須要處理的地方

  一、刪除ceph-mon

ceph mon remove mon3

  二、移除osd

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
相關文章
相關標籤/搜索