将 AWS ParallelCluster 托管存储转换为外部存储 - AWS ParallelCluster

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

将 AWS ParallelCluster 托管存储转换为外部存储

了解如何将 AWS ParallelCluster 托管存储转换为外部存储。

操作步骤基于下面的示例配置文件代码段。

... - MountDir: /fsx Name: fsx StorageType: FsxLustre FsxLustreSettings: StorageCapacity: 1200 DeletionPolicy: Delete ...
将 AWS ParallelCluster 托管存储转换为外部存储
  1. 在集群配置文件中将 DeletionPolicy 设置为 Retain

    ... - MountDir: /fsx Name: fsx StorageType: FsxLustre FsxLustreSettings: StorageCapacity: 1200 DeletionPolicy: Retain ...
  2. 要设置 DeletionPolicy 更改,请运行以下命令。

    pcluster update-cluster -n cluster-name -c cluster-config.yaml
  3. 从集群配置文件中删除 SharedStorage 部分。

    ... ...
  4. 要将托管 SharedStorage 更改为外部 SharedStorage 并将其与集群分离,请运行以下命令。

    pcluster update-cluster -n cluster-name -c cluster-config.yaml
  5. 您的共享存储现在变为了外部共享存储,并且已与集群分离。

  6. 要将外部文件系统附加到原始集群或其他集群,请按照以下步骤操作。

    1. 获取适用于 Lustre 的 FSx 文件系统 ID。

      1. 要使用 AWS CLI,请运行以下命令并找到名称中包含原始集群名称的文件系统,然后记下文件系统 ID。

        aws fsx describe-file-systems
      2. 要使用 AWS Management Console,请登录并导航至 https://console.aws.amazon.com/fsx/。在文件系统列表中,找到名称中包含原始集群名称的文件系统,并记下文件系统 ID。

    2. 更新文件系统安全组规则,以提供访问该文件系统和集群子网以及从该文件系统和集群子网进行访问的权限。您可以在 Amazon FSx 控制台中找到文件系统安全组的名称和 ID。

      向文件系统安全组中添加规则,允许针对头节点和计算节点 IP CIDR 范围或前缀的入站和出站 TCP 流量。为入站和出站 TCP 流量指定 TCP 端口 988、1021、1022 和 1023。

      有关更多信息,请参阅 AWS Command Line Interface 版本 2 用户指南 中的 SharedStorage/FsxLustreSettings/FileSystemId创建、配置和删除 Amazon EC2 的安全组

    3. SharedStorage 部分添加到集群配置中。

      ... - MountDir: /fsx Name: fsx-external StorageType: FsxLustre FsxLustreSettings: FileSystemId: fs-02e5b4b4abd62d51c ...
    4. 要向集群中添加外部共享,请运行以下命令。

      pcluster update-cluster -n cluster-name -c cluster-config.yaml