ceph 版本信息:
http://docs.ceph.com/docs/master/releases/
ceph版本:luminous
OS: centos 7.4
安装过程:
0.机器准备:
host-00 : 192.168.0.3
host-01 : 192.168.0.4
host-02 : 192.168.0.5
host-03 : 192.168.0.6
把该信息写入host-00机器的/etc/hosts中。
1.指定安装的版本,并配置使用国内源:
host-00$ export CEPH_DEPLOY_REPO_URL=http://mirrors.163.com/ceph/rpm-luminous/el7
host-00$ export CEPH_DEPLOY_GPG_URL=http://mirrors.163.com/ceph/keys/release.asc
2.创建集群
host-00$ mkdir ceph-cluster && cd ceph-cluster
host-00$ ceph-deploy new host-01 host-02 host-03
3.安装ceph软件包
host-00$ ceph-deploy install --release luminous host-01 host-02 host-03
host-00$ 4.部署初始化mon 和 准备keys
host-00$ ceph-deploy mon create-initial
5.配置admin key 到每个节点
host-00$ ceph-deploy admin host-01 host-02 host-03
6.创建管理daemon (luminous以后使用mgr处理统计信息,例如:ceph osd df)
host-00$ ceph-deploy mgr create host-01
7.增加osd
初始化磁盘 ceph-deploy disk zap host-01:sdc host-02:sdc host-03:sdc
host-00$ ceph-deploy osd create host-01:sdc host-02:sdc host-03:sdc
8.检查集群:
host-00$ ssh host-01 sudo ceph health
host-00$ ssh host-01 sudo ceph -s
9. 启动dashboard
a.在 host-01节点
host-01$ ceph mgr module enable dashboard
host-01$ ceph config-key put mgr/dashboard/server_addr 192.168.0.4
host-01$ ceph config-key put mgr/dashboard/server_port 7000
b.访问dashboard
http://{{host-01 ip}}:7000/
10.其他
a. 增加pool
ceph osd pool create kube 128
b. 删除 pool
先在ceph.conf 增加下面:
mon_allow_pool_delete = true
并重启ceph-mon:
systemctl restart ceph-mon@host-01
删除:
ceph osd pool rm test test --yes-i-really-really-mean-it
c. 修改配置ceph
[mgr]
mgr modules = dashboard
同步配置文件:
ceph-deploy --overwrite-conf config push host-01 host-02 host-03
参考:
https://www.cnblogs.com/bodhitree/p/5993722.html
http://docs.ceph.com/docs/master/start/quick-ceph-deploy/