本文尝试在龙蜥Anolis OS8.6QU1上通过cephadm部署ceph17.2.0分布式块存储,实现国产化操作系统上的存储系统构建。
一、按兼容模式安装Anolis OS8.6QU1系统
参照本人前面写的文档,先行兼容模式最小化安装Anolis OS8.6QU1系统
确认系统运行在RHCK内核下(内核版本为4.18.0)
[root@ceph1 opt]# rpm -qa |grep kernel
kernel-modules-4.18.0-372.16.1.an8_6.x86_64
kernel-tools-libs-4.18.0-372.16.1.an8_6.x86_64
kernel-4.18.0-372.16.1.an8_6.x86_64
kernel-core-4.18.0-372.16.1.an8_6.x86_64
kernel-devel-4.18.0-372.16.1.an8_6.x86_64
kernel-headers-4.18.0-372.16.1.an8_6.x86_64
kernel-tools-4.18.0-372.16.1.an8_6.x86_64
二、完成镜像准备
1、下载所需容器镜像:
podman pull docker.io/library/haproxy:2.3
podman pull quay.io/ceph/ceph:v17.2.0
podman pull quay.io/ceph/ceph-grafana:8.3.5
podman pull quay.io/prometheus/prometheus:v2.33.4
podman pull quay.io/prometheus/node-exporter:v1.3.1
podman pull quay.io/prometheus/alertmanager:v0.23.0
podman pull docker.io/maxwo/snmp-notifier:v1.2.1
podman pull docker.io/arcts/keepalived:latest
2、保存所拉取的镜像:
podman save -o images/cephv17.2.0.tar quay.io/ceph/ceph:v17.2.0
podman save -o images/prometheus-v2.33.4.tar quay.io/prometheus/prometheus:v2.33.4
podman save -o images/node-exporter-v1.3.1.tar quay.io/prometheus/node-exporter:v1.3.1
podman save -o images/alertmanager-v0.23.0.tar quay.io/prometheus/alertmanager:v0.23.0
podman save -o images/ceph-grafana-8.3.5.tar quay.io/ceph/ceph-grafana:8.3.5
podman save -o images/haproxy-2.3.tar docker.io/library/haproxy:2.3
podman save -o images/keepalived.tar docker.io/arcts/keepalived:latest
podman save -o images/snmp-notifier-v1.2.1.tar docker.io/maxwo/snmp-notifier:v1.2.1
3、查看确认相关镜像文件:
[root@localhost images]# ll
总用量 2304528
-rw-r--r-- 1 AAAA AAAA 58962432 5月 27 2022 alertmanager-v0.23.0.tar
-rw-r--r-- 1 AAAA AAAA 570742784 5月 27 2022 ceph-grafana-8.3.5.tar
-rw-r--r-- 1 AAAA AAAA 1368927232 5月 27 2022 cephv17.2.0.tar
-rw-r--r-- 1 AAAA AAAA 102969856 5月 27 2022 haproxy-2.3.tar
-rw-r--r-- 1 AAAA AAAA 16243712 5月 27 2022 keepalived.tar
-rw-r--r-- 1 AAAA AAAA 22312960 5月 27 2022 node-exporter-v1.3.1.tar
-rw-r--r-- 1 AAAA AAAA 204994048 5月 27 2022 prometheus-v2.33.4.tar
-rw-r--r-- 1 AAAA AAAA 14664192 5月 27 2022 snmp-notifier-v1.2.1.tar
三、准备ceph-admin\ceph-common相关公共文件包
如下文件清单:
[root@localhost ceph-commonV17.2.0]# ll
总用量 65304
-rw-r--r-- 1 AAAA AAAA 72292 5月 27 2022 cephadm-17.2.0-0.el8.noarch.rpm
-rw-r--r-- 1 AAAA AAAA 5513604 5月 27 2022 ceph-base-17.2.0-0.el8.x86_64.rpm
-rw-r--r-- 1 AAAA AAAA 24141596 5月 27 2022 ceph-common-17.2.0-0.el8.x86_64.rpm
-rw-r--r-- 1 AAAA AAAA 17611856 5月 27 2022 ceph-osd-17.2.0-0.el8.x86_64.rpm
-rw-r--r-- 1 AAAA AAAA 24716 5月 27 2022 ceph-selinux-17.2.0-0.el8.x86_64.rpm
-rw-r--r-- 1 AAAA AAAA 322596 5月 27 2022 gperftools-libs-2.7-6.el8.x86_64.rpm
-rw-r--r-- 1 AAAA AAAA 205164 5月 27 2022 libbabeltrace-1.5.4-3.el8.x86_64.rpm
-rw-r--r-- 1 AAAA AAAA 809020 5月 27 2022 libcephfs2-17.2.0-0.el8.x86_64.rpm
-rw-r--r-- 1 AAAA AAAA 393712 5月 27 2022 libibverbs-37.2-1.el8.x86_64.rpm
-rw-r--r-- 1 AAAA AAAA 60164 5月 27 2022 liboath-2.6.2-3.el8.x86_64.rpm
-rw-r--r-- 1 AAAA AAAA 47804 5月 27 2022 librabbitmq-0.9.0-2.el8.x86_64.rpm
-rw-r--r-- 1 AAAA AAAA 3604092 5月 27 2022 librados2-17.2.0-0.el8.x86_64.rpm
-rw-r--r-- 1 AAAA AAAA 494348 5月 27 2022 libradosstriper1-17.2.0-0.el8.x86_64.rpm
-rw-r--r-- 1 AAAA AAAA 4060516 5月 27 2022 librbd1-17.2.0-0.el8.x86_64.rpm
-rw-r--r-- 1 AAAA AAAA 361824 5月 27 2022 librdkafka-0.11.4-1.el8.x86_64.rpm
-rw-r--r-- 1 AAAA AAAA 79628 5月 27 2022 librdmacm-37.2-1.el8.x86_64.rpm
-rw-r--r-- 1 AAAA AAAA 5573832 5月 27 2022 librgw2-17.2.0-0.el8.x86_64.rpm
-rw-r--r-- 1 AAAA AAAA 76804 5月 27 2022 libunwind-1.3.1-3.el8.x86_64.rpm
-rw-r--r-- 1 AAAA AAAA 265716 5月 27 2022 lttng-ust-2.8.1-11.el8.x86_64.rpm
-rw-r--r-- 1 AAAA AAAA 45608 5月 27 2022 python3-ceph-argparse-17.2.0-0.el8.x86_64.rpm
-rw-r--r-- 1 AAAA AAAA 105960 5月 27 2022 python3-ceph-common-17.2.0-0.el8.x86_64.rpm
-rw-r--r-- 1 AAAA AAAA 181704 5月 27 2022 python3-cephfs-17.2.0-0.el8.x86_64.rpm
-rw-r--r-- 1 AAAA AAAA 44920 5月 27 2022 python3-prettytable-0.7.2-14.el8.noarch.rpm
-rw-r--r-- 1 AAAA AAAA 374300 5月 27 2022 python3-rados-17.2.0-0.el8.x86_64.rpm
-rw-r--r-- 1 AAAA AAAA 353620 5月 27 2022 python3-rbd-17.2.0-0.el8.x86_64.rpm
-rw-r--r-- 1 AAAA AAAA 111944 5月 27 2022 python3-rgw-17.2.0-0.el8.x86_64.rpm
-rw-r--r-- 1 AAAA AAAA 64676 5月 27 2022 rdma-core-29.0-3.el8.x86_64.rpm
-rw-r--r-- 1 AAAA AAAA 1818384 5月 27 2022 thrift-0.13.0-2.el8.x86_64.rpm
四、主机配置:
-
配置hosts文件:
[root@localhost opt]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.188.1 ceph1
192.168.188.2 ceph2
192.168.188.3 ceph3
192.168.188.4 ceph4
192.168.188.203 iscsi1
192.168.188.204 iscsi2
-
修改chronyd服务配置,该服务默认已安装并启用,192.168.17.35为外部时钟源地址
[root@cehp1 opt]# vi /etc/chrony.conf
[root@cehp1 opt] # cat /etc/chrony.conf
pool 192.168.17.35
driftfile /var/lib/chrony/drift
makestep 1.0 3
rtcsync
allow 192.168.188.0/24
keyfile /etc/chrony.keys
leapsectz right/UTC
ntsdumpdir /var/lib/chrony
logdir /var/log/chrony
[root@cehp1 opt] # systemctl restart chronyd
[root@cehp1 opt]# systemctl status chronyd
● chronyd.service - NTP client/server
Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2023-03-10 14:14:12 CST; 5s ago
Docs: man:chronyd(8)
man:chrony.conf(5)
Process: 307