集群切换UCX组网

在使能UCX之前,需要配置UCX参数以及所有节点的配置文件。

  1. 进入Ceph集群容器。

    1
    cephadm shell
    

  2. 配置UCX参数。

    1
    2
    3
    4
    5
    ceph config set global ms_type async+ucx
    ceph config set global ms_public_type async+ucx
    ceph config set global ms_cluster_type async+ucx
    ceph config set global ms_async_ucx_device mlx5_bond_0:1
    ceph config set global ms_async_ucx_tls rc_verbs,self 
    

  3. 在所有节点(ceph1/ceph2/ceph3)中mon的配置文件,增加如下配置。

    /var/lib/ceph/fsid/mon*/config
    
    ms_type = async+ucx
    ms_public_type = async+ucx
    ms_cluster_type = async+ucx
    ms_async_ucx_device=mlx5_bond_0:1
    ms_async_ucx_tls=rc_verbs,self
    • ms_async_ucx_device中的设备名称通过show_gids查看UCX设备名称,可填写多个网络设备。
    • 当前配置为public网络保持posix不变,cluster网络使用UCX。要在前端网络使能ucx,只需要将ms_public_type=async+ucx。
    • cluster_network和public_network的IP地址应与UCX设备(RoCE/IB网口)的IP地址一致。
    • ms_async_ucx_event_polling设置为true,代表开启事件轮询(选配)。
    • ms_async_ucx_zerocopy设置为true,代表开启零拷贝(选配)。
    • ms_async_rdma_polling_us代表每次查询事件事件时间(选配,6000000)。

  4. 在所有节点中将mon的修改同步到mgr和osd,执行如下。

    ls /var/lib/ceph/*/*/config|grep 'osd\|mgr'|xargs -I {} cp -r /var/lib/ceph/*/mon.*/config {}

  5. 修改service文件。

    sed -i 's/on-failure/always/g' /etc/systemd/system/ceph-*\@.service
    sed -i 's/30min/1min/g' /etc/systemd/system/ceph-*\@.service

  6. 重启ceph集群。

    1
    2
    systemctl daemon-reload
    systemctl restart ceph.target
    

  7. 待所有容器启动完成后,需重新进入Ceph集群容器查看集群状态。

    1
    2
    cephadm shell
    ceph -s