8.5. 配置多个后端


您可以为共享文件系统服务(manila)部署多个后端,如 CephFS-NFS 后端、原生 CephFS 后端和第三方后端。仅为每个 pod 添加一个后端。

先决条件

流程

  1. 打开 OpenStackControlPlane CR 文件 openstack_control_plane.yaml,并在 manila 模板中添加以下参数来配置后端。在本例中,有 CephFS-NFS 后端、原生 CephFS 后端和 Pure 存储后端:

    apiVersion: core.openstack.org/v1beta1
    kind: OpenStackControlPlane
    spec:
        ...
      manila:
        enabled: true
        template:
          manilaAPI:
            replicas: 3
            customServiceConfig: |
              [DEFAULT]
              debug = true
              enabled_share_protocols=nfs,cephfs,cifs
          manilaScheduler:
            replicas: 3
        ...
    Copy to Clipboard Toggle word wrap
  2. 为每个要使用的后端添加配置:

    • 为 CephFS-NFS 后端添加配置:

          ...
              customServiceConfig: |
              ...
              manilaShares:
                cephfsnfs:
                  networkAttachments:
                  - storage
                  customServiceConfig: |
                      [DEFAULT]
                      enabled_share_backends=cephfsnfs
                      [cephfsnfs]
                      driver_handles_share_servers=False
                      share_backend_name=cephfs
                      share_driver=manila.share.drivers.cephfs.driver.CephFSDriver
                      cephfs_auth_id=openstack
                      cephfs_cluster_name=ceph
                      cephfs_nfs_cluster_id=cephfs
                      cephfs_protocol_helper_type=NFS
                  replicas: 1
          ...
      Copy to Clipboard Toggle word wrap
    • 为原生 CephFS 后端添加配置:

          ...
              customServiceConfig: |
              ...
              manilaShares:
                cephfsnfs:
                ...
                cephfs:
                  networkAttachments:
                  - storage
                  customServiceConfig: |
                    [DEFAULT]
                    enabled_share_backends=cephfs
                    [cephfs]
                    driver_handles_share_servers=False
                    share_backend_name=cephfs
                    share_driver=manila.share.drivers.cephfs.driver.CephFSDriver
                    cephfs_conf_path=/etc/ceph/ceph.conf
                    cephfs_auth_id=openstack
                    cephfs_protocol_helper_type=CEPHFS
                  replicas: 1
          ...
      Copy to Clipboard Toggle word wrap
    • 为 Pure 存储后端添加配置:

          ...
              customContainerImages:
                manilaShareImages:
                  pure: registry.connect.redhat.com/purestorage/openstack-manila-share-pure:rhoso18
              manilaShares:
                cephfsnfs:
                ...
                cephfs:
                ...
                pure:
                  networkAttachments:
                  - storage
                  customServiceConfigSecret: |
                  - manila-pure-secret
                  customServiceConfig: |
                    [DEFAULT]
                    debug = true
                    enabled_share_backends=pure
                    [pure]
                    driver_handles_share_servers=False
                    share_backend_name=pure
                    share_driver=manila.share.drivers.purestorage.flashblade.FlashBladeShareDriver
          ...
      Copy to Clipboard Toggle word wrap
  3. 更新 control plane:

    $ oc apply -f openstack_control_plane.yaml -n openstack
    Copy to Clipboard Toggle word wrap
  4. 等待 RHOCP 创建与 OpenStackControlPlane CR 相关的资源。运行以下命令来检查状态:

    $ oc get openstackcontrolplane -n openstack
    Copy to Clipboard Toggle word wrap

    当状态为 "Setup complete" 时,会创建 OpenStackControlPlane 资源。

    提示

    -w 选项附加到 get 命令的末尾,以跟踪部署进度。

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

Theme

© 2025 Red Hat