一、配置storage集群
1.建立集群管理目录(管理配置文件,密钥)
mkdir ceph-cluster
cd ceph-cluster/
2.创建一个新集群(需要先将主机名加入/etc/hosts 必须解析成具体IP,不能解析为127.0.0.1)
(1)建立集群
ceph-deploy new ceph01 ceph02 ceph03
(2)vim ceph.conf
public network = 192.168.30.0/23 #服务器的网段
#osd max object name len = 256 #选用
#osd max object namespace len = 64 #选用
osd pool default size = 2
3.在各个节点部署ceph
export CEPH_DEPLOY_REPO_URL=http://mirrors.163.com/ceph/rpm-jewel/el7 #国内安装源 export CEPH_DEPLOY_GPG_URL=http://mirrors.163.com/ceph/keys/release.asc #国内安装源 ceph-deploy install ceph01 ceph02 ceph03
4.部署监控器并收集密钥
ceph-deploy mon create-initial
5.复制秘钥到节点
ceph-deploy admin ceph01 ceph02 ceph03
6.分配节点磁盘
ceph-deploy osd create ceph01:/dev/sdb ceph02:/dev/sdb ceph03:/dev/sdb
7.检测集群健康状态
ceph health