准备三个节点ceph-1、ceph-2、ceph-3
配置host
cat /etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain610.0.0.53 ceph-310.0.0.52 ceph-210.0.0.51 ceph-1
/etc/ceph/ceph.conf中加入
public network = 10.0.0.0/24
在ceph-1上做无密码登录配置
然后在ceph-1上安装ceph-deploy
yum install ceph-deploy
在ceph-1上使用ceph-deploy安装ceph
mkdir my-clustercd my-clusterceph-deploy new ceph-1ceph-deploy install ceph-1 ceph-2 ceph-3 --repo-url=http://mirrors.aliyun.com/ceph/rpm-luminous/el7/
创建第一个ceph monitor
ceph-deploy mon create-initial
添加一个metadata服务
ceph-deploy mds create ceph-1-51
配置更改后同步到远程节点
ceph-deploy --overwrite-conf config push ceph-3-53 ceph-2-52
ceph-deploy mgr create ceph-2-52 ceph-3-53
ceph health问题解决
[root@ceph-1-51 my-cluster]# ceph -s cluster: id: 7af4a47d-2cbf-4a8a-b156-f0d3f908f137 health: HEALTH_WARN clock skew detected on mon.ceph-2-52, mon.ceph-3-53
通过ceph health detail发现这是因为时间不同步造成的,做过ntp同步后解决[root@ceph-1-51 my-cluster]# ceph -s cluster: id: 7af4a47d-2cbf-4a8a-b156-f0d3f908f137 health: HEALTH_OK