本文通过安装 ceph-deploy 软件的管理节点来安装配置 ceph 集群,以 6 个节点—3 个 monitor 节点,3 个 osd 节点,以 ceph kraken(1.11.1)版本为例,说明 Ceph 存储集群的安装以及配置过程。
1. 拓扑架构说明
server ntp6.aliyun.com iburst
allow 192.168.1.0/24
[root@ceph-mon-0 ~]# systemctl start chronyd
[root@ceph-mon-0 ~]# systemctl enable chronyd
其他节点:
[root@ceph-mon-1 ~]# vi /etc/chrony.conf
server 192.168.1.10 iburst
[root@ceph-mon-1 ~]# systemctl start chronyd
[root@ceph-mon-1 ~]# systemctl enable chronyd
[root@ceph-mon-1 ~]# chronyc sources
210 Number of sources = 1
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* ceph-mon-0 10 6 377 56 -7014ns[-9275ns] +/- 131us
3. Ceph 所需要的yum源环境
软件安装尽可能采用yum的方式来实现,如下是当前框架需要的yum环境。
##在所有节点配置yum源
3.1. base 源
# cat /etc/yum.repos.d/Centos_base.repo
[base]
name=aliyun base
baseurl=https://mirrors.aliyun.com/centos/7/os/x86_64/
enabled=1
gpgcheck=0
3.2. epel 源
# cat /etc/yum.repos.d/epel.repo
[epel]
name=aliyun epel
baseurl=https://mirrors.aliyun.com/epel/7Server/x86_64/
1. 拓扑架构说明
2. 时间同步
集群最重要的前提条件,就是时间同步,所以首先要实现的就是在各个节点间配置时钟同步。本例中采用chrony作为时间同步软件,当然你可以采用ntp。
server ntp6.aliyun.com iburst
allow 192.168.1.0/24
[root@ceph-mon-0 ~]# systemctl start chronyd
[root@ceph-mon-0 ~]# systemctl enable chronyd
其他节点:
[root@ceph-mon-1 ~]# vi /etc/chrony.conf
server 192.168.1.10 iburst
[root@ceph-mon-1 ~]# systemctl start chronyd
[root@ceph-mon-1 ~]# systemctl enable chronyd
[root@ceph-mon-1 ~]# chronyc sources
210 Number of sources = 1
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* ceph-mon-0 10 6 377 56 -7014ns[-9275ns] +/- 131us
3. Ceph 所需要的yum源环境
软件安装尽可能采用yum的方式来实现,如下是当前框架需要的yum环境。
##在所有节点配置yum源
3.1. base 源
# cat /etc/yum.repos.d/Centos_base.repo
[base]
name=aliyun base
baseurl=https://mirrors.aliyun.com/centos/7/os/x86_64/
enabled=1
gpgcheck=0
3.2. epel 源
# cat /etc/yum.repos.d/epel.repo
[epel]
name=aliyun epel
baseurl=https://mirrors.aliyun.com/epel/7Server/x86_64/