24.2. 将 OSD 从 FileStore 迁移到 BlueStore
要从 FileStore 迁移到 BlueStore,director 使用 Ansible 删除并重新创建节点上的所有 OSD。director 在迁移过程前执行容量检查。最后,director 会使用 BlueStore 后端销毁 OSD。
您可以通过增加回填和恢复操作的节流,加快从 FileStore 迁移到 BlueStore。有关节流的更多信息,请参阅红帽知识库文章 Ceph:排除回填和恢复和重新平衡。在开始节流步骤前,请联络 Red Hat Ceph Storage 团队,以确保流程可以安全地在您的环境中使用。
先决条件
功能并运行 Red Hat Ceph Storage (RHCS) 4 集群。您可以通过在 Controller 或 Standalone Ceph MON 节点上的 ceph MON 容器中输入以下命令来检查集群:
[root@overcloud-controller-1 ~]# podman exec -it ceph-mon-overcloud-controller-1 sh -c "ceph -s"
流程
确保
CephAnsibleDisksConfig参数中的osd_objectstore没有默认为文件存储。如果osd_objectstore参数存在于任何自定义 heat 环境文件中,您必须明确定义值bluestore或删除它:parameter_defaults: CephAnsibleDisksConfig: devices: - /dev/sdb - /dev/sdc - /dev/sdd osd_scenario: lvm osd_objectstore: bluestore注意如果您有任何特定的 FileStore 配置,例如日志,请确保相应地更新配置。有关高级配置的更多信息,请参阅 Deploying an overcloud with containerized Red Hat Ceph 指南中的 Mapping the Ceph Storage Node Disk Layout。
-
以
stack用户的身份登录 undercloud。 使用
ceph_fstobs标签输入openstack overcloud external-upgrade run命令。将<NODE_NAME> 替换为您要升级的 Ceph OSD 节点的名称。您可以使用openstack server list命令查找节点名称。[stack@undercloud ~] $ openstack overcloud external-upgrade run --tags ceph_fstobs -e ceph_ansible_limit=<NODE_NAME> | tee oc-fstobs.log登录具有 Ceph MON 服务的节点,再查询 Ceph 集群以检查已升级节点的 OSD 的状态。在启动下一个 OSD 节点的迁移前,您必须确定已升级的节点已成功迁移:
[heat-admin@overcloud-controller-1 ~]$ sudo -i [root@overcloud-controller-1 ~]# podman exec -it ceph-mon-overcloud-controller-1 sh -c "ceph -f json osd metadata" | jq -c '.[] | select(.hostname == "<NODE_NAME>") | ["host", .hostname, "osd_id", .id, "objectstore", .osd_objectstore]' [root@overcloud-controller-1 ~]# exit将 <NODE_NAME> 替换为迁移的节点的名称。如果结果显示 OSD 使用 BlueStore,则其迁移会成功。
可选: 要查看有关特定 OSD 的额外详情,请输入以下命令:
[root@overcloud-controller-1 ~]# podman exec -it ceph-mon-overcloud-controller-1 sh -c "ceph osd metadata <ID>"将 <ID> 替换为您要查询的 OSD 的 ID。
在下一个节点上启动迁移过程前,您必须等待集群同步。
[root@overcloud-controller-1 ~]# podman exec -it ceph-mon-overcloud-controller-1 sh -c "ceph -s"Review the command output and ensure that the health of the cluster is `HEALTH_OK` and the PGs are in the `active+clean` state.在下一个节点上启动迁移过程前,您必须等待集群重新平衡过程完成。要跟踪状态,请运行以下命令:
[heat-admin@overcloud-controller-0 ~]$ sudo podman exec ceph-mon-<NODE_NAME> ceph -w将 <NODE_NAME> 替换为迁移的节点的名称。
- 为存储集群中的每个节点重复迁移过程。
有关从 FileStore 迁移到 BlueStore 的更多信息,请参阅 Red Hat Ceph Storage Administration Guide 中的 BlueStore。