三.ceph-deploy

1.在ceph-admin上,部署ceph-deploy工具(仅在ceph-admin上)

  • 下载地址
  • https://download.ceph.com/rpm-jewel/el7/noarch/ceph-deploy-1.5.34-0.noarch.rpm
#将rpm下载到本地,并使用yum安装ceph-deploy
yum install ceph-deploy-1.5.34-0.noarch.rpm

2.创建ceph集群目录,及授权(仅在ceph-admin上)

mkdir -p /my-cluster
chown myceph:myceph -R /my-cluster

3.在ceph-admin上,使用ceph-deploy创建集群

# 生成fsid
uuidgen
su - myceph
cd /my-cluster
ceph-deploy new ceph-node1-mon ceph-node4-mon ceph-node5-mon
# 编辑配置文件,添加ipublic network参数
vim /my-cluster/ceph.conf

[global]
fsid = 2aed34d1-b133-41cd-8a1d-6026138bef36
mon_initial_members = ceph-node1-mon, ceph-node4-mon, ceph-node5-mon
mon_host = 10.2.2.11,10.2.2.14,10.2.2.15
auth_cluster_required = cephx
auth_service_required = cephx
auth_client_required = cephx
public network = 10.2.2.0/22
  • 其中:public network = 10.2.2.0/22 #需要手动添加

你可能感兴趣的:(三.ceph-deploy)