14.7. 模拟节点故障

要模拟硬节点故障,请关闭节点并重新安装操作系统。

先决条件

  • 一个正常运行的 Red Hat Ceph Storage 集群。
  • 对存储集群中所有节点的 root 级别访问。

流程

  1. 检查存储集群的容量以了解删除节点的影响:

    示例

    [ceph: root@host01 /]# ceph df
    [ceph: root@host01 /]# rados df
    [ceph: root@host01 /]# ceph osd df

  2. (可选)禁用恢复和回填:

    示例

    [ceph: root@host01 /]# ceph osd set noout
    [ceph: root@host01 /]# ceph osd set noscrub
    [ceph: root@host01 /]# ceph osd set nodeep-scrub

  3. 关闭节点。
  4. 如果要更改主机名,请从 CRUSH 映射中删除节点:

    示例

    [ceph: root@host01 /]# ceph osd crush rm host03

  5. 检查存储集群的状态:

    示例

    [ceph: root@host01 /]# ceph -s

  6. 在节点上重新安装操作系统。
  7. 添加新节点:

  8. (可选)启用恢复和回填:

    示例

    [ceph: root@host01 /]# ceph osd unset noout
    [ceph: root@host01 /]# ceph osd unset noscrub
    [ceph: root@host01 /]# ceph osd unset nodeep-scrub

  9. 检查 Ceph 的健康状况:

    示例

    [ceph: root@host01 /]# ceph -s

其它资源