Skip to main content
BeeGFS on NetApp with E-Series Storage
简体中文版经机器翻译而成,仅供参考。如与英语版出现任何冲突,应以英语版为准。

部署BeeGFS客户端

贡献者

也可以使用Ansible配置BeeGFS客户端并挂载文件系统。

概述

要访问BeeGFS文件系统、需要在需要挂载文件系统的每个节点上安装和配置BeeGFS客户端。本节介绍如何使用可用执行这些任务 "Ansible角色"

步骤

创建客户端清单文件

  1. 如果需要、请从Ansible控制节点向要配置为BeeGFS客户端的每个主机设置无密码SSH:

    ssh-copy-id <user>@<HOSTNAME_OR_IP>
  2. host_vars/`下、为名为的每个BeeGFS客户端创建一个文件 `<HOSTNAME>.yml 使用以下内容、在占位符文本中填写适用于您环境的正确信息:

    # BeeGFS Client
    ansible_host: <MANAGEMENT_IP>
  3. 如果要使用NetApp E系列主机集合的角色配置InfiniBand或以太网接口、以便客户端连接到BeeGFS文件节点、也可以包括以下选项之一:

    1. 网络类型为 "InfiniBand (使用IPoIB)"

      eseries_ipoib_interfaces:
      - name: <INTERFACE>  # Example: ib0 or i1b
        address: <IP/SUBNET> # Example: 100.127.100.1/16
      - name: <INTERFACE>  # Additional interfaces as needed.
        address: <IP/SUBNET>
    2. 网络类型为 "基于融合以太网的RDMA (RoCE)"

      eseries_roce_interfaces:
      - name: <INTERFACE>  # Example: eth0.
        address: <IP/SUBNET> # Example: 100.127.100.1/16
      - name: <INTERFACE>  # Additional interfaces as needed.
        address: <IP/SUBNET>
    3. 网络类型为 "以太网(仅限TCP、无RDMA)"

      eseries_ip_interfaces:
      - name: <INTERFACE>  # Example: eth0.
        address: <IP/SUBNET> # Example: 100.127.100.1/16
      - name: <INTERFACE>  # Additional interfaces as needed.
        address: <IP/SUBNET>
  4. 创建新文件 client_inventory.yml 并指定Ansible应用于连接到每个客户端的用户、Ansible应用于权限升级的密码(这需要 ansible_ssh_user 为root用户或具有sudo权限):

    # BeeGFS client inventory.
    all:
      vars:
        ansible_ssh_user: <USER>
        ansible_become_password: <PASSWORD>
    重要说明 请勿以纯文本格式存储密码。请改用Ansible Vault (请参见) "Ansible文档" 使用Ansible Vault对内容进行加密)或使用 --ask-become-pass 运行攻略手册时的选项。
  5. 在中 client_inventory.yml 文件中、列出应在下配置为BeeGFS客户端的所有主机 beegfs_clients 组、然后参考实时注释、取消注释在系统上构建BeeGFS客户端内核模块所需的任何其他配置:

    children:
        # Ansible group representing all BeeGFS clients:
        beegfs_clients:
          hosts:
            <CLIENT HOSTNAME>:
            # Additional clients as needed.
    
          vars:
            # OPTION 1: If you’re using the Mellanox OFED drivers and they are already installed:
            #eseries_ib_skip: True # Skip installing inbox drivers when using the IPoIB role.
            #beegfs_client_ofed_enable: True
            #beegfs_client_ofed_include_path: "/usr/src/ofa_kernel/default/include"
    
            # OPTION 2: If you’re using inbox IB/RDMA drivers and they are already installed:
            #eseries_ib_skip: True # Skip installing inbox drivers when using the IPoIB role.
    
            # OPTION 3: If you want to use inbox IB/RDMA drivers and need them installed/configured.
            #eseries_ib_skip: False # Default value.
            #beegfs_client_ofed_enable: False # Default value.
    备注 使用Mellanox OFED驱动程序时、请确保beegfs_client_OFED_include_path指向适用于Linux安装的正确"header include path"。有关详细信息、请参见的BeeGFS文档 "RDMA支持"
  6. 在中 client_inventory.yml 文件中、列出要在先前定义的任何下挂载的BeeGFS文件系统 vars

            beegfs_client_mounts:
              - sysMgmtdHost: <IP ADDRESS>  # Primary IP of the BeeGFS management service.
                mount_point: /mnt/beegfs    # Path to mount BeeGFS on the client.
                connInterfaces:
                  - <INTERFACE> # Example: ibs4f1
                  - <INTERFACE>
                beegfs_client_config:
                  # Maximum number of simultaneous connections to the same node.
                  connMaxInternodeNum: 128 # BeeGFS Client Default: 12
                  # Allocates the number of buffers for transferring IO.
                  connRDMABufNum: 36 # BeeGFS Client Default: 70
                  # Size of each allocated RDMA buffer
                  connRDMABufSize: 65536 # BeeGFS Client Default: 8192
                  # Required when using the BeeGFS client with the shared-disk HA solution.
                  # This does require BeeGFS targets be mounted in the default “sync” mode.
                  # See the documentation included with the BeeGFS client role for full details.
                  sysSessionChecksEnabled: false
            # Specify additional file system mounts for this or other file systems.
  7. 截至BeeGFS 7.2.7和7.3.1 "连接身份验证" 必须配置或显式禁用。根据指定时选择的配置基于连接的身份验证的方式 "通用文件节点配置"、您可能需要调整客户端配置:

    1. 默认情况下、HA集群部署将自动配置连接身份验证并生成 connauthfile 该位置将放置/维护在位于的Ansible控制节点上 <INVENTORY>/files/beegfs/<sysMgmtdHost>_connAuthFile。默认情况下、BeeGFS客户端角色设置为读取此文件或将其分发到中定义的客户端 client_inventory.yml、不需要执行其他操作。

      1. 有关高级选项、请参阅随附的默认值完整列表 "BeeGFS客户端角色"

    2. 如果选择使用指定自定义密钥 beegfs_ha_conn_auth_secret 在中指定 client_inventory.yml 文件:

      beegfs_ha_conn_auth_secret: <SECRET>
    3. 如果选择完全禁用基于连接的身份验证 beegfs_ha_conn_auth_enabled、在中指定 client_inventory.yml 文件:

      beegfs_ha_conn_auth_enabled: false

有关支持的参数的完整列表和其他详细信息、请参见 "完整的BeeGFS客户端文档"。有关客户端清单的完整示例、请单击 "此处"

创建BeeGFS客户端攻略手册文件

  1. 创建新文件 client_playbook.yml

    # BeeGFS client playbook.
    - hosts: beegfs_clients
      any_errors_fatal: true
      gather_facts: true
      collections:
        - netapp_eseries.beegfs
        - netapp_eseries.host
      tasks:
  2. 可选:如果要使用NetApp E系列主机集合的角色配置客户端连接到BeeGFS文件系统的接口、请导入与要配置的接口类型对应的角色:

    1. 如果您使用的是使用InfiniBand (IPoIB):

          - name: Ensure IPoIB is configured
            import_role:
              name: ipoib
    2. 如果您使用的是基于融合以太网的RDMA (RoCE):

          - name: Ensure IPoIB is configured
            import_role:
              name: roce
    3. 如果您使用的是以太网(仅限TCP、无RDMA):

          - name: Ensure IPoIB is configured
            import_role:
              name: ip
  3. 最后、导入BeeGFS客户端角色以安装客户端软件并设置文件系统挂载:

        # REQUIRED: Install the BeeGFS client and mount the BeeGFS file system.
        - name: Verify the BeeGFS clients are configured.
          import_role:
            name: beegfs_client

有关客户端攻略手册的完整示例、请单击 "此处"

运行BeeGFS客户端攻略手册

要安装/构建客户端并挂载BeeGFS、请运行以下命令:

ansible-playbook -i client_inventory.yml client_playbook.yml