1.9.4. 创建 NFS Ganesha 集群


重要

本节中的内容 作为技术预览提供,因此不受红帽完全支持。它只应用于测试,不应部署在生产环境中。如需更多信息,请参阅 技术预览

如果您将 CephFS through NFS 与共享文件系统服务(manila)搭配使用,您必须在 Red Hat Ceph Storage 集群上创建新的集群的 NFS 服务。此服务替换您在 Red Hat OpenStack Platform (RHOSP) 17.1 中使用的独立、由 Pacemaker 控制的 ceph-nfs 服务。

流程

  1. 识别 Red Hat Ceph Storage 节点,以部署新的集群 NFS 服务,如 cephstorage-0cephstorage-1cephstorage-2

    注意

    您必须在 StorageNFS 隔离的网络中部署此服务,以便您可以通过新的 NFS 导出位置挂载现有的共享。您可以在现有 Ceph 存储节点或 HCI 节点上部署新的集群 NFS 服务,也可以在 Red Hat Ceph Storage 集群中注册的新硬件上部署。

  2. 如果您使用 director Operator 部署 Red Hat Ceph Storage 节点,请将 StorageNFS 网络传播到部署 ceph-nfs 服务的目标节点。

    注意

    如果目标节点不是由 director 管理,则无法使用此流程配置网络。管理员必须手动配置所有必需的网络。

    1. 识别 RHOSP 环境中使用的节点定义文件 overcloud-baremetal-deploy.yaml。有关识别 overcloud-baremetal-deploy.yaml 文件的更多信息,请参阅 OpenShift 部署上自定义 Red Hat OpenStack Services 中的自定义 overcloud 网络
    2. 编辑与 Red Hat Ceph Storage 节点关联的网络,使其包含 StorageNFS 网络:

      - name: CephStorage
        count: 3
        hostname_format: cephstorage-%index%
        instances:
        - hostname: cephstorage-0
          name: ceph-0
        - hostname: cephstorage-1
          name: ceph-1
        - hostname: cephstorage-2
          name: ceph-2
        defaults:
          profile: ceph-storage
          network_config:
            template: /home/stack/network/nic-configs/ceph-storage.j2
            network_config_update: true
          networks:
          - network: ctlplane
            vif: true
          - network: storage
          - network: storage_mgmt
          - network: storage_nfs
    3. 编辑 Red Hat Ceph Storage 节点的 /home/stack/network/nic-configs/ceph-storage.j2,使其包含连接到 StorageNFS 网络的接口:

      - type: vlan
        device: nic2
        vlan_id: {{ storage_nfs_vlan_id }}
        addresses:
        - ip_netmask: {{ storage_nfs_ip }}/{{ storage_nfs_cidr }}
        routes: {{ storage_nfs_host_routes }}
    4. 更新 Red Hat Ceph Storage 节点:

      $ openstack overcloud node provision \
          --stack overcloud   \
          --network-config -y  \
          -o overcloud-baremetal-deployed-storage_nfs.yaml \
          --concurrency 2 \
          /home/stack/network/baremetal_deployment.yaml

      更新完成后,确保 Red Hat Ceph Storage 节点中创建了一个新接口,并使用与 StorageNFS 关联的 VLAN 标记。

  3. 识别 StorageNFS 网络的 IP 地址,以用作 Ceph NFS 服务的虚拟 IP 地址(VIP):

    $ openstack port list -c "Fixed IP Addresses" --network storage_nfs
  4. 在正在运行的 cephadm shell 中,识别 NFS 服务的主机:

    $ ceph orch host ls
  5. 标记您确定的每个主机。对您要标记的每个主机重复这个命令:

    $ ceph orch host label add <hostname> nfs
    • <hostname > 替换为您识别的主机的名称。
  6. 创建 NFS 集群:

    $ ceph nfs cluster create cephfs \
        "label:nfs" \
        --ingress \
        --virtual-ip=<VIP> \
        --ingress-mode=haproxy-protocol
    • <VIP > 替换为 Ceph NFS 服务的 VIP。

      注意

      您必须将 ingress-mode 参数设置为 haproxy-protocol。不支持其他 ingress 模式。此入口模式允许您通过共享文件系统服务强制客户端限制。有关部署集群 Ceph NFS 服务的更多信息,请参阅 Red Hat Ceph Storage 7 Operations Guide 中的使用 Ceph Orchestrator (Limited Availability)管理 NFS-Ganesha 网关

  7. 检查 NFS 集群的状态:

    $ ceph nfs cluster ls
    $ ceph nfs cluster info cephfs
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

關於紅帽

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

让开源更具包容性

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

关于红帽文档

Legal Notice

Theme

© 2026 Red Hat
返回顶部