9.5. 将 Red Hat Ceph Storage RBD 迁移到外部 RHEL 节点
对于运行 Red Hat Ceph Storage 7 或更高版本的超融合基础架构(HCI)或专用存储节点,您必须将 Red Hat OpenStack Platform control plane 中包含的守护进程迁移到现有的外部 Red Hat Enterprise Linux (RHEL)节点。外部 RHEL 节点通常包括 HCI 环境或专用存储节点的 Compute 节点。
先决条件
- 完成 Red Hat OpenStack Platform 17.1 环境中的任务。有关更多信息,请参阅 Red Hat Ceph Storage 先决条件。
9.5.1. 将 Ceph Manager 守护进程迁移到 Red Hat Ceph Storage 节点 复制链接链接已复制到粘贴板!
您必须将 Ceph Manager 守护进程从 Red Hat OpenStack Platform (RHOSP) Controller 节点迁移到一组目标节点。如果 Red Hat Ceph Storage 由带有 Hyperconverged Infrastructure (HCI)拓扑的 director Operator 部署,则目标节点可以是现有的 Red Hat Ceph Storage 节点,或 RHOSP Compute 节点。
以下流程使用 cephadm 和 Ceph Orchestrator 来驱动 Ceph Manager 迁移,使用 Ceph spec 修改放置并重新调度 Ceph Manager 守护进程。Ceph 管理器以主动/被动状态运行。它还提供许多模块,包括 Ceph 编排器。ceph-mgr 提供的每个潜在的模块(如 Ceph 控制面板)都会隐式迁移 Ceph Manager。
流程
SSH 到目标节点,并启用访问 Ceph Manager 服务所需的防火墙规则:
dports="6800:7300" ssh heat-admin@<target_node> sudo iptables -I INPUT \ -p tcp --match multiport --dports $dports -j ACCEPT;将
<target_node> 替换为 Red Hat Ceph Storage 环境中列出的主机的主机名。运行ceph orch host ls以查看主机列表。为每个目标节点重复此步骤。
检查规则是否已正确应用到目标节点并保留它们:
$ sudo iptables-save $ sudo systemctl restart iptables如果在现有部署中使用了
nftables,请编辑/etc/nftables/tripleo-rules.nft并添加以下内容:# 113 ceph_mgr {'dport': ['6800-7300', 8444]} add rule inet filter TRIPLEO_INPUT tcp dport { 6800-7300,8444 } ct state new counter accept comment "113 ceph_mgr"- 保存该文件。
重启
nftables服务:$ sudo systemctl restart nftables验证是否应用了规则:
$ sudo nft list ruleset | grep ceph_mgr准备目标节点以托管新的 Ceph Manager 守护进程,并将
mgr标签添加到目标节点:$ sudo cephadm shell -- ceph orch host label add <target_node> mgr- 对托管 Ceph Manager 守护进程的每个目标节点重复步骤 1-7。
获取 Ceph Manager 规格:
$ SPEC_DIR=${SPEC_DIR:-"$PWD/ceph_specs"} $ mkdir -p ${SPEC_DIR} $ sudo cephadm shell -- ceph orch ls --export mgr > ${SPEC_DIR}/mgr编辑检索到的 spec,并将
label: mgr部分添加到placement部分:service_type: mgr service_id: mgr placement: label: mgr- 保存 spec。
使用 Ceph 编排器应用带有
cephadm的 spec:$ SPEC_DIR=${SPEC_DIR:-"$PWD/ceph_specs"} $ sudo cephadm shell -m ${SPEC_DIR}/mgr -- ceph orch apply -i /mnt/mgr
验证
验证目标节点上是否创建了新的 Ceph Manager 守护进程:
$ sudo cephadm shell -- ceph orch ps | grep -i mgr $ sudo cephadm shell -- ceph -sCeph 管理器守护进程计数应当与添加
mgr标签的主机数量匹配。注意迁移不会缩小 Ceph Manager 守护进程。计数由目标节点数量增加,并将 Ceph Monitor 守护进程迁移到 Red Hat Ceph Storage 节点停用 Ceph 管理器实例。有关更多信息,请参阅将 Ceph Monitor 守护进程迁移到 Red Hat Ceph Storage 节点。