arm平台的ceph部署安装指导

arm平台的ceph部署安装指导

1 环境准备

OS安装类型:
CentOS-7.5-aarch64-1804。

注:操作系统安装使用最小简化版安装(如上图),其余步骤安装一般安装操作系统步骤即可。

1.1 网络权限

安装Ceph所在服务器需开通外网权限(开通方法:向相应网络管理人员申请)

1.2 服务器配置

1.2.1 样例基础设备

IP(内网ip\弹性ip) OS 主机名 角色 硬盘数
192.168.0.78\172.31.96.64 CentOS7.5-arm64 ceph-1 deploy、mon1、osd1 40G2
192.168.0.187\172.31.96.59 CentOS7.5-arm64 ceph-2 mon
1、osd1 40G2
192.168.0.59\172.31.96.27 CentOS7.5-arm64 ceph-3 mon1、osd1 40G*2

1.2.2 环境准备

a.添加主机节点域名(三台机器)
vi /etc/hosts
192.168.0.78 172.31.96.64 ceph-1
192.168.0.187 172.31.96.59 ceph-2
192.168.0.59 172.31.96.27 ceph-3
b.修改hoatname,分别在三台机器上执行
hostnamectl --static set-hostname ceph-1
hostnamectl --static set-hostname ceph-2
hostnamectl --static set-hostname ceph-3
c.关闭防火墙和开机自启动(三台机器)
systemctl stop firewalld
systemctl disable firewalld
d.节点时区同步,保持一致
e.关闭selinux(三台机器)
vi /etc/selinux/config
#修改SELINUX=disabled
f.配置dns
vi /etc/resolv.conf
nameserver 114.114.114.114

2 安装部署

2.1 三台机器上配置好CEPH的yum源

[ceph]
name=Ceph packages for aarch64
baseurl=http://mirrors.aliyun.com/ceph/rpm-nautilus/el7/aarch64/
gpgcheck=0
[ceph-noarch]
name=Ceph-noarch packages for aarch64
baseurl=http://mirrors.aliyun.com/ceph/rpm-nautilus/el7/noarch/
gpgcheck=0

2.2 三台机器上安装CEPH客户端

yum install epel-release
yum makecache
yum -y install ceph ceph-radosgw

2.3 部署节点(ceph-1)安装ceph-deploy

yum -y install ceph-deploy
ceph-deploy --version
ceph –v

2.4 在部署节点(ceph-1) 生成ssh免登录key,并分发到其它两个节点

ssh-keygen -t rsa -P ‘’
ssh-copy-id ceph-2
ssh-copy-id ceph-3

2.5 创建部署目录,开始执行部署

mkdir -p /opt/ceph-cluster
cd /opt/ceph-cluster
ceph-deploy new ceph-1 ceph-2 ceph-3

若部署出现错误,需要重头开始:
ceph-deploy purge ceph-1 ceph-2 ceph-3
ceph-deploy purgedata ceph-1 ceph-2 ceph-3
ceph-deploy forgetkeys
rm ceph.*

2.6 配置public_network

vi /opt/ceph-cluster/ceph.conf
追加:public_network = 192.168.0.0/24

2.7 部署监控节点

ceph-deploy – mon create-initial

2.8 拷贝配置

ceph-deploy admin ceph-1 ceph-2 ceph-3

2.9 部署mgr

luminous之后mgr需要单独安装
ceph-deploy mgr create ceph-1
ceph-deploy mgr create ceph-2
ceph-deploy mgr create ceph-3

2.10 部署OSD节点

ceph-deploy osd create --data /dev/vdb ceph-1
ceph-deploy osd create --data /dev/vdb ceph-2
ceph-deploy osd create --data /dev/vdb ceph-3

2.11 检测集群状态

ceph –s

到此,一个简单的CEPH集群已搭建成功

FAQ

1 stderr: Physical volume ‘/dev/vdb’ is already in volume group ‘ceph-0ae0b9dc-cc2d-45ff-b804-92edcc3b71c7’

现象:运行ceph-deploy osd create --data /dev/vdb ceph-1
[ceph-1][WARNIN] stderr: Physical volume ‘/dev/vdb’ is already in volume group ‘ceph-0ae0b9dc-cc2d-45ff-b804-92edcc3b71c7’
[ceph-1][WARNIN] Unable to add physical volume ‘/dev/vdb’ to volume group ‘ceph-0ae0b9dc-cc2d-45ff-b804-92edcc3b71c7’
原因:可能之前运行过此任务,导致/dev/vdb已经加入了卷组
解决:vgremove ceph-0ae0b9dc-cc2d-45ff-b804-92edcc3b71c7

2 [errno 2] error connecting to the cluster

现象:[errno 2] error connecting to the cluster
原因:ceph.client.admin.keyring 文件未被同步到/etc/ceph下
解决:此问题有以下两种解决方式
1.ceph-deploy admin ceph-1 ceph-2 ceph-3
2. find / -name ceph.client.admin.keyring
将找到的ceph.client.admin.keyring文件copy到三台机器的/etc/ceph下

你可能感兴趣的:(ceph,linux,服务器,arm)