1.添加ceph.repo,安装ceph-deploy
[root@ss04 yum.repos.d]# cat /etc/yum.repos.d/ceph.repo[Ceph]name=Ceph packages for $basearchbaseurl=http://hk.ceph.com/rpm-jewel/el7/$basearchenabled=1gpgcheck=0[Ceph-noarch]name=Ceph noarch packagesbaseurl=http://hk.ceph.com/rpm-jewel/el7/noarchenabled=1gpgcheck=0[ceph-source]name=Ceph source packagesbaseurl=http://hk.ceph.com/rpm-jewel/el7/SRPMSenabled=1gpgcheck=0
# yum clean all# yum install ceph-deploy
2.创建集群,并安装ceph相关软件包
# 创建目录mkdir /home/ceph# 进入目录,创建集群cd /home/cephceph-deploy new ss04# 安装ceph软件包yum install ceph ceph-radosgw
3.修改配置文件,配置初始化
[root@ss04 ceph]# cat ceph.conf[global]fsid = 90602ee8-b900-44f2-b218-9dd4fc8273afmon_initial_members = ss04mon_host = 10.64.37.54auth_cluster_required = cephxauth_service_required = cephxauth_client_required = cephxosd pool default size = 2public network = 10.64.37.0/24
# 初始化 ceph-deploy mon create-initial
4.添加osd
# 创建文件夹mkdir osd0 osd1chown ceph:ceph osd0 osd1# 添加osdceph-deploy osd prepare ss04:/home/ceph/osd0ceph-deploy osd prepare ss04:/home/ceph/osd1ceph-deploy osd activate ss04:/home/ceph/osd0ceph-deploy osd activate ss04:/home/ceph/osd1