7.5. 手动升级 Ceph 文件系统元数据服务器节点

您可以在运行 Red Hat Enterprise Linux 7 或 8 的 Red Hat Ceph Storage 集群中手动升级 Ceph 文件系统 (CephFS) 元数据服务器 (MDS) 软件。

重要

在升级存储集群前,请将活跃 MDS 的数量减少为每个文件系统一个。这消除了多个 MDS 之间可能存在的版本冲突。另外,在升级前关闭所有待机节点。

这是因为 MDS 集群没有内置的版本或文件系统标志。如果没有这些功能,多个 MDS 可能会使用不同版本的 MDS 软件进行通信,并可能导致断言或其他故障发生。

先决条件

  • 一个正在运行的 Red Hat Ceph Storage 集群。
  • 节点使用 Red Hat Ceph Storage 版本 3.3z64 或 4.1。
  • 对存储集群中所有节点的根级别访问权限。
重要

底层 XFS 文件系统必须格式化为支持 ftype=1d_type。运行 xfs_info /var 命令以确保 ftype 设置为 1。如果 ftype 的值不是 1,请附加新磁盘或创建卷。在此新设备之上,创建新的 XFS 文件系统并将其挂载到 /var/lib/containers

从 Red Hat Enterprise Linux 8.0 开始,mkfs.xfs 默认启用 ftype=1

流程

  1. 将活跃 MDS 的数量减少到 1:

    语法

    ceph fs set FILE_SYSTEM_NAME max_mds 1

    示例

    [root@mds ~]# ceph fs set fs1 max_mds 1

  2. 等待集群停止所有 MDS 等级。当所有 MDS 停止后,仅排名 0 才处于活动状态。剩余的操作应处于待机模式。检查文件系统的状态:

    [root@mds ~]# ceph status
  3. 使用 systemctl 关闭所有备用 MDS:

    [root@mds ~]# systemctl stop ceph-mds.target
  4. 确认只有一个 MDS 在线,并且已为您的文件系统排名 0:

    [root@mds ~]# ceph status
  5. 如果您要从 RHEL 7 上的 Red Hat Ceph Storage 3 升级,请禁用 Red Hat Ceph Storage 3 工具存储库并启用 Red Hat Ceph Storage 4 工具存储库:

    [root@mds ~]# subscription-manager repos --disable=rhel-7-server-rhceph-3-tools-rpms
    [root@mds ~]# subscription-manager repos --enable=rhel-7-server-rhceph-4-tools-rpms
  6. 更新节点并重启 ceph-mds 守护进程:

    [root@mds ~]# yum update -y
    [root@mds ~]# systemctl restart ceph-mds.target
  7. 为待机守护进程跟踪相同的进程。禁用并启用工具存储库,然后升级并重启每个待机 MDS:

    [root@mds ~]# subscription-manager repos --disable=rhel-7-server-rhceph-3-tools-rpms
    [root@mds ~]# subscription-manager repos --enable=rhel-7-server-rhceph-4-tools-rpms
    [root@mds ~]# yum update -y
    [root@mds ~]# systemctl restart ceph-mds.target
  8. 当您完成重启所有待机 MDS 后,为存储集群恢复之前 max_mds 的值:

    语法

    ceph fs set FILE_SYSTEM_NAME max_mds ORIGINAL_VALUE

    示例

    [root@mds ~]# ceph fs set fs1 max_mds 5