【CEPH】CEPH集群实践

环境说明

  • 3台OracleLinux7.9 CPEP版本12.2-stable 每个节点2块数据盘未初始化
  • fw selinux已关闭
  • centos7&epel7 repo已部署

OS准备

  • 所有节点
yum install -y chrony
systemctl start chronyd.service
systemctl enable chronyd.service
vim  /etc/chrony.conf #修改burst地址
systemctl   restart   chronyd.service 

rpm -ivh http://download.ceph.com/rpm-luminous/el7/noarch/ceph-release-1-1.el7.noarch.rpm
sed -i 's#download.ceph.com#mirrors.aliyun.com/ceph#g'
yum install ceph ceph-radosgw -y

cat >> /etc/hosts <<EOF
10.168.1.191 191-ceph01 
10.168.1.192 192-ceph02 
10.168.1.193 193-ceph03 
EOF

在节点1部署deploy组件

yum install ceph-deploy python-setuptools python2-subprocess32 ceph-common -y
mkdir /data/ceph-cluster && cd   /data/ceph-cluster

MON部署

  • 节点1
ceph-deploy new 191-ceph01  192-ceph02 193-ceph03  --cluster-network 10.168.1.0/24 --public-network 10.168.1.0/24

ceph-deploy install --no-adjust-repos  191-ceph01  192-ceph02 193-ceph03 

ceph-deploy mon create-initial

ceph -s
ceph quorum_status --format json-pretty

MGR看板

  • 节点1
  • 使用IP带端口7000访问

ceph-deploy mgr create 191-ceph01 192-ceph02 193-ceph03

  • 所有节点
ceph mgr module ls 
ceph mgr module enable dashboard
ceph mgr module enable prometheus
ceph mgr services

添加磁盘OSD

  • ceph01上把所有的数据盘6块加入集群
ceph-deploy disk list 191-ceph01  192-ceph02 193-ceph03

ceph-deploy osd create 191-ceph01 --data /dev/sdc
ceph-deploy osd create 192-ceph02 --data /dev/sdc
ceph-deploy osd create 193-ceph03 --data /dev/sdc
ceph-deploy osd create 191-ceph01 --data /dev/sdb  
ceph-deploy osd create 192-ceph02 --data /dev/sdb 
ceph-deploy osd create 193-ceph03 --data /dev/sdb 

ceph osd stat
ceph  -s

解决时钟同步健康警告

  • ceph01
cat >>  /data/ceph-cluster/ceph.conf <<EOF
#解决时间同步阈值过小警告问题
mon clock drift allowed = 2
mon clock drift warn backoff = 30
EOF

#配置分发
ceph-deploy --overwrite-conf config push  191-ceph01  192-ceph02 193-ceph03

#生效
systemctl restart ceph-mon.target

#查看集群概览
[root@191-ceph01 ~]# ceph -s
  cluster:
    id:     7fa1d502-3a24-4039-89a8-b31c89e84a69
    health: HEALTH_OK

  services:
    mon: 3 daemons, quorum 191-ceph01,192-ceph02,193-ceph03
    mgr: 191-ceph01(active), standbys: 193-ceph03, 192-ceph02
    osd: 6 osds: 6 up, 6 in

  data:
    pools:   0 pools, 0 pgs
    objects: 0 objects, 0B
    usage:   6.00GiB used, 324GiB / 330GiB avail
    pgs:     
转载请注明-MrZ-个人博客
THE END
分享
二维码
海报
【CEPH】CEPH集群实践
环境说明 3台OracleLinux7.9 CPEP版本12.2-stable 每个节点2块数据盘未初始化 fw selinux已关闭 centos7&epel7 repo已部署 OS准备 所有节点 yum install -y chrony systemctl start chronyd.service syste……
<<上一篇
下一篇>>