第 14 章 重新引导环境


可能需要重新启动环境。例如,当您需要修改物理服务器或从电源中断中恢复时。在这些情况下,务必要确保 Ceph Storage 节点正确引导。

您必须按以下顺序引导节点:

  1. 首先引导所有 Ceph 监控节点 - 这将确保 Ceph 监控服务在高可用性 Ceph 集群中处于活动状态。默认情况下,Ceph Monitor 服务安装在 Controller 节点上。如果 Ceph Monitor 与自定义角色中的 Controller 分开,请确保此自定义 Ceph Monitor 角色处于活动状态。
  2. 引导所有 Ceph Storage 节点 - 这样可确保 Ceph OSD 集群可以连接到 Controller 节点上的活跃 Ceph Monitor 集群。

14.1. 重新引导 Ceph Storage (OSD) 集群

完成以下步骤以重新引导 Ceph Storage (OSD) 节点集群。

先决条件

  • 在运行 ceph-mon 服务的 Ceph Monitor 或 Controller 节点上,检查 Red Hat Ceph Storage 集群状态是否健康,pg 状态为 active+clean

    $ sudo cephadm -- shell ceph status

    如果 Ceph 集群处于健康状态,它会返回 HEALTH_OK 状态。

    如果 Ceph 集群状态不健康,它会返回 HEALTH_WARNHEALTH_ERR 的状态。有关故障排除指南,请参阅 Red Hat Ceph Storage 5 故障排除指南

流程

  1. 登录到运行 ceph-mon 服务的 Ceph Monitor 或 Controller 节点,并临时禁用 Ceph Storage 集群重新平衡:

    $ sudo cephadm shell -- ceph osd set noout
    $ sudo cephadm shell -- ceph osd set norebalance
    注意

    如果您有多堆栈或分布式计算节点(DCN)架构,您必须在设置 nooutnorebalance 标志时指定 Ceph 集群名称。例如: sudo cephadm shell -c /etc/ceph/<cluster>.conf -k /etc/ceph/<cluster>.client.keyring

  2. 选择第一个要重新引导的 Ceph Storage 节点并登录到该节点。
  3. 重新引导节点:

    $ sudo reboot
  4. 稍等片刻,直到节点启动。
  5. 登录到节点并检查 Ceph 集群状态:

    $ sudo cephadm -- shell ceph status

    确认 pgmap 报告的所有 pgs 的状态是否都正常 (active+clean)。

  6. 注销节点,重新引导下一个节点,并检查其状态。重复此过程,直到您已重新引导所有 Ceph Storage 节点。
  7. 完成后,登录到运行 ceph-mon 服务的 Ceph Monitor 或 Controller 节点,并启用 Ceph 集群重新平衡:

    $ sudo cephadm shell -- ceph osd unset noout
    $ sudo cephadm shell -- ceph osd unset norebalance
    注意

    如果您有多堆栈或分布式计算节点(DCN)架构,您必须在取消设置 nooutnorebalance 标志时指定 Ceph 集群名称。例如: sudo cephadm shell -c /etc/ceph/<cluster>.conf -k /etc/ceph/<cluster>.client.keyring

  8. 执行最后的状态检查,确认集群报告 HEALTH_OK

    $ sudo cephadm shell ceph status
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.