

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# Configuration
<a name="configuration"></a>

根據預設， AWS ParallelCluster 會將 `~/.parallelcluster/config` 檔案用於所有組態參數。您可以使用 `-c`或 `--config`命令列選項或 `AWS_PCLUSTER_CONFIG_FILE`環境變數來指定自訂組態檔案。

範例組態檔案與 一起安裝在 的 AWS ParallelCluster Python 目錄中`site-packages/aws-parallelcluster/examples/config`。範例組態檔也可以在 GitHub 上取得，網址為 [https://github.com/aws/aws-parallelcluster/blob/v2.11.9/cli/src/pcluster/examples/config](https://github.com/aws/aws-parallelcluster/blob/v2.11.9/cli/src/pcluster/examples/config)。

目前 AWS ParallelCluster 2 版本：2.11.9。

**Topics**
+ [版面配置](#layout)
+ [`[global]` 區段](global.md)
+ [`[aws]` 區段](aws.md)
+ [`[aliases]` 區段](aliases.md)
+ [`[cluster]` 區段](cluster-definition.md)
+ [`[compute_resource]` 區段](compute-resource-section.md)
+ [`[cw_log]` 區段](cw-log-section.md)
+ [`[dashboard]` 區段](dashboard-section.md)
+ [`[dcv]` 區段](dcv-section.md)
+ [`[ebs]` 區段](ebs-section.md)
+ [`[efs]` 區段](efs-section.md)
+ [`[fsx]` 區段](fsx-section.md)
+ [`[queue]` 區段](queue-section.md)
+ [`[raid]` 區段](raid-section.md)
+ [`[scaling]` 區段](scaling-section.md)
+ [`[vpc]` 區段](vpc-section.md)
+ [範例](examples.md)

## 版面配置
<a name="layout"></a>

 AWS ParallelCluster 組態在多個區段中定義。

需要以下區段： [`[global]`](global.md)區段和 [`[aws]`區段](aws.md)。

您也必須包含至少一個[`[cluster]`區段](cluster-definition.md)和一個[`[vpc]`區段](vpc-section.md)。

區段的開頭為括號括住的區段名稱，接著是參數和組態。

```
[global]
cluster_template = default
update_check = true
sanity_check = true
```

# `[global]` 區段
<a name="global"></a>

指定與 `pcluster` 相關的全域組態選項。

```
[global]
```

**Topics**
+ [`cluster_template`](#cluster-template)
+ [`update_check`](#update-check)
+ [`sanity_check`](#sanity-check)

## `cluster_template`
<a name="cluster-template"></a>

定義預設用於叢集的`cluster`區段名稱。如需`cluster`區段的詳細資訊，請參閱 [`[cluster]` 區段](cluster-definition.md)。叢集名稱必須以字母開頭，包含不超過 60 個字元，且僅包含字母、數字和連字號 (-)。

例如，以下設定會指定預設使用會啟動 `[cluster default]` 的區段。

```
cluster_template = default
```

[更新政策：更新期間不會分析此設定。](using-pcluster-update.md#update-policy-setting-ignored)

## `update_check`
<a name="update-check"></a>

**（選用）** 檢查 的更新`pcluster`。

預設值為 `true`。

```
update_check = true
```

[更新政策：更新期間不會分析此設定。](using-pcluster-update.md#update-policy-setting-ignored)

## `sanity_check`
<a name="sanity-check"></a>

**（選用）** 嘗試驗證叢集參數中定義的資源組態。

預設值為 `true`。

**警告**  
如果 `sanity_check` 設定為 `false`，則會略過重要的檢查。這可能會導致您的組態無法如預期般運作。

```
sanity_check = true
```

**注意**  
在 2.5.0 AWS ParallelCluster 版之前，[`sanity_check`](#sanity-check)預設為 `false`。

[更新政策：更新期間不會分析此設定。](using-pcluster-update.md#update-policy-setting-ignored)

# `[aws]` 區段
<a name="aws"></a>

**（選用）** 用來選取 AWS 區域。

叢集建立使用此優先順序來選取新叢集 AWS 區域 的 ：

1. `-r` 或 `--region` 參數。 [`pcluster create`](pluster.create.md)

1. `AWS_DEFAULT_REGION` 環境變數。

1. `aws_region_name` 組態檔案`[aws]`區段中的 AWS ParallelCluster 設定 （預設位置為 `~/.parallelcluster/config`。) 這是 [`pcluster configure`](pcluster.configure.md)命令更新的位置。

1. `region` 組態檔案 (`~/.aws/config`.) `[default]`區段中的 AWS CLI 設定

**注意**  
在 2.10.0 AWS ParallelCluster 版之前，需要這些設定並套用至所有叢集。

若要存放登入資料，您可以使用環境、Amazon EC2 的 IAM 角色或 [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html)，而不是將登入資料儲存至 AWS ParallelCluster 組態檔案。

```
[aws]
aws_region_name = Region
```

[更新政策：更新期間不會分析此設定。](using-pcluster-update.md#update-policy-setting-ignored)

# `[aliases]` 區段
<a name="aliases"></a>

**Topics**

指定別名，並可讓您自訂 `ssh` 命令。

請注意下列預設設定：
+ `CFN_USER` 設定為作業系統的預設使用者名稱
+ `MASTER_IP` 設定為前端節點的 IP 地址
+ `ARGS` 設定為使用者在 之後提供的任何引數 *`pcluster ssh cluster_name`*

```
[aliases]
# This is the aliases section, you can configure
# ssh alias here
ssh = ssh {CFN_USER}@{MASTER_IP} {ARGS}
```

[更新政策：更新期間不會分析此設定。](using-pcluster-update.md#update-policy-setting-ignored)

# `[cluster]` 區段
<a name="cluster-definition"></a>

定義可用於建立叢集的叢集範本。組態檔案可以包含多個`[cluster]`區段。

相同的叢集範本可用來建立多個叢集。

格式是 `[cluster cluster-template-name]`。依預設會使用 [`[cluster]`區段](#cluster-definition)中由 [`cluster_template`](global.md#cluster-template)設定命名的[`[global]`區段](global.md)，但可以在[`pcluster`](pcluster.md)命令列上覆寫。

*cluster-template-name* 必須以字母開頭，包含不超過 30 個字元，且僅包含字母、數字、連字號 (-) 和底線 (\$1)。

```
[cluster default]
```

**Topics**
+ [`additional_cfn_template`](#additional-cfn-template)
+ [`additional_iam_policies`](#additional-iam-policies)
+ [`base_os`](#base-os)
+ [`cluster_resource_bucket`](#cluster-resource-bucket-section)
+ [`cluster_type`](#cluster-type)
+ [`compute_instance_type`](#compute-instance-type)
+ [`compute_root_volume_size`](#compute-root-volume-size)
+ [`custom_ami`](#custom-ami-section)
+ [`cw_log_settings`](#cw-log-settings)
+ [`dashboard_settings`](#dashboard-settings)
+ [`dcv_settings`](#dcv-settings)
+ [`desired_vcpus`](#desired-vcpus)
+ [`disable_cluster_dns`](#disable-cluster-dns-settings)
+ [`disable_hyperthreading`](#disable-hyperthreading)
+ [`ebs_settings`](#ebs-settings)
+ [`ec2_iam_role`](#ec2-iam-role)
+ [`efs_settings`](#efs-settings)
+ [`enable_efa`](#enable-efa)
+ [`enable_efa_gdr`](#enable-efa-gdr)
+ [`enable_intel_hpc_platform`](#enable-intel-hpc-platform)
+ [`encrypted_ephemeral`](#encrypted-ephemeral)
+ [`ephemeral_dir`](#ephemeral-dir)
+ [`extra_json`](#extra-json)
+ [`fsx_settings`](#fsx-settings)
+ [`iam_lambda_role`](#iam-lambda-role)
+ [`initial_queue_size`](#configuration-initial-queue-size)
+ [`key_name`](#key-name)
+ [`maintain_initial_size`](#maintain-initial-size)
+ [`master_instance_type`](#master-instance-type)
+ [`master_root_volume_size`](#master-root-volume-size)
+ [`max_queue_size`](#configuration-max-queue-size)
+ [`max_vcpus`](#max-vcpus)
+ [`min_vcpus`](#min-vcpus)
+ [`placement`](#placement)
+ [`placement_group`](#placement-group)
+ [`post_install`](#post-install)
+ [`post_install_args`](#post-install-args)
+ [`pre_install`](#pre-install)
+ [`pre_install_args`](#pre-install-args)
+ [`proxy_server`](#proxy-server)
+ [`queue_settings`](#queue-settings)
+ [`raid_settings`](#raid-settings)
+ [`s3_read_resource`](#s3-read-resource)
+ [`s3_read_write_resource`](#s3-read-write-resource)
+ [`scaling_settings`](#scaling-settings)
+ [`scheduler`](#scheduler)
+ [`shared_dir`](#cluster-shared-dir)
+ [`spot_bid_percentage`](#spot-bid-percentage)
+ [`spot_price`](#spot-price)
+ [`tags`](#tags)
+ [`template_url`](#template-url)
+ [`vpc_settings`](#vpc-settings)

## `additional_cfn_template`
<a name="additional-cfn-template"></a>

**（選用）** 定義要與叢集一起啟動的其他 AWS CloudFormation 範本。此額外範本用於建立叢集外但屬於叢集生命週期一部分的資源。

此值必須是公有範本的 HTTP URL，並提供所有參數。

沒有預設值。

```
additional_cfn_template = https://<bucket-name>.s3.amazonaws.com/my-cfn-template.yaml
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `additional_iam_policies`
<a name="additional-iam-policies"></a>

**（選用）** 指定 Amazon EC2 IAM 政策的 Amazon Resource Name (ARNs) 清單。除了以逗號 AWS ParallelCluster 分隔 所需的許可之外，此清單還會連接到叢集中使用的根角色。IAM 政策名稱及其 ARN 不同。名稱不能用作 的引數`additional_iam_policies`。

如果您的意圖是將額外政策新增至叢集節點的預設設定，建議您使用 `additional_iam_policies`設定傳遞額外的自訂 IAM 政策，而不是使用 [`ec2_iam_role`](#ec2-iam-role)設定來新增特定 EC2 政策。這是因為 `additional_iam_policies` 已新增至 AWS ParallelCluster 所需的預設許可。現有的 [`ec2_iam_role`](#ec2-iam-role) 必須包含所有必要的許可。不過，由於需要的許可通常會隨著新增功能而從發行版本變更為發行版本，因此現有 [`ec2_iam_role`](#ec2-iam-role)可能會過時。

沒有預設值。

```
additional_iam_policies = arn:aws:iam::123456789012:policy/CustomEC2Policy
```

**注意**  
2[`additional_iam_policies`](#additional-iam-policies).5.0 AWS ParallelCluster 版已新增 的支援。

[更新政策：此設定可以在更新期間變更。](using-pcluster-update.md#update-policy-setting-supported)

## `base_os`
<a name="base-os"></a>

**(必要)** 指定將哪個作業系統類型用於叢集。

可用選項如下：
+ `alinux2`
+ `centos7`
+ `ubuntu1804`
+ `ubuntu2004`

**注意**  
對於以 AWS Graviton 為基礎的執行個體，僅`ubuntu2004`支援 `ubuntu1804`、 `alinux2`或 。

**注意**  
2.11.4 AWS ParallelCluster 版已`centos8`移除 的支援。`ubuntu2004` 已新增 的支援，並在 2.11.0 AWS ParallelCluster 版`ubuntu1604`中移除 `alinux`和 的支援。`centos8` 已新增 的支援，並在 2.10.0 AWS ParallelCluster 版`centos6`中移除 的支援。2.6.0 版已`alinux2` AWS ParallelCluster 新增 的支援。`ubuntu1804` 已新增 的支援，並在 2.5.0 AWS ParallelCluster 版`ubuntu1404`中移除 的支援。

除了下表 AWS 區域 中提及不支援 的特定 之外`centos7`。所有其他 AWS 商業區域都支援下列所有作業系統。


| 分割區 (AWS 區域) | `alinux2` | `centos7` | `ubuntu1804` 和 `ubuntu2004` | 
| --- | --- | --- | --- | 
| 商業 ( AWS 區域 未特別提及） | True | True | True | 
| AWS GovCloud （美國東部） (us-gov-east-1) | True | False | True | 
| AWS GovCloud （美國西部） (us-gov-west-1) | True | False | True | 
| 中國 (北京) (cn-north-1) | True | False | True | 
| 中國 (寧夏) (cn-northwest-1) | True | False | True | 

**注意**  
[`base_os`](#base-os) 參數也會決定用來登入叢集的使用者名稱。
+ `centos7`: `centos` 
+ `ubuntu1804` 和 `ubuntu2004`：`ubuntu`
+ `alinux2`: `ec2-user` 

**注意**  
在 2.7.0 AWS ParallelCluster 版之前， [`base_os`](#base-os) 參數為選用，預設值為 `alinux`。從 2.7.0 版開始 AWS ParallelCluster ，需要 [`base_os`](#base-os) 參數。

**注意**  
如果 [`scheduler`](#scheduler) 參數為 `awsbatch`，則僅支援 `alinux2`。

```
base_os = alinux2
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `cluster_resource_bucket`
<a name="cluster-resource-bucket-section"></a>

**（選用）** 指定用於託管叢集建立時產生的資源的 Amazon S3 儲存貯體名稱。儲存貯體必須已啟用版本控制。如需詳細資訊，請參閱《*Amazon Simple Storage Service 使用者指南*》中的[使用版本控制](https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html)。此儲存貯體可用於多個叢集。儲存貯體必須與叢集位於相同的區域。

如果未指定此參數，則會在建立叢集時建立新的儲存貯體。新儲存貯體的名稱為 `parallelcluster-random_string`。在此名稱中，*Random\$1string* 是英數字元的隨機字串。所有叢集資源都會存放在格式為 的路徑中`bucket_name/resource_directory`。 `resource_directory`的格式為 `stack_name-random_string`，其中 *stack\$1name* 是 使用的其中一個 CloudFormation 堆疊的名稱 AWS ParallelCluster。您可以在`parallelcluster-clustername`堆疊輸出中的 值中找到 *bucket\$1name* `ResourcesS3Bucket`的值。您可以在相同堆疊的`ArtifactS3RootDirectory`輸出值中找到 *resource\$1directory* 的值。

預設值為 `parallelcluster-random_string`。

```
cluster_resource_bucket = amzn-s3-demo-bucket
```

**注意**  
[`cluster_resource_bucket`](#cluster-resource-bucket-section) 2.10.0 AWS ParallelCluster 版已新增 的支援。

[更新政策：如果變更此設定，則不允許更新。無法強制更新此設定。](using-pcluster-update.md#update-policy-read-only-resource-bucket)

## `cluster_type`
<a name="cluster-type"></a>

**（選用）** 定義要啟動的叢集類型。如果已定義[`queue_settings`](#queue-settings)設定，則必須將此設定取代為[`[queue]`區段](queue-section.md)中的[`compute_type`](queue-section.md#queue-compute-type)設定。

有效選項為：`ondemand` 和 `spot`。

預設值為 `ondemand`。

如需 Spot 執行個體的詳細資訊，請參閱 [使用 競價型執行個體](spot.md)。

**注意**  
使用 Spot 執行個體需要服務`AWSServiceRoleForEC2Spot`連結角色存在於您的帳戶中。若要使用 在帳戶中建立此角色 AWS CLI，請執行下列命令：  

```
aws iam create-service-linked-role --aws-service-name spot.amazonaws.com
```
如需詳細資訊，請參閱《*Amazon EC2 使用者指南*》中的 [Spot 執行個體請求的服務連結角色](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html#service-linked-roles-spot-instance-requests)。

```
cluster_type = ondemand
```

[更新政策：必須停止運算機群，才能變更此設定以進行更新。](using-pcluster-update.md#update-policy-compute-fleet)

## `compute_instance_type`
<a name="compute-instance-type"></a>

**（選用）** 定義用於叢集運算節點的 Amazon EC2 執行個體類型。執行個體類型的架構必須與用於 [`master_instance_type`](#master-instance-type)設定的架構相同。如果已定義[`queue_settings`](#queue-settings)設定，則必須將此設定取代為[`[compute_resource]`區段](compute-resource-section.md)中的[`instance_type`](compute-resource-section.md#compute-resource-instance-type)設定。

如果您使用的是`awsbatch`排程器，請參閱 UI AWS Batch 中的運算環境建立，以取得支援的執行個體類型清單。

當排程器為 `awsbatch` 時，預設為 `t2.micro`、`optimal`。

```
compute_instance_type = t2.micro
```

**注意**  
2.8.0 AWS AWS ParallelCluster 版中已新增對 Graviton 型執行個體 （包括 `A1`和 `C6g`執行個體） 的支援。

[更新政策：必須停止運算機群，才能變更此設定以進行更新。](using-pcluster-update.md#update-policy-compute-fleet)

## `compute_root_volume_size`
<a name="compute-root-volume-size"></a>

**（選用）** 以 GB (GiB) 為單位指定 ComputeFleet 根磁碟區大小。AMI 必須支援 `growroot`。

預設值為 `35`。

**注意**  
對於 2.5.0 和 2.10.4 之間的 AWS ParallelCluster 版本，預設值為 25。在 2.5.0 AWS ParallelCluster 版之前，預設值為 20。

```
compute_root_volume_size = 35
```

[更新政策：必須停止運算機群，才能變更此設定以進行更新。](using-pcluster-update.md#update-policy-compute-fleet)

## `custom_ami`
<a name="custom-ami-section"></a>

**（選用）** 指定要用於前端和運算節點的自訂 AMI ID，而非預設[發佈AMIs](https://github.com/aws/aws-parallelcluster/blob/v2.11.9/amis.txt)。如需詳細資訊，請參閱 [修改 AMI](tutorials_02_ami_customization.md#modify-an-aws-parallelcluster-ami) 或 [建置自訂 AWS ParallelCluster AMI](tutorials_02_ami_customization.md#build-a-custom-aws-parallelcluster-ami) 。

沒有預設值。

```
custom_ami = ami-00d4efc81188687a0
```

如果自訂 AMI 需要其他許可才能啟動，則必須將這些許可同時新增至使用者和前端節點政策。

例如，如果自訂 AMI 具有與其相關聯的加密快照，則使用者和前端節點政策都需要下列其他政策：

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "kms:DescribeKey",
                "kms:ReEncrypt*",
                "kms:CreateGrant",
                "kms:Decrypt"
            ],
            "Resource": [
                "arn:aws:kms:us-east-1:111122223333:key/<AWS_KMS_KEY_ID>"
            ]
        }
    ]
}
```

------

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `cw_log_settings`
<a name="cw-log-settings"></a>

**（選用）** 使用 CloudWatch Logs 組態識別 `[cw_log]`區段。區段名稱必須以字母開頭，包含不超過 30 個字元，且僅包含字母、數字、連字號 (-) 和底線 (\$1)。

如需詳細資訊，請參閱 [`[cw_log]` 區段](cw-log-section.md)、 [Amazon CloudWatch 儀表板](cloudwatch-dashboard.md)和 [與 Amazon CloudWatch Logs 的整合](cloudwatch-logs.md)。

例如，以下設定指定 啟動的 區段`[cw_log custom-cw]`用於 CloudWatch Logs 組態。

```
cw_log_settings = custom-cw
```

**注意**  
2.6.0 AWS ParallelCluster 版已[`cw_log_settings`](#cw-log-settings)新增 的支援。

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `dashboard_settings`
<a name="dashboard-settings"></a>

**（選用）** 使用 CloudWatch 儀表板組態識別 `[dashboard]`區段。區段名稱必須以字母開頭，包含不超過 30 個字元，且僅包含字母、數字、連字號 (-) 和底線 (\$1)。

如需詳細資訊，請參閱 [`[dashboard]`一節](dashboard-section.md)。

例如，下列設定會指定 CloudWatch 儀表板組態使用的 `[dashboard custom-dashboard` 區段。

```
dashboard_settings = custom-dashboard
```

**注意**  
[`dashboard_settings`](#dashboard-settings) 2.10.0 AWS ParallelCluster 版已新增 的支援。

[更新政策：此設定可以在更新期間變更。](using-pcluster-update.md#update-policy-setting-supported)

## `dcv_settings`
<a name="dcv-settings"></a>

**（選用）** 使用 Amazon DCV 組態識別 `[dcv]`區段。區段名稱必須以字母開頭，包含不超過 30 個字元，且僅包含字母、數字、連字號 (-) 和底線 (\$1)。

如需詳細資訊，請參閱 [`[dcv]`一節](dcv-section.md)。

例如，下列設定指定 `[dcv custom-dcv]` 開始的 區段用於 Amazon DCV 組態。

```
dcv_settings = custom-dcv
```

**注意**  
在 Graviton AWS 型執行個體上，僅在 上支援 Amazon DCV`alinux2`。

**注意**  
2[`dcv_settings`](#dcv-settings).5.0 AWS ParallelCluster 版已新增 的支援。

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `desired_vcpus`
<a name="desired-vcpus"></a>

**（選用）** 指定運算環境中所需的 vCPUs 數量。僅在排程器是 `awsbatch` 時才使用。

預設值為 `4`。

```
desired_vcpus = 4
```

[更新政策：更新期間不會分析此設定。](using-pcluster-update.md#update-policy-setting-ignored)

## `disable_cluster_dns`
<a name="disable-cluster-dns-settings"></a>

**（選用）** 指定是否不應建立叢集的 DNS 項目。根據預設， AWS ParallelCluster 會建立 Route 53 託管區域。如果 `disable_cluster_dns` 設定為 `true`，則不會建立託管區域。

預設值為 `false`。

```
disable_cluster_dns = true
```

**警告**  
叢集需要名稱解析系統才能正常運作。如果 `disable_cluster_dns` 設定為 `true`，也必須提供額外的名稱解析系統。

**重要**  
[`disable_cluster_dns`](#disable-cluster-dns-settings) = `true`只有在指定 [`queue_settings`](#queue-settings)設定時才支援。

**注意**  
2.9.1 AWS ParallelCluster 版已[`disable_cluster_dns`](#disable-cluster-dns-settings)新增 的支援。

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `disable_hyperthreading`
<a name="disable-hyperthreading"></a>

**（選用）** 停用頭部和運算節點上的超執行緒。並非所有執行個體類型都可以停用超執行緒。如需支援停用超執行緒的執行個體類型清單，請參閱《*Amazon EC2 使用者指南*》中的[每個執行個體類型的 CPU 核心和每個 CPU 核心的執行緒](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html#cpu-options-supported-instances-values)。如果已定義[`queue_settings`](#queue-settings)設定，則可以定義此設定，也可以定義[`[queue]`區段](queue-section.md)中的[`disable_hyperthreading`](queue-section.md#queue-disable-hyperthreading)設定。

預設值為 `false`。

```
disable_hyperthreading = true
```

**注意**  
[`disable_hyperthreading`](#disable-hyperthreading) 只會在 時影響前端節點`scheduler = awsbatch`。

**注意**  
2[`disable_hyperthreading`](#disable-hyperthreading).5.0 AWS ParallelCluster 版已新增 的支援。

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `ebs_settings`
<a name="ebs-settings"></a>

**（選用）** 使用安裝在前端節點上的 Amazon EBS 磁碟區來識別`[ebs]`區段。使用多個 Amazon EBS 磁碟區時，請在清單中輸入這些參數，每個參數以逗號分隔。區段名稱必須以字母開頭，包含不超過 30 個字元，且僅包含字母、數字、連字號 (-) 和底線 (\$1)。

最多支援五 (5) 個額外的 Amazon EBS 磁碟區。

如需詳細資訊，請參閱 [`[ebs]`一節](ebs-section.md)。

例如，下列設定指定 Amazon EBS 磁碟區啟動`[ebs custom1]`和`[ebs custom2]`使用的區段。

```
ebs_settings = custom1, custom2
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `ec2_iam_role`
<a name="ec2-iam-role"></a>

**（選用）** 定義連接至叢集中所有執行個體的 Amazon EC2 現有 IAM 角色的名稱。IAM 角色名稱及其 Amazon Resource Name (ARN) 是不同的。ARNs 無法用作 的引數`ec2_iam_role`。

如果指定此選項，則會忽略 [`additional_iam_policies`](#additional-iam-policies) 設定。如果您的意圖是將額外的政策新增至叢集節點的預設設定，建議您使用 [`additional_iam_policies`](#additional-iam-policies)設定傳遞額外的自訂 IAM 政策，而不是使用 `ec2_iam_role`設定。

如果未指定此選項，則會使用 AWS ParallelCluster Amazon EC2 的預設 IAM 角色。如需詳細資訊，請參閱[AWS Identity and Access Management 中的 角色 AWS ParallelCluster](iam.md)。

沒有預設值。

```
ec2_iam_role = ParallelClusterInstanceRole
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `efs_settings`
<a name="efs-settings"></a>

**（選用）** 指定與 Amazon EFS 檔案系統相關的設定。區段名稱必須以字母開頭，包含不超過 30 個字元，且僅包含字母、數字、連字號 (-) 和底線 (\$1)。

如需詳細資訊，請參閱 [`[efs]`一節](efs-section.md)。

例如，下列設定指定 啟動的 區段`[efs customfs]`用於 Amazon EFS 檔案系統組態。

```
efs_settings = customfs
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `enable_efa`
<a name="enable-efa"></a>

**（選用）** 如果存在，請指定為運算節點啟用彈性布料轉接器 (EFA)。若要檢視支援 EFA 的 EC2 執行個體清單，請參閱《*Amazon EC2 Linux 執行個體使用者指南*》中的[支援的執行個體類型](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html#efa-instance-types)。如需詳細資訊，請參閱[Elastic Fabric Adapter](efa.md)。如果已定義[`queue_settings`](#queue-settings)設定，則可以定義此設定，也可以定義 [`[queue]`區段](queue-section.md)中的[`enable_efa`](queue-section.md#queue-enable-efa)設定。應使用叢集置放群組以充分減少執行個體之間的延遲。如需詳細資訊，請參閱[`placement`](#placement)及[`placement_group`](#placement-group)。

```
enable_efa = compute
```

**注意**  
在 2.10.1 AWS ParallelCluster 版中新增了對以 Arm 為基礎的 Graviton2 執行個體 EFA 的支援。

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `enable_efa_gdr`
<a name="enable-efa-gdr"></a>

**（選用）** 從 2.11.3 AWS ParallelCluster 版開始，此設定沒有效果。如果執行個體類型和作業系統都支援 GPUDirect RDMA （遠端直接記憶體存取），則一律會啟用 Elastic Fabric Adapter (EFA) 支援。

**注意**  
AWS ParallelCluster 2.10.0 版到 2.11.2 版：如果 `compute`，請指定為運算節點啟用 GPUDirect RDMA （遠端直接記憶體存取） 的 Elastic Fabric Adapter (EFA) 支援。將此設定設為 `compute`需要將 [`enable_efa`](#enable-efa)設定設為 `compute`。特定作業系統 ( 為 `alinux2`、`ubuntu1804`、 或 `centos7``p4d.24xlarge`) 上的特定執行個體類型 ([`base_os`](#base-os)) 支援對 GPUDirect RDMA 的 EFA 支援`ubuntu2004`。如果已定義[`queue_settings`](#queue-settings)設定，則可以定義此設定，也可以定義[`[queue]`區段](queue-section.md)中的[`enable_efa_gdr`](queue-section.md#queue-enable-efa-gdr)設定。應使用叢集置放群組以充分減少執行個體之間的延遲。如需詳細資訊，請參閱[`placement`](#placement)及[`placement_group`](#placement-group)。

```
enable_efa_gdr = compute
```

**注意**  
2.10.0 AWS ParallelCluster 版已`enable_efa_gdr`新增 的支援。

[更新政策：必須停止運算機群，才能變更此設定以進行更新。](using-pcluster-update.md#update-policy-compute-fleet)

## `enable_intel_hpc_platform`
<a name="enable-intel-hpc-platform"></a>

**（選用）** 如果存在，表示接受 Intel Parallel Studio 的最終[使用者授權合約](https://software.intel.com/en-us/articles/end-user-license-agreement)。這會導致 Intel Parallel Studio 安裝在前端節點上並與運算節點共用。這會為前端節點引導所需的時間新增幾分鐘。只有 CentOS 7 ([`base_os`](#base-os)` = centos7`) 支援此 [`enable_intel_hpc_platform`](#enable-intel-hpc-platform) 設定。

預設值為 `false`。

```
enable_intel_hpc_platform = true
```

**注意**  
[`enable_intel_hpc_platform`](#enable-intel-hpc-platform) 參數與 Graviton AWS 型執行個體不相容。

**注意**  
2.5.0 AWS ParallelCluster 版中[`enable_intel_hpc_platform`](#enable-intel-hpc-platform)已新增 的支援。

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `encrypted_ephemeral`
<a name="encrypted-ephemeral"></a>

**（選用）** 使用 LUKS (Linux 統一金鑰設定），以不可復原的記憶體內金鑰加密暫時性執行個體存放區磁碟區。

如需詳細資訊，請參閱[https://gitlab.com/cryptsetup/cryptsetup/blob/master/README.md](https://gitlab.com/cryptsetup/cryptsetup/blob/master/README.md)。

預設值為 `false`。

```
encrypted_ephemeral = true
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `ephemeral_dir`
<a name="ephemeral-dir"></a>

**（選用）** 定義使用執行個體存放區磁碟區的掛載路徑。

預設值為 `/scratch`。

```
ephemeral_dir = /scratch
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `extra_json`
<a name="extra-json"></a>

**（選用）** 定義合併到 Chef 的額外 JSON`dna.json`。如需詳細資訊，請參閱[建置自訂 AWS ParallelCluster AMI](tutorials_02_ami_customization.md)。

預設值為 `{}`。

```
extra_json = {}
```

**注意**  
從 2.6.1 AWS ParallelCluster 版開始，大多數安裝配方在啟動節點時預設會略過，以改善啟動時間。若要以啟動時間的費用執行所有安裝配方，以獲得更佳的回溯相容性，請將 `"skip_install_recipes" : "no"`新增至 [`extra_json`](#extra-json)設定中的 `cluster`金鑰。例如：  

```
extra_json = { "cluster" : { "skip_install_recipes" : "no" } }
```

[更新政策：必須停止運算機群，才能變更此設定以進行更新。](using-pcluster-update.md#update-policy-compute-fleet)

## `fsx_settings`
<a name="fsx-settings"></a>

**（選用）** 指定定義 FSx for Lustre 組態的區段。區段名稱必須以字母開頭，包含不超過 30 個字元，且僅包含字母、數字、連字號 (-) 和底線 (\$1)。

如需詳細資訊，請參閱 [`[fsx]`一節](fsx-section.md)。

例如，下列設定指定 啟動的 區段`[fsx fs]`用於 FSx for Lustre 組態。

```
fsx_settings = fs
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `iam_lambda_role`
<a name="iam-lambda-role"></a>

**（選用）** 定義現有 AWS Lambda 執行角色的名稱。此角色會連接到叢集中的所有 Lambda 函數。如需詳細資訊，請參閱《AWS Lambda 開發人員指南》**中的 [AWS Lambda 執行角色](https://docs.aws.amazon.com/lambda/latest/dg/lambda-intro-execution-role.html)。

**注意**  
從 2.11.5 版開始， AWS ParallelCluster 不支援使用 SGE或 Torque排程器。

IAM 角色名稱及其 Amazon Resource Name (ARN) 是不同的。ARNs 不能用作 的引數`iam_lambda_role`。如果同時定義 `iam_lambda_role` [`ec2_iam_role`](#ec2-iam-role)和 ，且 [`scheduler`](#scheduler)為 `sge`、 `slurm`或 `torque`，則不會建立任何角色。如果 [`scheduler`](#scheduler)是 `awsbatch`，則會在 期間建立角色[`pcluster start`](pcluster.start.md)。如需範例政策，請參閱 [`ParallelClusterLambdaPolicy` 使用 SGE、 Slurm或 Torque](iam.md#parallelcluster-lambda-policy)和 [`ParallelClusterLambdaPolicy` 使用 `awsbatch`](iam.md#parallelcluster-lambda-policy-batch)。

沒有預設值。

```
iam_lambda_role = ParallelClusterLambdaRole
```

**注意**  
2.10.1 AWS ParallelCluster 版已`iam_lambda_role`新增 的支援。

[更新政策：此設定可以在更新期間變更。](using-pcluster-update.md#update-policy-setting-supported)

## `initial_queue_size`
<a name="configuration-initial-queue-size"></a>

**（選用）** 設定要作為叢集中運算節點啟動的 Amazon EC2 執行個體初始數量。如果已定義[`queue_settings`](#queue-settings)設定，則必須移除此設定，並由[`[compute_resource]`區段](compute-resource-section.md)中的[`initial_count`](compute-resource-section.md#compute-resource-initial-count)設定取代。

**注意**  
從 2.11.5 版開始， AWS ParallelCluster 不支援使用 SGE或 Torque排程器。

此設定僅適用於傳統排程器 (SGE、Slurm 和 Torque)。如果[`maintain_initial_size`](#maintain-initial-size)設定為 `true`，則[`initial_queue_size`](#configuration-initial-queue-size)設定必須至少為一 (1)。

如果排程器是 `awsbatch`，請改用 [`min_vcpus`](#min-vcpus)。

預設為 `2`。

```
initial_queue_size = 2
```

[更新政策：此設定可以在更新期間變更。](using-pcluster-update.md#update-policy-setting-supported)

## `key_name`
<a name="key-name"></a>

**（選用）** 為現有的 Amazon EC2 金鑰對命名，以啟用對執行個體的 SSH 存取。

```
key_name = mykey
```

**注意**  
在 2.11.0 AWS ParallelCluster 版之前， `key_name`是必要的設定。

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `maintain_initial_size`
<a name="maintain-initial-size"></a>

**注意**  
從 2.11.5 版開始， AWS ParallelCluster 不支援使用 SGE或 Torque排程器。

**（選用）** 維持傳統排程器的 Auto Scaling 群組初始大小 (SGE、 Slurm和 Torque)。

如果排程器是 `awsbatch`，請改用 [`desired_vcpus`](#desired-vcpus)。

此設定是布林值旗標。如果設為 `true`，Auto Scaling 群組的成員不會少於 的值[`initial_queue_size`](#configuration-initial-queue-size)，且 的值[`initial_queue_size`](#configuration-initial-queue-size)必須是一 (1) 或更高。叢集仍可擴充至 [`max_queue_size`](#configuration-max-queue-size) 值。如果`cluster_type = spot`這樣，Auto Scaling 群組可以中斷執行個體，而且大小可能會降至 以下[`initial_queue_size`](#configuration-initial-queue-size)。

如果設定為 `false`，Auto Scaling 群組可以縮減到零 (0) 個成員，以防止資源在不需要時閒置。

如果已定義 [`queue_settings`](#queue-settings) 設定，則必須移除此設定，並由[`[compute_resource]`區段](compute-resource-section.md)中的 [`initial_count`](compute-resource-section.md#compute-resource-initial-count)和 [`min_count`](compute-resource-section.md#compute-resource-min-count)設定取代。

預設為 `false`。

```
maintain_initial_size = false
```

[更新政策：此設定可以在更新期間變更。](using-pcluster-update.md#update-policy-setting-supported)

## `master_instance_type`
<a name="master-instance-type"></a>

**（選用）** 定義用於前端節點的 Amazon EC2 執行個體類型。執行個體類型的架構必須與用於 [`compute_instance_type`](#compute-instance-type)設定的架構相同。

在具有 免費方案 AWS 區域 的 中， 預設為 免費方案執行個體類型 (`t2.micro` 或 `t3.micro`)。在沒有免費方案 AWS 區域 的 中， 預設為 `t3.micro`。如需 AWS 免費方案的詳細資訊，請參閱 [AWS 免費方案FAQs](https://aws.amazon.com/free/free-tier-faqs/)。

```
master_instance_type = t2.micro
```

**注意**  
在 2.10.1 AWS ParallelCluster 版之前， `t2.micro` 全部預設為 AWS 區域。在 2.10.0 AWS ParallelCluster 版中，前端節點`p4d.24xlarge`不支援 。2.8.0 AWS AWS ParallelCluster 版中已新增對 Graviton 型執行個體 （例如 `A1`和 `C6g`) 的支援。

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `master_root_volume_size`
<a name="master-root-volume-size"></a>

**（選用）** 以 GB (GiB) 為單位指定前端節點根磁碟區大小。AMI 必須支援 `growroot`。

預設值為 `35`。

**注意**  
對於 2.5.0 和 2.10.4 之間的 AWS ParallelCluster 版本，預設值為 25。在 2.5.0 AWS ParallelCluster 版之前，預設值為 20。

```
master_root_volume_size = 35
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `max_queue_size`
<a name="configuration-max-queue-size"></a>

**（選用）** 設定可在叢集中啟動的 Amazon EC2 執行個體數量上限。如果已定義[`queue_settings`](#queue-settings)設定，則必須移除此設定，並由各[`[compute_resource]`區段](compute-resource-section.md)中的[`max_count`](compute-resource-section.md#compute-resource-max-count)設定取代。

**注意**  
從 2.11.5 版開始， AWS ParallelCluster 不支援使用 SGE或 Torque排程器。

此設定僅適用於傳統排程器 (SGE、Slurm 和 Torque)。

如果排程器是 `awsbatch`，請改用 [`max_vcpus`](#max-vcpus)。

預設為 `10`。

```
max_queue_size = 10
```

更新政策：此設定可以在更新期間變更，但如果值減少，則應該停止運算機群。否則，現有的節點可能會終止。

## `max_vcpus`
<a name="max-vcpus"></a>

**（選用）** 指定運算環境中 vCPUs的數量上限。僅在排程器是 `awsbatch` 時才使用。

預設值為 `20`。

```
max_vcpus = 20
```

[更新政策：此設定無法在更新期間減少。](using-pcluster-update.md#update-policy-no-decrease)

## `min_vcpus`
<a name="min-vcpus"></a>

**（選用）** 維持`awsbatch`排程器 Auto Scaling 群組的初始大小。

**注意**  
從 2.11.5 版開始， AWS ParallelCluster 不支援使用 SGE或 Torque排程器。

如果排程器是 SGE、Slurm 或 Torque，請改用 [`maintain_initial_size`](#maintain-initial-size)。

運算環境的成員數不得少於 [`min_vcpus`](#min-vcpus) 的值。

預設為 `0`。

```
min_vcpus = 0
```

[更新政策：此設定可以在更新期間變更。](using-pcluster-update.md#update-policy-setting-supported)

## `placement`
<a name="placement"></a>

**（選用）** 定義叢集置放群組邏輯，讓整個叢集或只有運算執行個體可以使用叢集置放群組。

如果已定義[`queue_settings`](#queue-settings)設定，則應移除此設定，並以每個[`[queue]`區段](queue-section.md)[`placement_group`](queue-section.md#queue-placement-group)的設定取代。如果相同的置放群組用於不同的執行個體類型，則請求可能會因為容量不足錯誤而失敗。如需詳細資訊，請參閱《*Amazon EC2 使用者指南*》中的[執行個體容量不足](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/troubleshooting-launch.html#troubleshooting-launch-capacity)。多個佇列只有在預先建立並在每個佇列[`placement_group`](queue-section.md#queue-placement-group)的設定中設定時，才能共用置放群組。如果每個[`[queue]`區段](queue-section.md)都定義了[`placement_group`](queue-section.md#queue-placement-group)設定，則前端節點不能位於佇列的置放群組中。

有效選項為 `cluster` 或 `compute`。

當排程器為 時，不會使用此參數`awsbatch`。

預設值為 `compute`。

```
placement = compute
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `placement_group`
<a name="placement-group"></a>

**（選用）** 定義叢集置放群組。如果已定義[`queue_settings`](#queue-settings)設定，則應移除此設定，並以[`[queue]`區段](queue-section.md)中的[`placement_group`](queue-section.md#queue-placement-group)設定取代。

有效選項為下列值：
+ `DYNAMIC`
+ 現有的 Amazon EC2 叢集置放群組名稱

設為 `DYNAMIC` 時，即會建立唯一的置放群組，並在叢集堆疊過程將其刪除。

當排程器為 時，不會使用此參數`awsbatch`。

如需置放群組的詳細資訊，請參閱《*Amazon EC2 使用者指南*》中的[置放群組](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html)。如果相同的置放群組用於不同的執行個體類型，則請求可能會因為容量不足錯誤而失敗。如需詳細資訊，請參閱《*Amazon EC2 使用者指南*》中的[執行個體容量不足](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/troubleshooting-launch.html#troubleshooting-launch-capacity)。

沒有預設值。

並非所有執行個體類型都支援叢集置放群組。例如， 的預設執行個體類型`t3.micro`不支援叢集置放群組。如需有關支援叢集置放群組的執行個體類型清單的資訊，請參閱《*Amazon EC2 使用者指南*》中的[叢集置放群組規則和限制](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html#placement-groups-limitations-cluster)。如需使用置放群組的秘訣，請參閱 [置放群組和執行個體啟動問題](troubleshooting.md#placement-groups-and-instance-launch-issues)。

```
placement_group = DYNAMIC
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `post_install`
<a name="post-install"></a>

**（選用）** 指定在所有節點引導操作完成後執行的安裝後指令碼 URL。如需詳細資訊，請參閱[自訂引導操作](pre_post_install.md)。

使用 `awsbatch`做為排程器時，安裝後指令碼只會在前端節點上執行。

參數格式可以是 `http://hostname/path/to/script.sh` 或 `s3://bucket-name/path/to/script.sh`。

沒有預設值。

```
post_install = s3://<bucket-name>/my-post-install-script.sh
```

[更新政策：必須停止運算機群，才能變更此設定以進行更新。](using-pcluster-update.md#update-policy-compute-fleet)

## `post_install_args`
<a name="post-install-args"></a>

**（選用）** 指定要傳遞至安裝後指令碼的引數引號清單。

沒有預設值。

```
post_install_args = "argument-1 argument-2"
```

[更新政策：必須停止運算機群，才能變更此設定以進行更新。](using-pcluster-update.md#update-policy-compute-fleet)

## `pre_install`
<a name="pre-install"></a>

**（選用）** 指定在啟動任何節點部署引導操作之前執行的預先安裝指令碼 URL。如需詳細資訊，請參閱[自訂引導操作](pre_post_install.md)。

使用 `awsbatch`做為排程器時，預先安裝指令碼只會在前端節點上執行。

參數格式可以是 `http://hostname/path/to/script.sh` 或 `s3://bucket-name/path/to/script.sh`。

沒有預設值。

```
pre_install = s3://bucket-name/my-pre-install-script.sh
```

[更新政策：必須停止運算機群，才能變更此設定以進行更新。](using-pcluster-update.md#update-policy-compute-fleet)

## `pre_install_args`
<a name="pre-install-args"></a>

**（選用）** 指定要傳遞至預先安裝指令碼的引數引號清單。

沒有預設值。

```
pre_install_args = "argument-3 argument-4"
```

[更新政策：必須停止運算機群，才能變更此設定以進行更新。](using-pcluster-update.md#update-policy-compute-fleet)

## `proxy_server`
<a name="proxy-server"></a>

**（選用）** 定義 HTTP 或 HTTPS 代理伺服器，通常為 `http://x.x.x.x:8080`。

沒有預設值。

```
proxy_server = http://10.11.12.13:8080
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `queue_settings`
<a name="queue-settings"></a>

**（選用）** 指定叢集使用佇列而非同質運算機群，以及使用哪些[`[queue]`區段](queue-section.md)。列出的第一個[`[queue]`區段](queue-section.md)是預設排程器佇列。`queue` 區段名稱必須以小寫字母開頭，包含不超過 30 個字元，且僅包含小寫字母、數字和連字號 (-)。

**重要**  
[`queue_settings`](#queue-settings) 只有在 [`scheduler`](#scheduler) 設定為 時，才支援 `slurm`。不得指定 [`cluster_type`](#cluster-type)、[`compute_instance_type`](#compute-instance-type)、[`initial_queue_size`](#configuration-initial-queue-size)、[`maintain_initial_size`](#maintain-initial-size)[`max_queue_size`](#configuration-max-queue-size)、[`placement`](#placement)、 [`placement_group`](#placement-group)和 [`spot_price`](#spot-price)設定。您可以在 [`[cluster]`區段](#cluster-definition)或 [`[queue]`區段](queue-section.md)中指定 [`disable_hyperthreading`](#disable-hyperthreading)和 [`enable_efa`](#enable-efa)設定，但不能同時指定兩者。

最多支援五 (5) 個[`[queue]`區段](queue-section.md)。

如需詳細資訊，請參閱 [`[queue]`一節](queue-section.md)。

例如，下列設定指定使用啟動 `[queue q1]`和 `[queue q2]` 的區段。

```
queue_settings = q1, q2
```

**注意**  
2.9.0 AWS ParallelCluster 版已[`queue_settings`](#queue-settings)新增 的支援。

[更新政策：必須停止運算機群，才能變更此設定以進行更新。](using-pcluster-update.md#update-policy-compute-fleet)

## `raid_settings`
<a name="raid-settings"></a>

**（選用）** 使用 Amazon EBS 磁碟區 RAID 組態識別 `[raid]`區段。區段名稱必須以字母開頭，包含不超過 30 個字元，且僅包含字母、數字、連字號 (-) 和底線 (\$1)。

如需詳細資訊，請參閱 [`[raid]`一節](raid-section.md)。

例如，下列設定會指定`[raid rs]`開始用於 Auto Scaling 組態的 區段。

```
raid_settings = rs
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `s3_read_resource`
<a name="s3-read-resource"></a>

**（選用）** 指定 AWS ParallelCluster 節點獲授予唯讀存取權的 Amazon S3 資源。

例如， `arn:aws:s3:::my_corporate_bucket*`提供 *my\$1corporate\$1bucket* 儲存貯體和儲存貯體中物件的唯讀存取權。

如需格式的詳細資訊，請參閱[使用 Amazon S3](s3_resources.md)。

沒有預設值。

```
s3_read_resource = arn:aws:s3:::my_corporate_bucket*
```

[更新政策：此設定可以在更新期間變更。](using-pcluster-update.md#update-policy-setting-supported)

## `s3_read_write_resource`
<a name="s3-read-write-resource"></a>

**（選用）** 指定 Amazon S3 資源，哪些 AWS ParallelCluster 節點獲得讀取/寫入存取權。

例如， `arn:aws:s3:::my_corporate_bucket/Development/*` 提供 *my\$1corporate\$1bucket* 儲存貯體 `Development` 資料夾中所有物件的讀取/寫入存取權。

如需格式的詳細資訊，請參閱[使用 Amazon S3](s3_resources.md)。

沒有預設值。

```
s3_read_write_resource = arn:aws:s3:::my_corporate_bucket/*
```

[更新政策：此設定可以在更新期間變更。](using-pcluster-update.md#update-policy-setting-supported)

## `scaling_settings`
<a name="scaling-settings"></a>

使用 Auto Scaling 組態識別 `[scaling]`區段。區段名稱必須以字母開頭，包含不超過 30 個字元，且僅包含字母、數字、連字號 (-) 和底線 (\$1)。

如需詳細資訊，請參閱 [`[scaling]`一節](scaling-section.md)。

例如，下列設定會指定 Auto Scaling 組態`[scaling custom]`使用啟動的 區段。

```
scaling_settings = custom
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `scheduler`
<a name="scheduler"></a>

**(必要)** 定義叢集的排程器。

有效選項為下列值：

`awsbatch`  
AWS Batch  
如需`awsbatch`排程器的詳細資訊，請參閱[聯網設定](networking.md#awsbatch-networking)和[AWS Batch (`awsbatch`)](awsbatchcli.md)。

`sge`  
從 2.11.5 版開始， AWS ParallelCluster 不支援使用 SGE或 Torque排程器。
Son of Grid Engine (SGE)

`slurm`  
Slurm Workload Manager (Slurm)

`torque`  
從 2.11.5 版開始， AWS ParallelCluster 不支援使用 SGE或 Torque排程器。
Torque Resource Manager (Torque)

**注意**  
在 2.7.0 AWS ParallelCluster 版之前， `scheduler` 參數為選用，預設值為 `sge`。從 2.7.0 AWS ParallelCluster 版開始，需要 `scheduler` 參數。

```
scheduler = slurm
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `shared_dir`
<a name="cluster-shared-dir"></a>

**（選用）** 定義掛載共用 Amazon EBS 磁碟區的路徑。

請勿將此選項與多個 Amazon EBS 磁碟區搭配使用。反之，請在每個[`[ebs]`區段](ebs-section.md)下提供[`shared_dir`](#cluster-shared-dir)值。

如需使用多個 Amazon EBS 磁碟區的詳細資訊，請參閱[`[ebs]`一節](ebs-section.md)。

預設值為 `/shared`。

下列範例顯示掛載在 的共用 Amazon EBS 磁碟區`/myshared`。

```
shared_dir = myshared
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `spot_bid_percentage`
<a name="spot-bid-percentage"></a>

**（選用）** 當 `awsbatch`是排程器時，設定用於計算 ComputeFleet Spot 價格上限的隨需百分比。

如果未指定，則會選取目前的 Spot 市價，上限為隨需價格。

```
spot_bid_percentage = 85
```

[更新政策：此設定可以在更新期間變更。](using-pcluster-update.md#update-policy-setting-supported)

## `spot_price`
<a name="spot-price"></a>

**注意**  
從 2.11.5 版開始， AWS ParallelCluster 不支援使用 SGE或 Torque排程器。

**（選用）** 在傳統排程器 (SGE、 Slurm和 ) 上設定 ComputeFleet 的最高 Spot 價格Torque。僅在 [`cluster_type`](#cluster-type) 設定設為 `spot` 時使用。如果您未指定值，則會向您收取 Spot 價格，以隨需價格為上限。如果已定義[`queue_settings`](#queue-settings)設定，則必須移除此設定，並由各[`[compute_resource]`區段](compute-resource-section.md)中的[`spot_price`](compute-resource-section.md#compute-resource-spot-price)設定取代。

如果排程器是 `awsbatch`，請改用 [spot\$1bid\$1percentage](#spot-bid-percentage)。

如需尋找符合您需求的 Spot 執行個體的協助，請參閱 [Spot 執行個體顧問](https://aws.amazon.com/ec2/spot/instance-advisor/)。

```
spot_price = 1.50
```

**注意**  
在 2.5.0 AWS ParallelCluster 版中，如果[`spot_price`](#spot-price)但未指定 `cluster_type = spot` ，則 ComputeFleet 的執行個體啟動會失敗。這是在 2.5.1 AWS ParallelCluster 版中修正的。

[更新政策：此設定可以在更新期間變更。](using-pcluster-update.md#update-policy-setting-supported)

## `tags`
<a name="tags"></a>

**（選用）** 定義要使用的標籤 CloudFormation。

如果透過 *--tags* 指定命令列標籤，則會使用組態標籤來合併它們。

命令列標籤會覆寫具有相同金鑰的組態標籤。

標籤採用 JSON 格式。請勿在大括號外使用引號。

如需詳細資訊，請參閱*AWS CloudFormation 《 使用者指南*》中的[CloudFormation 資源標籤類型](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html)。

```
tags = {"key" : "value", "key2" : "value2"}
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

**注意**  
更新政策不支援將 2.8.0 版`tags`的設定 AWS ParallelCluster 變更為 2.9.1 版。  
對於 2.10.0 版到 2.11.7 版，支援變更`tags`設定的列出的更新政策並不準確。不支援修改此設定時的叢集更新。

## `template_url`
<a name="template-url"></a>

**（選用）** 定義用於建立叢集之 AWS CloudFormation 範本的路徑。

更新使用原先建立堆疊所用的範本。

預設為 `https://aws_region_name-aws-parallelcluster.s3.amazonaws.com/templates/aws-parallelcluster-version.cfn.json`。

**警告**  
這是進階參數。此設定的任何變更都會由您自行承擔風險。

```
template_url = https://us-east-1-aws-parallelcluster.s3.amazonaws.com/templates/aws-parallelcluster-2.11.9.cfn.json
```

[更新政策：更新期間不會分析此設定。](using-pcluster-update.md#update-policy-setting-ignored)

## `vpc_settings`
<a name="vpc-settings"></a>

**（必要）** 使用部署叢集的 Amazon VPC 組態來識別 `[vpc]`區段。區段名稱必須以字母開頭，包含不超過 30 個字元，且僅包含字母、數字、連字號 (-) 和底線 (\$1)。

如需詳細資訊，請參閱 [`[vpc]`一節](vpc-section.md)。

例如，下列設定指定 `[vpc public]` 啟動的 區段用於 Amazon VPC 組態。

```
vpc_settings = public
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

# `[compute_resource]` 區段
<a name="compute-resource-section"></a>

定義運算資源的組態設定。 [`[compute_resource]` 區段](#compute-resource-section)由 [`[queue]`區段](queue-section.md)中的 [`compute_resource_settings`](queue-section.md#queue-compute-resource-settings)設定參考。 [`[compute_resource]`區段](#compute-resource-section)只有在 [`scheduler`](cluster-definition.md#scheduler) 設定為 時才支援`slurm`。

格式為 `[compute_resource <compute-resource-name>]`。*compute-resource-name*必須以字母開頭，包含不超過 30 個字元，且僅包含字母、數字、連字號 (-) 和底線 (\$1)。

```
[compute_resource cr1]
instance_type = c5.xlarge
min_count = 0
initial_count = 2
max_count = 10
spot_price = 0.5
```

**注意**  
2.9.0 AWS ParallelCluster 版中已新增對 [`[compute_resource]`區段](#compute-resource-section)的支援。

**Topics**
+ [`initial_count`](#compute-resource-initial-count)
+ [`instance_type`](#compute-resource-instance-type)
+ [`max_count`](#compute-resource-max-count)
+ [`min_count`](#compute-resource-min-count)
+ [`spot_price`](#compute-resource-spot-price)

## `initial_count`
<a name="compute-resource-initial-count"></a>

**（選用）** 設定要為此運算資源啟動的 Amazon EC2 執行個體初始數量。在運算資源中啟動至少此多個節點之前，叢集建立不會完成。如果佇列[`compute_type`](queue-section.md#queue-compute-type)的設定是 ，`spot`且沒有足夠的 Spot 執行個體可用，則叢集建立可能會逾時並失敗。任何大於[`min_count`](#compute-resource-min-count)設定的計數都是受限於[`scaledown_idletime`](scaling-section.md#scaledown-idletime)設定的動態容量。此設定會取代 [`initial_queue_size`](cluster-definition.md#configuration-initial-queue-size) 設定。

預設為 `0`。

```
initial_count = 2
```

[更新政策：必須停止運算機群，才能變更此設定以進行更新。](using-pcluster-update.md#update-policy-compute-fleet)

## `instance_type`
<a name="compute-resource-instance-type"></a>

**（必要）** 定義用於此運算資源的 Amazon EC2 執行個體類型。執行個體類型的架構必須與用於 [`master_instance_type`](cluster-definition.md#master-instance-type)設定的架構相同。對於[`[compute_resource]`區段](#compute-resource-section)所參考的每個[`[queue]`區段](queue-section.md)，`instance_type`設定必須是唯一的。此設定會取代 [`compute_instance_type`](cluster-definition.md#compute-instance-type) 設定。

```
instance_type = t2.micro
```

[更新政策：必須停止運算機群，才能變更此設定以進行更新。](using-pcluster-update.md#update-policy-compute-fleet)

## `max_count`
<a name="compute-resource-max-count"></a>

**（選用）** 設定可在此運算資源中啟動的 Amazon EC2 執行個體數量上限。任何大於 [`initial_count`](#compute-resource-initial-count)設定的計數都會在關機模式下啟動。此設定會取代 [`max_queue_size`](cluster-definition.md#configuration-max-queue-size) 設定。

預設為 `10`。

```
max_count = 10
```

[更新政策：將佇列的大小減少到低於目前節點數量，需要先停止運算機群。](using-pcluster-update.md#update-policy-max-count)

**注意**  
更新政策不支援變更`max_count`設定，直到 2.0.0 AWS ParallelCluster 版到 2.9.1 版的運算機群停止為止。

## `min_count`
<a name="compute-resource-min-count"></a>

**（選用）** 設定可在此運算資源中啟動的 Amazon EC2 執行個體數量下限。這些節點都是靜態容量。在運算資源中啟動至少此數量的節點之前，叢集建立不會完成。

預設為 `0`。

```
min_count = 1
```

[更新政策：減少佇列中的靜態節點數量需要先停止運算機群。](using-pcluster-update.md#update-policy-min-count)

**注意**  
更新政策不支援變更`min_count`設定，直到 2.0.0 AWS ParallelCluster 版到 2.9.1 版的運算機群停止為止。

## `spot_price`
<a name="compute-resource-spot-price"></a>

**（選用）** 設定此運算資源的最高 Spot 價格。只有在包含此運算資源的佇列[`compute_type`](queue-section.md#queue-compute-type)設定設為 時使用`spot`。此設定會取代 [`spot_price`](cluster-definition.md#spot-price) 設定。

如果您未指定值，則會向您收取 Spot 價格，上限為隨需價格。

如需尋找符合您需求的 Spot 執行個體的協助，請參閱 [Spot 執行個體顧問](https://aws.amazon.com/ec2/spot/instance-advisor/)。

```
spot_price = 1.50
```

[更新政策：必須停止運算機群，才能變更此設定以進行更新。](using-pcluster-update.md#update-policy-compute-fleet)

# `[cw_log]` 區段
<a name="cw-log-section"></a>

定義 CloudWatch Logs 的組態設定。

格式為 `[cw_log cw-log-name]`。*cw-log-name* 必須以字母開頭，包含不超過 30 個字元，且僅包含字母、數字、連字號 (-) 和底線 (\$1)。

```
[cw_log custom-cw-log]
enable = true
retention_days = 14
```

如需詳細資訊，請參閱[與 Amazon CloudWatch Logs 的整合](cloudwatch-logs.md)、[Amazon CloudWatch 儀表板](cloudwatch-dashboard.md)及[與 Amazon CloudWatch Logs 的整合](cloudwatch-logs.md)。

**注意**  
`cw_log` 2.6.0 AWS ParallelCluster 版中已新增 的支援。

## `enable`
<a name="cw-log-section-enable"></a>

 **（選用）** 指出是否啟用 CloudWatch Logs。

預設值為 `true`。使用 `false`停用 CloudWatch Logs。

下列範例會啟用 CloudWatch Logs。

```
enable = true
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `retention_days`
<a name="cw-log-section-retention-days"></a>

 **（選用）** 指出 CloudWatch Logs 保留個別日誌事件的天數。

預設值為 `14`。支援的值分別為 1、3、5、7、14、30、60、90、120、150、180、365、400、545、731、1827，和 3653。

下列範例會設定 CloudWatch Logs 將日誌事件保留 30 天。

```
retention_days = 30
```

[更新政策：此設定可以在更新期間變更。](using-pcluster-update.md#update-policy-setting-supported)

# `[dashboard]` 區段
<a name="dashboard-section"></a>

定義 CloudWatch 儀表板的組態設定。

格式為 `[dashboard dashboard-name]`。*儀表板名稱*必須以字母開頭，包含不超過 30 個字元，且只包含字母、數字、連字號 (-) 和底線 (\$1)。

```
[dashboard custom-dashboard]
enable = true
```

**注意**  
`dashboard` 2.10.0 AWS ParallelCluster 版中已新增 的支援。

## `enable`
<a name="dashboard-section-enable"></a>

 **（選用）** 指出是否已啟用 CloudWatch 儀表板。

預設值為 `true`。使用 `false`停用 CloudWatch 儀表板。

下列範例會啟用 CloudWatch 儀表板。

```
enable = true
```

[更新政策：此設定可以在更新期間變更。](using-pcluster-update.md#update-policy-setting-supported)

# `[dcv]` 區段
<a name="dcv-section"></a>

定義在前端節點上執行之 Amazon DCV 伺服器的組態設定。

若要建立和設定 Amazon DCV 伺服器，請使用您在 `dcv`區段中定義的[`dcv_settings`](cluster-definition.md#dcv-settings)名稱指定叢集，並將 [`enable`](#dcv-section-enable) 設定為 `master`，並將 [`base_os`](cluster-definition.md#base-os)設定為 `alinux2`、 `centos7``ubuntu1804`或 `ubuntu2004`。如果前端節點是 ARM 執行個體，請將 [`base_os`](cluster-definition.md#base-os)設定為 `alinux2`、 `centos7`或 `ubuntu1804`。

格式為 `[dcv dcv-name]`。*dcv-name* 必須以字母開頭，包含不超過 30 個字元，且僅包含字母、數字、連字號 (-) 和底線 (\$1)。

```
[dcv custom-dcv]
enable = master
port = 8443
access_from = 0.0.0.0/0
```

如需詳細資訊，請參閱[透過 Amazon DCV 連接至前端節點](dcv.md)

**重要**  
根據預設， 的 Amazon DCV 連接埠設定 AWS ParallelCluster 開放給所有 IPv4 地址。不過，只有在您擁有 Amazon DCV 工作階段的 URL 時，才能連線至 Amazon DCV 連接埠，並在從 傳回 URL 的 30 秒內連線至 Amazon DCV 工作階段`pcluster dcv connect`。使用 [`access_from`](#dcv-section-access-from)設定進一步限制存取具有 CIDR 格式 IP 範圍的 Amazon DCV 連接埠，並使用 [`port`](#dcv-section-port)設定來設定非標準連接埠。

**注意**  
2.10.4 版已`centos8` AWS ParallelCluster 移除 上的 [`[dcv]`區段](#dcv-section)支援。2.10.0 AWS ParallelCluster 版中`centos8`已新增 上的 [`[dcv]`區段](#dcv-section)支援。在 AWS 2.9.0 AWS ParallelCluster 版中已新增對 Graviton 型執行個體 [`[dcv]`一節](#dcv-section)的支援。2.6.0 AWS ParallelCluster 版已`ubuntu1804`新增 `alinux2`和 上的 [`[dcv]`區段](#dcv-section)支援。2.5.0 AWS ParallelCluster 版中`centos7`已新增 上的 [`[dcv]`區段](#dcv-section)支援。

## `access_from`
<a name="dcv-section-access-from"></a>

 **（選用，建議）** 指定 Amazon DCV 連線的 CIDR 格式 IP 範圍。只有在 AWS ParallelCluster 建立安全群組時，才會使用此設定。

預設值是 `0.0.0.0/0`，該值允許從任何網際網路位址存取。

```
access_from = 0.0.0.0/0
```

[更新政策：此設定可以在更新期間變更。](using-pcluster-update.md#update-policy-setting-supported)

## `enable`
<a name="dcv-section-enable"></a>

 **（必要）** 指出是否在前端節點上啟用 Amazon DCV。若要在前端節點上啟用 Amazon DCV 並設定所需的安全群組規則，請將 `enable`設定設為 `master`。

下列範例會在前端節點上啟用 Amazon DCV。

```
enable = master
```

**注意**  
Amazon DCV 會自動產生自我簽署憑證，用於保護在前端節點上執行的 Amazon DCV 用戶端和 Amazon DCV 伺服器之間的流量。若要設定您自己的憑證，請參閱[Amazon DCV HTTPS 憑證](dcv.md#dcv-certificate)。

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `port`
<a name="dcv-section-port"></a>

 **（選用）** 指定 Amazon DCV 的連接埠。

預設值為 `8443`。

```
port = 8443
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

# `[ebs]` 區段
<a name="ebs-section"></a>

定義掛載在前端節點上並透過 NFS 與運算節點共用之磁碟區的 Amazon EBS 磁碟區組態設定。

若要了解如何在叢集定義中包含 Amazon EBS 磁碟區，請參閱 ``[cluster]` 區段` / ``ebs_settings``。

若要將現有的 Amazon EBS 磁碟區用於與叢集生命週期無關的長期永久儲存，請指定 [`ebs_volume_id`](#ebs-volume-id)。

如果您未指定 [`ebs_volume_id`](#ebs-volume-id)， 會在建立叢集時從`[ebs]`設定 AWS ParallelCluster 建立 EBS 磁碟區，並在刪除叢集時刪除磁碟區和資料。

如需詳細資訊，請參閱[最佳實務：將叢集移至新的 AWS ParallelCluster 次要或修補程式版本](best-practices.md#best-practices-cluster-upgrades)。

格式為 `[ebs ebs-name]`。*ebs-name* 必須以字母開頭，包含不超過 30 個字元，且僅包含字母、數字、連字號 (-) 和底線 (\$1)。

```
[ebs custom1]
shared_dir = vol1
ebs_snapshot_id = snap-xxxxx
volume_type = io1
volume_iops = 200
...

[ebs custom2]
shared_dir = vol2
...

...
```

**Topics**
+ [`shared_dir`](#ebs-shared-dir)
+ [`ebs_kms_key_id`](#ebs-kms-key-id)
+ [`ebs_snapshot_id`](#ebs-snapshot-id)
+ [`ebs_volume_id`](#ebs-volume-id)
+ [`encrypted`](#encrypted)
+ [`volume_iops`](#volume-iops)
+ [`volume_size`](#volume-size)
+ [`volume_throughput`](#volume-throughput)
+ [`volume_type`](#volume-type)

## `shared_dir`
<a name="ebs-shared-dir"></a>

**（必要）** 指定掛載共用 Amazon EBS 磁碟區的路徑。

使用多個 Amazon EBS 磁碟區時，需要此參數。

當您使用一個 Amazon EBS 磁碟區[`shared_dir`](cluster-definition.md#cluster-shared-dir)時，此選項會覆寫 [`[cluster]`區段](cluster-definition.md)下指定的 。在下列範例中，磁碟區會掛載至 `/vol1`。

```
shared_dir = vol1
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `ebs_kms_key_id`
<a name="ebs-kms-key-id"></a>

**（選用）** 指定用於加密的自訂 AWS KMS 金鑰。

此參數必須與 `encrypted = true` 搭配使用。它還必須具有自訂 [`ec2_iam_role`](cluster-definition.md#ec2-iam-role)。

如需詳細資訊，請參閱[使用自訂 KMS 金鑰進行磁碟加密](tutorials_04_encrypted_kms_fs.md)。

```
ebs_kms_key_id = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `ebs_snapshot_id`
<a name="ebs-snapshot-id"></a>

**（選用）** 如果您使用快照做為磁碟區的來源，則定義 Amazon EBS 快照 ID。

沒有預設值。

```
ebs_snapshot_id = snap-xxxxx
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `ebs_volume_id`
<a name="ebs-volume-id"></a>

**（選用）** 定義要連接到前端節點的現有 Amazon EBS 磁碟區的磁碟區 ID。

沒有預設值。

```
ebs_volume_id = vol-xxxxxx
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `encrypted`
<a name="encrypted"></a>

**（選用）** 指定 Amazon EBS 磁碟區是否已加密。注意：請*不要*與快照搭配使用。

預設值為 `false`。

```
encrypted = false
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `volume_iops`
<a name="volume-iops"></a>

**（選用）** 定義 `io1`、 `io2`和`gp3`類型磁碟區的 IOPS 數量。

預設值、支援的值和`volume_iops``volume_size`比率因 [`volume_type`](raid-section.md#raid-volume-type)和 而異[`volume_size`](#volume-size)。

`volume_type` = `io1`  
預設值 `volume_iops` = 100  
支援的值 `volume_iops` = 100–64000 †  
最大`volume_iops``volume_size`比率 = 每個 GiB 50 IOPS。5000 IOPS 需要至少 100 GiB `volume_size`的 。

`volume_type` = `io2`  
預設值 `volume_iops` = 100  
支援的值 `volume_iops` = 100–64000 (`io2`區塊快速磁碟區為 256000) †  
最大`volume_iops``volume_size`比率 = 每個 GiB 500 IOPS。5000 IOPS 需要至少 10 GiB `volume_size`的 。

`volume_type` = `gp3`  
預設值 `volume_iops` = 3000  
支援的值 `volume_iops` = 3000–16000  
最大`volume_iops``volume_size`比率 = 每個 GiB 500 IOPS。5000 IOPS 需要至少 10 GiB `volume_size`的 。

```
volume_iops = 200
```

[更新政策：此設定可以在更新期間變更。](using-pcluster-update.md#update-policy-setting-supported)

† 只有建置在[佈建超過 32，000 IOPS 的 Nitro 系統上的執行個體](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances)，才能保證 IOPS 上限。其他執行個體保證高達 32，000 IOPS。除非您[修改磁碟區](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modify-volume.html)，否則舊版磁碟`io1`區可能無法達到完整效能。 `io2`Block Express 磁碟區支援高達 256，000 `volume_iops`的值。如需詳細資訊，請參閱《*Amazon EC2 使用者指南*》中的 [`io2` Block Express 磁碟區 （預覽中）](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volume-types.html#io2-block-express)。

## `volume_size`
<a name="volume-size"></a>

**（選用）** 以 GiB 指定要建立的磁碟區大小 （如果您未使用快照）。

預設值和支援的值因 而異[`volume_type`](#volume-type)。

`volume_type` = `standard`  
預設 `volume_size` = 20 GiB  
支援的值 `volume_size` = 1–1024 GiB

`volume_type` = `gp2`、`io2`、 `io1`和 `gp3`  
預設 `volume_size` = 20 GiB  
支援的值 `volume_size` = 1–16384 GiB

`volume_type` = `sc1`和 `st1`  
預設 `volume_size` = 500 GiB  
支援的值 `volume_size` = 500–16384 GiB

```
volume_size = 20
```

**注意**  
在 2.10.1 AWS ParallelCluster 版之前，所有磁碟區類型的預設值為 20 GiB。

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `volume_throughput`
<a name="volume-throughput"></a>

**（選用）** 以 MiB/s 為單位定義`gp3`磁碟區類型的輸送量。

預設值為 `125`。

支援的值 `volume_throughput` = 125–1000 MiB/s

`volume_throughput` 與 的比率`volume_iops`不可超過 0.25。1000 MiB/s 的最大輸送量要求`volume_iops`設定至少為 4000。

```
volume_throughput = 1000
```

**注意**  
`volume_throughput` 2.10.1 AWS ParallelCluster 版已新增 的支援。

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `volume_type`
<a name="volume-type"></a>

**（選用）** 指定您要啟動之[磁碟區的 Amazon EBS 磁碟區類型](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html)。

有效選項包括下列磁碟區類型：

`gp2`, `gp3`  
一般用途 SSD

`io1`, `io2`  
Provisioned IOPS SSD

`st1`  
輸送量最佳化 HDD

`sc1`  
Cold HDD

`standard`  
上一代磁性

如需詳細資訊，請參閱《Amazon EC2 使用者指南》中的 [Amazon EBS 磁碟區類型](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html)。

預設值為 `gp2`。

```
volume_type = io2
```

**注意**  
2.10.1 AWS ParallelCluster 版已`io2`新增 `gp3`和 的支援。

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

# `[efs]` 區段
<a name="efs-section"></a>

定義安裝在前端和運算節點上的 Amazon EFS 組態設定。如需詳細資訊，請參閱《*Amazon EFS API 參考*》中的 [CreateFileSystem](https://docs.aws.amazon.com/efs/latest/ug/API_CreateFileSystem.html)。

若要了解如何在叢集定義中包含 Amazon EFS 檔案系統，請參閱 ``[cluster]` 區段` / ``efs_settings``。

若要將現有的 Amazon EFS 檔案系統用於與叢集生命週期無關的長期永久儲存，請指定 [`efs_fs_id`](#efs-efs-fs-id)。

如果您未指定 [`efs_fs_id`](#efs-efs-fs-id)， 會在建立叢集時從`[efs]`設定 AWS ParallelCluster 中建立 Amazon EFS 檔案系統，並在刪除叢集時刪除檔案系統和資料。

如需詳細資訊，請參閱[最佳實務：將叢集移至新的 AWS ParallelCluster 次要或修補程式版本](best-practices.md#best-practices-cluster-upgrades)。

格式為 `[efs efs-name]`。*efs-name* 必須以字母開頭，包含不超過 30 個字元，且僅包含字母、數字、連字號 (-) 和底線 (\$1)。

```
[efs customfs]
shared_dir = efs
encrypted = false
performance_mode = generalPurpose
```

**Topics**
+ [`efs_fs_id`](#efs-efs-fs-id)
+ [`efs_kms_key_id`](#efs-efs-kms-key-id)
+ [`encrypted`](#efs-encrypted)
+ [`performance_mode`](#efs-performance-mode)
+ [`provisioned_throughput`](#efs-provisioned-throughput)
+ [`shared_dir`](#efs-shared-dir)
+ [`throughput_mode`](#efs-throughput-mode)

## `efs_fs_id`
<a name="efs-efs-fs-id"></a>

**（選用）** 定義現有檔案系統的 Amazon EFS 檔案系統 ID。

指定此選項會使 以外的所有其他 Amazon EFS 選項失效[`shared_dir`](cluster-definition.md#cluster-shared-dir)。

如果您設定此選項，它僅支援下列類型的檔案系統：
+ 在堆疊的可用區域中沒有掛載目標的檔案系統。
+ 在堆疊可用區域中具有現有掛載目標的檔案系統，同時允許來自 的傳入和傳出 NFS 流量`0.0.0.0/0`。

驗證 [`efs_fs_id`](#efs-efs-fs-id) 的例行性檢查，需要 IAM 角色才能擁有以下許可：
+ `elasticfilesystem:DescribeMountTargets`
+ `elasticfilesystem:DescribeMountTargetSecurityGroups`
+ `ec2:DescribeSubnets`
+ `ec2:DescribeSecurityGroups`
+ `ec2:DescribeNetworkInterfaceAttribute`

若要避免錯誤，您必須將這些許可新增至 IAM 角色，或設定 `sanity_check = false`。

**重要**  
當您使用 允許的傳入和傳出 NFS 流量設定掛載目標時`0.0.0.0/0`，它會向掛載目標可用區域中任何位置的 NFS 掛載請求公開檔案系統。 AWS 不建議在堆疊的可用區域中建立掛載目標。相反地，讓我們 AWS 處理此步驟。如果您想要在堆疊的可用區域中具有掛載目標，請考慮使用自訂安全群組，方法是在 [`[vpc]`區段](vpc-section.md)下提供[`vpc_security_group_id`](vpc-section.md#vpc-security-group-id)選項。然後，將該安全群組新增至掛載目標，然後關閉 `sanity_check`以建立叢集。

沒有預設值。

```
efs_fs_id = fs-12345
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `efs_kms_key_id`
<a name="efs-efs-kms-key-id"></a>

**（選用）** 識別用於保護加密檔案系統的 AWS Key Management Service (AWS KMS) 客戶受管金鑰。如果設定此選項，則必須將 [`encrypted`](#efs-encrypted) 設定設為 `true`。這對應至 *Amazon EFS API 參考*中的 [KmsKeyId](https://docs.aws.amazon.com/efs/latest/ug/API_CreateFileSystem.html#efs-CreateFileSystem-request-KmsKeyId) 參數。

沒有預設值。

```
efs_kms_key_id = 1234abcd-12ab-34cd-56ef-1234567890ab
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `encrypted`
<a name="efs-encrypted"></a>

**（選用）** 指出檔案系統是否已加密。這對應至 *Amazon EFS API 參考*中的[加密](https://docs.aws.amazon.com/efs/latest/ug/API_CreateFileSystem.html#efs-CreateFileSystem-request-Encrypted)參數。

預設值為 `false`。

```
encrypted = true
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `performance_mode`
<a name="efs-performance-mode"></a>

**（選用）** 定義檔案系統的效能模式。這對應至 *Amazon EFS API 參考*中的 [PerformanceMode](https://docs.aws.amazon.com/efs/latest/ug/API_CreateFileSystem.html#efs-CreateFileSystem-request-PerformanceMode) 參數。

有效選項為下列值：
+ `generalPurpose`
+ `maxIO`

 這兩個值都區分大小寫。

我們建議對大部分檔案系統使用 `generalPurpose` 效能模式。

使用 `maxIO` 效能模式的檔案系統可擴展到更高階的彙總輸出量和每秒操作數。不過，大多數檔案操作的延遲會略高。

建立檔案系統之後，就無法變更此參數。

預設值為 `generalPurpose`。

```
performance_mode = generalPurpose
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `provisioned_throughput`
<a name="efs-provisioned-throughput"></a>

**（選用）** 定義檔案系統的佈建輸送量，以 MiB/s 為單位。這對應至 *Amazon EFS API 參考*中的 [ProvisionedThroughputInMibps](https://docs.aws.amazon.com/efs/latest/ug/API_CreateFileSystem.html#efs-CreateFileSystem-response-ProvisionedThroughputInMibps) 參數。

如果使用此參數，則必須將 [`throughput_mode`](#efs-throughput-mode) 設為 `provisioned`。

輸送量配額為 `1024` MiB/s。若要要求增加配額，請聯絡 支援。

最小值為 `0.0` MiB/s。

```
provisioned_throughput = 1024
```

[更新政策：此設定可以在更新期間變更。](using-pcluster-update.md#update-policy-setting-supported)

## `shared_dir`
<a name="efs-shared-dir"></a>

**（必要）** 定義前端和運算節點上的 Amazon EFS 掛載點。

此為必要參數。只有在指定 時，才會使用 [`shared_dir`](cluster-definition.md#cluster-shared-dir) Amazon EFS 區段。

請勿使用 `NONE`或 `/NONE`做為共用目錄。

下列範例會在 掛載 Amazon EFS`/efs`。

```
shared_dir = efs
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `throughput_mode`
<a name="efs-throughput-mode"></a>

**（選用）** 定義檔案系統的輸送量模式。這對應至 *Amazon EFS API 參考*中的 [ThroughputMode](https://docs.aws.amazon.com/efs/latest/ug/API_CreateFileSystem.html#efs-CreateFileSystem-request-ThroughputMode) 參數。

有效選項為下列值：
+ `bursting`
+ `provisioned`

預設值為 `bursting`。

```
throughput_mode = provisioned
```

[更新政策：此設定可以在更新期間變更。](using-pcluster-update.md#update-policy-setting-supported)

# `[fsx]` 區段
<a name="fsx-section"></a>

定義連接的 FSx for Lustre 檔案系統的組態設定。如需詳細資訊，請參閱《[Amazon FSx API 參考》中的 Amazon FSx CreateFileSystem](https://docs.aws.amazon.com/fsx/latest/APIReference/API_CreateFileSystem.html)。 * FSx *

如果 [`base_os`](cluster-definition.md#base-os)是 `alinux2`、`ubuntu1804`、 `centos7`或 `ubuntu2004`，則支援 FSx for Lustre。

使用 Amazon Linux 時，核心必須是 `4.14.104-78.84.amzn1.x86_64`或更新版本。如需說明，請參閱《*Amazon FSx for* [Lustre 使用者指南》中的安裝 lustre 用戶端](https://docs.aws.amazon.com/fsx/latest/LustreGuide/install-lustre-client.html)。

**注意**  
使用 `awsbatch`做為排程器時，目前不支援 FSx for Lustre。

**注意**  
2.10.4 AWS ParallelCluster 版已`centos8`移除 上的 FSx for Lustre 支援。2.11.0 AWS ParallelCluster 版中`ubuntu2004`已新增 上的 FSx for Lustre 支援。2.10.0 AWS ParallelCluster 版中`centos8`已新增 上的 FSx for Lustre 支援。在 `alinux2`、 `ubuntu1604`和 上的 FSx for Lustre 支援`ubuntu1804`已新增至 2.6.0 AWS ParallelCluster 版。2.4.0 版中`centos7` AWS ParallelCluster 已新增 上的 FSx for Lustre 支援。

如果使用現有的檔案系統，則它必須與安全群組建立關聯，允許傳入 TCP 流量經過連接埠 `988`。在安全群組規則`0.0.0.0/0`上將來源設定為 ，可為該規則的通訊協定和連接埠範圍提供 VPC 安全群組內所有 IP 範圍的用戶端存取。若要進一步限制檔案系統的存取，建議您針對安全群組規則使用更嚴格的來源。例如，您可以使用更具體IDs。這不會使用 [`vpc_security_group_id`](vpc-section.md#vpc-security-group-id) 而自動完成。

若要將現有的 Amazon FSx 檔案系統用於與叢集生命週期無關的長期永久儲存，請指定 [`fsx_fs_id`](#fsx-fs-id)。

如果您未指定 [`fsx_fs_id`](#fsx-fs-id)， 會在建立叢集時從`[fsx]`設定 AWS ParallelCluster 中建立 FSx for Lustre 檔案系統，並在刪除叢集時刪除檔案系統和資料。

如需詳細資訊，請參閱[最佳實務：將叢集移至新的 AWS ParallelCluster 次要或修補程式版本](best-practices.md#best-practices-cluster-upgrades)。

格式為 `[fsx fsx-name]`。*fsx-name* 必須以字母開頭，包含不超過 30 個字元，且僅包含字母、數字、連字號 (-) 和底線 (\$1)。

```
[fsx fs]
shared_dir = /fsx
fsx_fs_id = fs-073c3803dca3e28a6
```

若要建立和設定新的檔案系統，請使用下列參數：

```
[fsx fs]
shared_dir = /fsx
storage_capacity = 3600
imported_file_chunk_size = 1024
export_path = s3://bucket/folder
import_path = s3://bucket
weekly_maintenance_start_time = 1:00:00
```

**Topics**
+ [`auto_import_policy`](#fsx-auto-import-policy)
+ [`automatic_backup_retention_days`](#fsx-automatic-backup-retention-days)
+ [`copy_tags_to_backups`](#fsx-copy-tags-to-backups)
+ [`daily_automatic_backup_start_time`](#fsx-daily-automatic-backup-start-time)
+ [`data_compression_type`](#fsx-data-compression-type)
+ [`deployment_type`](#fsx-deployment-type)
+ [`drive_cache_type`](#fsx-drive-cache-type)
+ [`export_path`](#fsx-export-path)
+ [`fsx_backup_id`](#fsx-backup-id)
+ [`fsx_fs_id`](#fsx-fs-id)
+ [`fsx_kms_key_id`](#fsx-kms-key-id)
+ [`import_path`](#fsx-import-path)
+ [`imported_file_chunk_size`](#fsx-imported-file-chunk-size)
+ [`per_unit_storage_throughput`](#fsx-per-unit-storage-throughput)
+ [`shared_dir`](#fsx-shared-dir)
+ [`storage_capacity`](#fsx-storage-capacity)
+ [`storage_type`](#fsx-storage-type)
+ [`weekly_maintenance_start_time`](#fsx-weekly-maintenance-start-time)

## `auto_import_policy`
<a name="fsx-auto-import-policy"></a>

**（選用）** 指定自動匯入政策，以反映用於建立 FSx for Lustre 檔案系統的 S3 儲存貯體中的變更。可能值如下：

`NEW`  
FSx for Lustre 會自動匯入任何新增至連結 S3 儲存貯體的新物件目錄清單，這些物件目前不存在於 FSx for Lustre 檔案系統中。

`NEW_CHANGED`  
FSx for Lustre 會自動匯入新增到 S3 儲存貯體的任何新物件的檔案和目錄清單，以及 S3 儲存貯體中變更的任何現有物件。

這對應至 [AutoImportPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-lustreconfiguration.html#cfn-fsx-filesystem-lustreconfiguration-autoimportpolicy) 屬性。如需詳細資訊，請參閱《*Amazon FSx for Lustre 使用者指南*》中的[從 S3 儲存貯體自動匯入更新](https://docs.aws.amazon.com/fsx/latest/LustreGuide/autoimport-data-repo.html)。指定 [`auto_import_policy`](#fsx-auto-import-policy) 參數時，不得指定 [`automatic_backup_retention_days`](#fsx-automatic-backup-retention-days)、[`daily_automatic_backup_start_time`](#fsx-daily-automatic-backup-start-time)、 [`copy_tags_to_backups`](#fsx-copy-tags-to-backups)和 [`fsx_backup_id`](#fsx-backup-id) 參數。

如果未指定`auto_import_policy`設定，則會停用自動匯入。FSx for Lustre 只會在建立檔案系統時，從連結的 S3 儲存貯體更新檔案和目錄清單。

```
auto_import_policy = NEW_CHANGED
```

**注意**  
[`auto_import_policy`](#fsx-auto-import-policy) 2.10.0 AWS ParallelCluster 版已新增 的支援。

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `automatic_backup_retention_days`
<a name="fsx-automatic-backup-retention-days"></a>

**（選用）** 指定保留自動備份的天數。這僅適用於 `PERSISTENT_1` 部署類型。指定 [`automatic_backup_retention_days`](#fsx-automatic-backup-retention-days) 參數時，不得指定 [`auto_import_policy`](#fsx-auto-import-policy)、[`import_path`](#fsx-import-path)、 [`export_path`](#fsx-export-path)和 [`imported_file_chunk_size`](#fsx-imported-file-chunk-size) 參數。這對應至 [AutomaticBackupRetentionDays](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-lustreconfiguration.html#cfn-fsx-filesystem-lustreconfiguration-automaticbackupretentiondays) 屬性。

預設值為 0。此設定會停用自動備份。可能的值是介於 0 到 35 之間的整數，包括在內。

```
automatic_backup_retention_days = 35
```

**注意**  
[`automatic_backup_retention_days`](#fsx-automatic-backup-retention-days) 2.8.0 AWS ParallelCluster 版已新增 的支援。

[更新政策：此設定可以在更新期間變更。](using-pcluster-update.md#update-policy-setting-supported)

## `copy_tags_to_backups`
<a name="fsx-copy-tags-to-backups"></a>

**（選用）** 指定是否將檔案系統的標籤複製到備份。這僅適用於 `PERSISTENT_1` 部署類型。指定 [`copy_tags_to_backups`](#fsx-copy-tags-to-backups) 參數時，[`automatic_backup_retention_days`](#fsx-automatic-backup-retention-days)必須以大於 0 的值指定 ，且不得指定 [`auto_import_policy`](#fsx-auto-import-policy)、[`import_path`](#fsx-import-path)、 [`export_path`](#fsx-export-path)和 [`imported_file_chunk_size`](#fsx-imported-file-chunk-size) 參數。這對應至 [CopyTagsToBackups](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-lustreconfiguration.html#cfn-fsx-filesystem-lustreconfiguration-copytagstobackups) 屬性。

預設值為 `false`。

```
copy_tags_to_backups = true
```

**注意**  
[`copy_tags_to_backups`](#fsx-copy-tags-to-backups) 2.8.0 AWS ParallelCluster 版已新增 的支援。

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `daily_automatic_backup_start_time`
<a name="fsx-daily-automatic-backup-start-time"></a>

**（選用）** 指定啟動自動備份的當日時間 (UTC)。這僅適用於 `PERSISTENT_1` 部署類型。指定 [`daily_automatic_backup_start_time`](#fsx-daily-automatic-backup-start-time) 參數時，[`automatic_backup_retention_days`](#fsx-automatic-backup-retention-days)必須以大於 0 的值指定 ，且不得指定 [`auto_import_policy`](#fsx-auto-import-policy)、[`import_path`](#fsx-import-path)、 [`export_path`](#fsx-export-path)和 [`imported_file_chunk_size`](#fsx-imported-file-chunk-size) 參數。這對應至 [DailyAutomaticBackupStartTime](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-lustreconfiguration.html#cfn-fsx-filesystem-lustreconfiguration-dailyautomaticbackupstarttime) 屬性。

格式為 `HH:MM`，其中 `HH`是一天中的零填充小時 (0-23)，而 `MM`是一小時的零填充分鐘。例如，1：03 A.M. UTC 如下。

```
daily_automatic_backup_start_time = 01:03
```

預設值是介於 `00:00`和 之間的隨機時間`23:59`。

**注意**  
[`daily_automatic_backup_start_time`](#fsx-daily-automatic-backup-start-time) 2.8.0 AWS ParallelCluster 版已新增 的支援。

[更新政策：此設定可以在更新期間變更。](using-pcluster-update.md#update-policy-setting-supported)

## `data_compression_type`
<a name="fsx-data-compression-type"></a>

**（選用）** 指定 FSx for Lustre 資料壓縮類型。這對應至 [DataCompressionType](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-lustreconfiguration.html#cfn-fsx-filesystem-lustreconfiguration-datacompressiontype) 屬性。如需詳細資訊，請參閱《Amazon [FSx for Lustre 使用者指南》中的 FSx for Lustre 資料壓縮](https://docs.aws.amazon.com/fsx/latest/LustreGuide/data-compression.html)。 * FSx *

唯一有效的值為 `LZ4`。若要停用資料壓縮，請移除 [`data_compression_type`](#fsx-data-compression-type) 參數。

```
data_compression_type = LZ4
```

**注意**  
[`data_compression_type`](#fsx-data-compression-type) 2.11.0 AWS ParallelCluster 版已新增 的支援。

[更新政策：此設定可以在更新期間變更。](using-pcluster-update.md#update-policy-setting-supported)

## `deployment_type`
<a name="fsx-deployment-type"></a>

**（選用）** 指定 FSx for Lustre 部署類型。這對應到 [DeploymentType](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-lustreconfiguration.html#cfn-fsx-filesystem-lustreconfiguration-deploymenttype) 屬性。如需詳細資訊，請參閱《Amazon [FSx for Lustre 使用者指南》中的 FSx for Lustre 部署選項](https://docs.aws.amazon.com/fsx/latest/LustreGuide/using-fsx-lustre.html)。 * FSx * 選擇暫時儲存和短期處理資料的暫存部署類型。 `SCRATCH_2`是最新一代的暫存檔案系統。它比基準輸送量和傳輸中資料加密提供更高的高載輸送量。

有效值為 `SCRATCH_1`、`SCRATCH_2` 和 `PERSISTENT_1`。

`SCRATCH_1`  
FSx for Lustre 的預設部署類型。使用此部署類型，[`storage_capacity`](#fsx-storage-capacity) 設定值可能為 1200、2400 和任何 3600 的倍數。`SCRATCH_1` 2.4.0 AWS ParallelCluster 版已新增 的支援。

`SCRATCH_2`  
最新一代的暫存檔案系統。它支援高達峰值工作負載基準輸送量的六倍。它也支援傳輸中加密受支援執行個體類型的資料 AWS 區域。如需詳細資訊，請參閱《*Amazon FSx for Lustre 使用者指南*》中的[加密傳輸中的資料](https://docs.aws.amazon.com/fsx/latest/LustreGuide/encryption-in-transit-fsxl.html)。使用此部署類型，[`storage_capacity`](#fsx-storage-capacity) 設定值可能為 1200 和任何 2400 的倍數。`SCRATCH_2` 2.6.0 AWS ParallelCluster 版已新增 的支援。

`PERSISTENT_1`  
專為長期儲存而設計。檔案伺服器高度可用，資料會在檔案系統的 AWS 可用區域內複寫。它支援傳輸中加密所支援執行個體類型的資料。使用此部署類型，[`storage_capacity`](#fsx-storage-capacity) 設定值可能為 1200 和任何 2400 的倍數。`PERSISTENT_1` 2.6.0 AWS ParallelCluster 版已新增 的支援。

預設值為 `SCRATCH_1`。

```
deployment_type = SCRATCH_2
```

**注意**  
[`deployment_type`](#fsx-deployment-type) 2.6.0 AWS ParallelCluster 版已新增 的支援。

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `drive_cache_type`
<a name="fsx-drive-cache-type"></a>

**（選用）** 指定檔案系統具有 SSD 磁碟機快取。這只能在[`storage_type`](#fsx-storage-type)設定設為 時設定`HDD`。這對應到 [DriveCacheType](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-lustreconfiguration.html#cfn-fsx-filesystem-lustreconfiguration-drivecachetype) 屬性。如需詳細資訊，請參閱《Amazon [FSx for Lustre 使用者指南》中的 FSx for Lustre 部署選項](https://docs.aws.amazon.com/fsx/latest/LustreGuide/using-fsx-lustre.html)。 * FSx *

唯一有效的值為 `READ`。若要停用 SSD 磁碟機快取，請勿指定 `drive_cache_type`設定。

```
drive_cache_type = READ
```

**注意**  
[`drive_cache_type`](#fsx-drive-cache-type) 2.10.0 AWS ParallelCluster 版已新增 的支援。

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `export_path`
<a name="fsx-export-path"></a>

**（選用）** 指定匯出檔案系統根的 Amazon S3 路徑。指定 [`export_path`](#fsx-export-path) 參數時，不得指定 [`automatic_backup_retention_days`](#fsx-automatic-backup-retention-days)、[`daily_automatic_backup_start_time`](#fsx-daily-automatic-backup-start-time)、 [`copy_tags_to_backups`](#fsx-copy-tags-to-backups)和 [`fsx_backup_id`](#fsx-backup-id) 參數。這對應至 [ExportPath](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-lustreconfiguration.html#cfn-fsx-filesystem-lustreconfiguration-exportpath) 屬性。檔案資料和中繼資料不會自動匯出至 `export_path`。如需有關匯出資料和中繼資料的資訊，請參閱《*Amazon FSx for Lustre 使用者指南*》中的[將變更匯出至資料儲存庫](https://docs.aws.amazon.com/fsx/latest/LustreGuide/export-changed-data-meta-dra.html)。

預設值是 `s3://import-bucket/FSxLustre[creation-timestamp]`，其中 `import-bucket` 為 [`import_path`](#fsx-import-path) 參數中提供的儲存貯體。

```
export_path = s3://bucket/folder
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `fsx_backup_id`
<a name="fsx-backup-id"></a>

**（選用）** 指定要用來從現有備份還原檔案系統的備份 ID。指定 [`fsx_backup_id`](#fsx-backup-id) 參數時，不得指定 [`auto_import_policy`](#fsx-auto-import-policy)、[`deployment_type`](#fsx-deployment-type)、[`export_path`](#fsx-export-path)、[`fsx_kms_key_id`](#fsx-kms-key-id)[`import_path`](#fsx-import-path)、[`imported_file_chunk_size`](#fsx-imported-file-chunk-size)、[`storage_capacity`](#fsx-storage-capacity)、 和 [`per_unit_storage_throughput`](#fsx-per-unit-storage-throughput) 參數。這些參數會從備份中讀取。此外，不得指定 [`auto_import_policy`](#fsx-auto-import-policy)、[`import_path`](#fsx-import-path)、 [`export_path`](#fsx-export-path)和 [`imported_file_chunk_size`](#fsx-imported-file-chunk-size) 參數。

這對應至 [BackupId](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fsx-filesystem.html#cfn-fsx-filesystem-backupid) 屬性。

```
fsx_backup_id = backup-fedcba98
```

**注意**  
[`fsx_backup_id`](#fsx-backup-id) 2.8.0 AWS ParallelCluster 版已新增 的支援。

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `fsx_fs_id`
<a name="fsx-fs-id"></a>

**（選用）** 連接現有的 FSx for Lustre 檔案系統。

如果指定此選項，則只會使用 [`[fsx]`區段](#fsx-section)中的 [`shared_dir`](#fsx-shared-dir) 和 [`fsx_fs_id`](#fsx-fs-id) 設定，而且會忽略 [`[fsx]`區段](#fsx-section)中的任何其他設定。

```
fsx_fs_id = fs-073c3803dca3e28a6
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `fsx_kms_key_id`
<a name="fsx-kms-key-id"></a>

**（選用）** 指定您 AWS Key Management Service (AWS KMS) 客戶受管金鑰的金鑰 ID。

系統會使用此金鑰來加密靜態檔案系統中的資料。

此 ID 必須與自訂 [`ec2_iam_role`](cluster-definition.md#ec2-iam-role) 搭配使用。如需詳細資訊，請參閱[使用自訂 KMS 金鑰進行磁碟加密](tutorials_04_encrypted_kms_fs.md)。這對應至 *Amazon FSx API 參考*中的 [KmsKeyId](https://docs.aws.amazon.com/fsx/latest/APIReference/API_CreateFileSystem.html#FSx-CreateFileSystem-request-KmsKeyId) 參數。

```
fsx_kms_key_id = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
```

**注意**  
[`fsx_kms_key_id`](#fsx-kms-key-id) 2.6.0 AWS ParallelCluster 版已新增 的支援。

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `import_path`
<a name="fsx-import-path"></a>

**（選用）** 指定要從 將資料載入檔案系統的 S3 儲存貯體，並做為匯出儲存貯體。如需詳細資訊，請參閱[`export_path`](#fsx-export-path)。如果您指定 [`import_path`](#fsx-import-path) 參數，則不得指定 [`automatic_backup_retention_days`](#fsx-automatic-backup-retention-days)、[`daily_automatic_backup_start_time`](#fsx-daily-automatic-backup-start-time)、 [`copy_tags_to_backups`](#fsx-copy-tags-to-backups)和 [`fsx_backup_id`](#fsx-backup-id) 參數。這對應至 *Amazon FSx API 參考*中的 [ImportPath](https://docs.aws.amazon.com/fsx/latest/APIReference/API_CreateFileSystemLustreConfiguration.html#FSx-Type-CreateFileSystemLustreConfiguration-ImportPath) 參數。

在建立叢集時進行匯入。如需詳細資訊，請參閱《*Amazon FSx for Lustre 使用者指南*》中的[從資料儲存庫匯入資料](https://docs.aws.amazon.com/fsx/latest/LustreGuide/importing-files.html)。在匯入時，只會匯入檔案中繼資料 （名稱、所有權、時間戳記和許可）。在第一次存取檔案之前，不會從 S3 儲存貯體匯入檔案資料。如需有關預先載入檔案內容的資訊，請參閱《*Amazon FSx for Lustre 使用者指南*》中的[將檔案預先載入至您的檔案系統](https://docs.aws.amazon.com/fsx/latest/LustreGuide/preload-file-contents-hsm-dra.html)。

如果未提供值，則檔案系統為空白。

```
import_path =  s3://bucket
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `imported_file_chunk_size`
<a name="fsx-imported-file-chunk-size"></a>

**（選用）** 針對從資料儲存庫匯入的檔案 （使用 )，決定存放在單一實體磁碟上每個檔案 （以 MiB 為單位） 的條紋計數和資料量上限[`import_path`](#fsx-import-path)。單一檔案可分割範圍的磁碟數上限會受組成檔案系統的磁碟總數所限。指定 [`imported_file_chunk_size`](#fsx-imported-file-chunk-size) 參數時，不得指定 [`automatic_backup_retention_days`](#fsx-automatic-backup-retention-days)、[`daily_automatic_backup_start_time`](#fsx-daily-automatic-backup-start-time)、 [`copy_tags_to_backups`](#fsx-copy-tags-to-backups)和 [`fsx_backup_id`](#fsx-backup-id) 參數。這對應至 [ImportedFileChunkSize](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-lustreconfiguration.html#cfn-fsx-filesystem-lustreconfiguration-importedfilechunksize) 屬性。

區塊大小預設為 `1024`(1 GiB)，最多可達 512，000 MiB (500 GiB)。Amazon S3 物件大小的上限為 5 TB。

```
imported_file_chunk_size = 1024
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `per_unit_storage_throughput`
<a name="fsx-per-unit-storage-throughput"></a>

**(為 `PERSISTENT_1` 部署類型的必要項目)** 對於 [`deployment_type`](#fsx-deployment-type)` = PERSISTENT_1` 部署類型，描述 MB/s/TiB 中每個 1 個 TB 位元組 (TiB) 儲存體的讀取和寫入輸送量。檔案系統輸送量的計算方式是將網路系統儲存容量 (TiB) 乘以 [`per_unit_storage_throughput`](#fsx-per-unit-storage-throughput) (MB/s/TiB)。對於 2.4 TiB 的檔案系統，佈建 50 MB/s/TiB 的 [`per_unit_storage_throughput`](#fsx-per-unit-storage-throughput) 可產生 120 MB/s 的檔案系統輸送量。您需要支付佈建輸送量的費用。這對應於 [PerUnitStorageThroughput](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-lustreconfiguration.html#cfn-fsx-filesystem-lustreconfiguration-perunitstoragethroughput) 屬性。

可能的值取決於 [`storage_type`](#fsx-storage-type)設定的值。

`storage\$1type = SSD`  
可能值為 50、100、200。

`storage\$1type = HDD`  
可能的值為 12、40。

```
per_unit_storage_throughput = 200
```

**注意**  
[`per_unit_storage_throughput`](#fsx-per-unit-storage-throughput) 2.6.0 版已 AWS ParallelCluster 新增 的支援。

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `shared_dir`
<a name="fsx-shared-dir"></a>

**（必要）** 定義前端和運算節點上 FSx for Lustre 檔案系統的掛載點。

請勿使用 `NONE`或 `/NONE`做為共用目錄。

以下範例會在 `/fsx` 掛載檔案系統。

```
shared_dir = /fsx
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `storage_capacity`
<a name="fsx-storage-capacity"></a>

**(必要)** 指定檔案系統的儲存容量 (GiB)。這對應至 [StorageCapacity](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fsx-filesystem.html#cfn-fsx-filesystem-storagecapacity) 屬性。

儲存容量可能值會依 [`deployment_type`](#fsx-deployment-type) 設定而有所不同。

`SCRATCH_1`  
可能的值是 1200、2400 和任何 3600 的倍數。

`SCRATCH_2`  
可能的值是 1200 和任何 2400 的倍數。

`PERSISTENT_1`  
可能的值會根據其他設定的值而有所不同。    
`storage\$1type = SSD`  
可能的值是 1200 和任何 2400 的倍數。  
`storage\$1type = HDD`  
可能的值會根據設定的設定而有所不同[`per_unit_storage_throughput`](#fsx-per-unit-storage-throughput)。    
`per\$1unit\$1storage\$1throughput = 12`  
可能的值為 6000 的任何倍數。  
`per\$1unit\$1storage\$1throughput = 40`  
可能的值是 1800 的任何倍數。

```
storage_capacity = 7200
```

**注意**  
對於 2.5.0 和 2.5.1 AWS ParallelCluster 版， [`storage_capacity`](#fsx-storage-capacity) 支援 1200、2400 和 3600 的任何倍數的可能值。對於 2.5.0 AWS ParallelCluster 版之前的版本， 的大小下限[`storage_capacity`](#fsx-storage-capacity)為 3600。

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `storage_type`
<a name="fsx-storage-type"></a>

**（選用）** 指定檔案系統的儲存類型。這對應至 [StorageType](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fsx-filesystem.html#cfn-fsx-filesystem-storagetype) 屬性。可能的值為 `SSD` 和 `HDD`。預設值為 `SSD`。

儲存類型會變更其他設定的可能值。

`storage_type = SSD`   
指定銷售狀態磁碟機 (SSD) 儲存類型。  
`storage_type = SSD` 會變更數個其他設定的可能值。    
[`drive_cache_type`](#fsx-drive-cache-type)  
無法指定此設定。  
[`deployment_type`](#fsx-deployment-type)  
此設定可設定為 `SCRATCH_1`、 `SCRATCH_2`或 `PERSISTENT_1`。  
[`per_unit_storage_throughput`](#fsx-per-unit-storage-throughput)  
如果 [`deployment_type`](#fsx-deployment-type) 設定為 `PERSISTENT_1`，則必須指定此設定。可能的值為 50、100 或 200。  
[`storage_capacity`](#fsx-storage-capacity)  
必須指定此設定。可能的值會根據 而有所不同[`deployment_type`](#fsx-deployment-type)。    
`deployment_type = SCRATCH_1`  
[`storage_capacity`](#fsx-storage-capacity) 可以是 1200、2400 或任何 3600 的倍數。  
`deployment_type = SCRATCH_2` 或 `deployment_type = PERSISTENT_1`  
[`storage_capacity`](#fsx-storage-capacity) 可以是 1200 或 2400 的任何倍數。

`storage_type = HDD`  
指定硬碟 (HDD) 儲存類型。  
`storage_type = HDD` 會變更其他設定的可能值。    
[`drive_cache_type`](#fsx-drive-cache-type)  
您可以指定此設定。  
[`deployment_type`](#fsx-deployment-type)  
此設定必須設定為 `PERSISTENT_1`。  
[`per_unit_storage_throughput`](#fsx-per-unit-storage-throughput)  
必須指定此設定。可能的值為 12 或 40。  
[`storage_capacity`](#fsx-storage-capacity)  
必須指定此設定。可能的值會根據[`per_unit_storage_throughput`](#fsx-per-unit-storage-throughput)設定而有所不同。    
`storage_capacity = 12`  
[`storage_capacity`](#fsx-storage-capacity) 可以是 6000 的任何倍數。  
`storage_capacity = 40`  
[`storage_capacity`](#fsx-storage-capacity) 可以是 1800 的任何倍數。

```
storage_type = SSD
```

**注意**  
2.10.0 AWS ParallelCluster 版中已新增對 [`storage_type`](#fsx-storage-type)設定的支援。

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `weekly_maintenance_start_time`
<a name="fsx-weekly-maintenance-start-time"></a>

**(選用)** 以 UTC 時區指定偏好的每週維護執行時間。這對應於 [WeeklyMaintenanceStartTime](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-lustreconfiguration.html#cfn-fsx-filesystem-lustreconfiguration-weeklymaintenancestarttime) 屬性。

格式為 [星期幾]:[小時]:[分鐘]。例如，週一午夜 如下所示。

```
weekly_maintenance_start_time = 1:00:00
```

[更新政策：此設定可以在更新期間變更。](using-pcluster-update.md#update-policy-setting-supported)

# `[queue]` 區段
<a name="queue-section"></a>

定義單一佇列的組態設定。只有在 [`scheduler`](cluster-definition.md#scheduler) 設定為 時，才支援 [`[queue]`區段](#queue-section)`slurm`。

格式為 `[queue <queue-name>]`。*Queue-name* 必須以小寫字母開頭，不可超過 30 個字元，且只能包含小寫字母、數字和連字號 (-)。

```
[queue q1]
compute_resource_settings = i1,i2
placement_group = DYNAMIC
enable_efa = true
disable_hyperthreading = false
compute_type = spot
```

**注意**  
2.9.0 AWS ParallelCluster 版中已新增對 [`[queue]`區段](#queue-section)的支援。

**Topics**
+ [`compute_resource_settings`](#queue-compute-resource-settings)
+ [`compute_type`](#queue-compute-type)
+ [`disable_hyperthreading`](#queue-disable-hyperthreading)
+ [`enable_efa`](#queue-enable-efa)
+ [`enable_efa_gdr`](#queue-enable-efa-gdr)
+ [`placement_group`](#queue-placement-group)

## `compute_resource_settings`
<a name="queue-compute-resource-settings"></a>

**（必要）** 識別包含此佇列之運算資源組態的[`[compute_resource]`區段](compute-resource-section.md)。區段名稱必須以字母開頭，包含不超過 30 個字元，且僅包含字母、數字、連字號 (-) 和底線 (\$1)。

每個[`[compute_resource]`區段](compute-resource-section.md)最多支援三 (3) 個[`[queue]`區段](#queue-section)。

例如，下列設定指定使用啟動 `[compute_resource cr1]`和 `[compute_resource cr2]` 的區段。

```
compute_resource_settings = cr1, cr2
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `compute_type`
<a name="queue-compute-type"></a>

**（選用）** 定義要為此佇列啟動的執行個體類型。此設定會取代 [`cluster_type`](cluster-definition.md#cluster-type) 設定。

有效選項為：`ondemand` 和 `spot`。

預設值為 `ondemand`。

如需 Spot 執行個體的詳細資訊，請參閱 [使用 競價型執行個體](spot.md)。

**注意**  
使用 Spot 執行個體需要`AWSServiceRoleForEC2Spot`服務連結角色存在於您的帳戶中。若要使用 在帳戶中建立此角色 AWS CLI，請執行下列命令：  

```
aws iam create-service-linked-role --aws-service-name spot.amazonaws.com
```
如需詳細資訊，請參閱《*Amazon EC2 使用者指南*》中的 [Spot 執行個體請求的服務連結角色](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html#service-linked-roles-spot-instance-requests)。

下列範例會針對此佇列中的運算節點使用 SpotInstances。

```
compute_type = spot
```

[更新政策：必須停止運算機群，才能變更此設定以進行更新。](using-pcluster-update.md#update-policy-compute-fleet)

## `disable_hyperthreading`
<a name="queue-disable-hyperthreading"></a>

**（選用）** 停用此佇列中節點上的超執行緒。並非所有執行個體類型都可以停用超執行緒。如需支援停用超執行緒的執行個體類型清單，請參閱《*Amazon EC2 使用者指南*》中的[每個執行個體類型的 CPU 核心和每個 CPU 核心的執行緒](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html#cpu-options-supported-instances-values)。如果已定義[`[cluster]`區段](cluster-definition.md)中的[`disable_hyperthreading`](cluster-definition.md#disable-hyperthreading)設定，則無法定義此設定。

預設值為 `false`。

```
disable_hyperthreading = true
```

[更新政策：必須停止運算機群，才能變更此設定以進行更新。](using-pcluster-update.md#update-policy-compute-fleet)

## `enable_efa`
<a name="queue-enable-efa"></a>

**（選用）** 如果設定為 `true`，請指定已為此佇列中的節點啟用 Elastic Fabric Adapter (EFA)。若要檢視支援 EFA 的 EC2 執行個體清單，請參閱《*Amazon EC2 Linux 執行個體使用者指南》中的*[支援的執行個體類型](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html#efa-instance-types)。如果已定義[`[cluster]`區段](cluster-definition.md)中的[`enable_efa`](cluster-definition.md#enable-efa)設定，則無法定義此設定。應使用叢集置放群組以充分減少執行個體之間的延遲。如需詳細資訊，請參閱[`placement`](cluster-definition.md#placement)及[`placement_group`](cluster-definition.md#placement-group)。

```
enable_efa = true
```

[更新政策：必須停止運算機群，才能變更此設定以進行更新。](using-pcluster-update.md#update-policy-compute-fleet)

## `enable_efa_gdr`
<a name="queue-enable-efa-gdr"></a>

**（選用）** 從 2.11.3 AWS ParallelCluster 版開始，此設定沒有效果。如果執行個體類型支援 GPUDirect RDMA （遠端直接記憶體存取），則運算節點一律會啟用 Elastic Fabric Adapter (EFA) 支援。

**注意**  
AWS ParallelCluster 2.10.0 版到 2.11.2 版：如果為 `true`，則 指定為此佇列中的節點啟用 Elastic Fabric Adapter (EFA) GPUDirect RDMA （遠端直接記憶體存取）。將此設定為 `true`需要這些作業系統 `true` (`alinux2`、`ubuntu1804`、 `centos7`或 `p4d.24xlarge`) 上的下列執行個體類型 () 支援將 [`enable_efa`](#queue-enable-efa)設定設為 .EFA GPUDirect RDMA`ubuntu2004`。如果已定義[`[cluster]`區段](cluster-definition.md)中的[`enable_efa_gdr`](cluster-definition.md#enable-efa-gdr)設定，則無法定義此設定。應使用叢集置放群組以充分減少執行個體之間的延遲。如需詳細資訊，請參閱[`placement`](cluster-definition.md#placement)及[`placement_group`](cluster-definition.md#placement-group)。

預設值為 `false`。

```
enable_efa_gdr = true
```

**注意**  
`enable_efa_gdr` 2.10.0 AWS ParallelCluster 版已新增 的支援。

[更新政策：必須停止運算機群，才能變更此設定以進行更新。](using-pcluster-update.md#update-policy-compute-fleet)

## `placement_group`
<a name="queue-placement-group"></a>

**（選用）** 如果存在，請定義此佇列的置放群組。此設定會取代 [`placement_group`](cluster-definition.md#placement-group) 設定。

有效選項為下列值：
+ `DYNAMIC`
+ 現有的 Amazon EC2 叢集置放群組名稱

設為 時`DYNAMIC`，會建立和刪除此佇列的唯一置放群組，做為叢集堆疊的一部分。

如需置放群組的詳細資訊，請參閱《*Amazon EC2 使用者指南*》中的[置放群組](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html)。如果相同置放群組用於不同的執行個體類型，則請求可能會因為容量不足錯誤而失敗。如需詳細資訊，請參閱《*Amazon EC2 使用者指南*》中的[執行個體容量不足](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/troubleshooting-launch.html#troubleshooting-launch-capacity)。

沒有預設值。

並非所有執行個體類型都支援叢集置放群組。例如， `t2.micro` 不支援叢集置放群組。如需有關支援叢集置放群組的執行個體類型清單的資訊，請參閱《*Amazon EC2 使用者指南*》中的[叢集置放群組規則和限制](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html#placement-groups-limitations-cluster)。如需使用置放群組的秘訣，請參閱 [置放群組和執行個體啟動問題](troubleshooting.md#placement-groups-and-instance-launch-issues)。

```
placement_group = DYNAMIC
```

[更新政策：必須停止運算機群，才能變更此設定以進行更新。](using-pcluster-update.md#update-policy-compute-fleet)

# `[raid]` 區段
<a name="raid-section"></a>

定義從多個相同 Amazon EBS 磁碟區建置的 RAID 陣列組態設定。RAID 磁碟機掛載在前端節點上，並匯出至具有 NFS 的運算節點。

格式為 `[raid raid-name]`。*raid-name* 必須以字母開頭，包含不超過 30 個字元，且僅包含字母、數字、連字號 (-) 和底線 (\$1)。

```
[raid rs]
shared_dir = raid
raid_type = 1
num_of_raid_volumes = 2
encrypted = true
```

**Topics**
+ [`shared_dir`](#raid-shared-dir)
+ [`ebs_kms_key_id`](#raid-ebs_kms_key_id)
+ [`encrypted`](#raid-encrypted)
+ [`num_of_raid_volumes`](#num-of-raid-volumes)
+ [`raid_type`](#raid-type)
+ [`volume_iops`](#raid-volume-iops)
+ [`volume_size`](#raid-volume-size)
+ [`volume_throughput`](#raid-volume-throughput)
+ [`volume_type`](#raid-volume-type)

## `shared_dir`
<a name="raid-shared-dir"></a>

**（必要）** 定義前端和運算節點上 RAID 陣列的掛載點。

只在指定此參數時，才會建立 RAID 磁碟機。

請勿使用 `NONE`或 `/NONE`做為共用目錄。

以下範例會在 `/raid` 掛載陣列。

```
shared_dir = raid
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `ebs_kms_key_id`
<a name="raid-ebs_kms_key_id"></a>

**（選用）** 指定用於加密的自訂 AWS KMS 金鑰。

此參數必須與 `encrypted = true` 搭配使用，而且它必須具有自訂 [`ec2_iam_role`](cluster-definition.md#ec2-iam-role)。

如需詳細資訊，請參閱[使用自訂 KMS 金鑰進行磁碟加密](tutorials_04_encrypted_kms_fs.md)。

```
ebs_kms_key_id = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `encrypted`
<a name="raid-encrypted"></a>

**（選用）** 指定檔案系統是否已加密。

預設值為 `false`。

```
encrypted = false
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `num_of_raid_volumes`
<a name="num-of-raid-volumes"></a>

**（選用）** 定義要從中組合 RAID 陣列的 Amazon EBS 磁碟區數量。

磁碟區數量下限為 `2`。

磁碟區數量上限為 `5`。

預設值為 `2`。

```
num_of_raid_volumes = 2
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `raid_type`
<a name="raid-type"></a>

**（必要）** 定義 RAID 陣列的 RAID 類型。

只在指定此參數時，才會建立 RAID 磁碟機。

有效選項為下列值：
+ `0`
+ `1`

如需 RAID 類型的詳細資訊，請參閱《*Amazon EC2 使用者指南*》中的 [RAID 資訊](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/raid-config.html)。

以下範例會建立 RAID `0` 陣列：

```
raid_type = 0
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `volume_iops`
<a name="raid-volume-iops"></a>

**（選用）** 定義 `io1`、 `io2`和`gp3`類型磁碟區的 IOPS 數量。

預設值、支援的值和`volume_iops``volume_size`比率因 [`volume_type`](#raid-volume-type)和 而異[`volume_size`](#raid-volume-size)。

`volume_type` = `io1`  
預設值 `volume_iops` = 100  
支援的值 `volume_iops` = 100–64000 †  
最大`volume_iops``volume_size`比率 = 每 GiB 50 IOPS。5000 IOPS 需要至少 100 GiB `volume_size`的 。

`volume_type` = `io2`  
預設值 `volume_iops` = 100  
支援的值 `volume_iops` = 100–64000 (`io2`區塊快速磁碟區為 256000) †  
最大`volume_iops``volume_size`比率 = 每 GiB 500 IOPS。5000 IOPS 需要至少 10 GiB `volume_size`的 。

`volume_type` = `gp3`  
預設值 `volume_iops` = 3000  
支援的值 `volume_iops` = 3000–16000  
最大`volume_iops``volume_size`比率 = 每 GiB 500 IOPS。5000 IOPS 需要至少 10 GiB `volume_size`的 。

```
volume_iops = 3000
```

[更新政策：此設定可以在更新期間變更。](using-pcluster-update.md#update-policy-setting-supported)

† 只有建置在[佈建超過 32，000 IOPS 的 Nitro 系統上的執行個體](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances)，才能保證 IOPS 上限。其他執行個體保證高達 32，000 IOPS。除非您修改`io1`磁碟區，否則較舊的磁碟區可能無法達到完整效能。 [https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modify-volume.html](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modify-volume.html) `io2`Block Express 磁碟區支援高達 256000 `volume_iops`的值。如需詳細資訊，請參閱《*Amazon EC2 使用者指南*》中的 [`io2` Block Express 磁碟區 （預覽中）](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volume-types.html#io2-block-express)。

## `volume_size`
<a name="raid-volume-size"></a>

**（選用）** 以 GiB 定義要建立的磁碟區大小。

預設值和支援的值因 而異[`volume_type`](#raid-volume-type)。

`volume_type` = `standard`  
預設 `volume_size` = 20 GiB  
支援的值 `volume_size` = 1–1024 GiB

`volume_type` = `gp2`、`io2`、 `io1`和 `gp3`  
預設 `volume_size` = 20 GiB  
支援的值 `volume_size` = 1–16384 GiB

`volume_type` = `sc1`和 `st1`  
預設 `volume_size` = 500 GiB  
支援的值 `volume_size` = 500–16384 GiB

```
volume_size = 20
```

**注意**  
在 2.10.1 AWS ParallelCluster 版之前，所有磁碟區的預設值為 20 GiB。

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `volume_throughput`
<a name="raid-volume-throughput"></a>

**（選用）** 以 MiB/s 為單位定義`gp3`磁碟區類型的輸送量。

預設值為 `125`。

支援的值 `volume_throughput` = 125–1000 MiB/s

`volume_throughput` 與 的比率`volume_iops`不可超過 0.25。1000 MiB/s 的最大輸送量要求`volume_iops`設定至少為 4000。

```
volume_throughput = 1000
```

**注意**  
`volume_throughput` 2.10.1 AWS ParallelCluster 版已新增 的支援。

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `volume_type`
<a name="raid-volume-type"></a>

**（選用）** 定義要建置的磁碟區類型。

有效選項為下列值：

`gp2`, `gp3`  
一般用途 SSD

`io1`, `io2`  
Provisioned IOPS SSD

`st1`  
輸送量最佳化 HDD

`sc1`  
Cold HDD

`standard`  
上一代磁性

如需詳細資訊，請參閱《Amazon EC2 使用者指南》中的 [Amazon EBS 磁碟區類型](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html)。

預設值為 `gp2`。

```
volume_type = io2
```

**注意**  
2.10.1 AWS ParallelCluster 版已`io2`新增 `gp3`和 的支援。

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

# `[scaling]` 區段
<a name="scaling-section"></a>

**Topics**
+ [`scaledown_idletime`](#scaledown-idletime)

指定會定義運算節點擴展方式的設定。

格式為 `[scaling scaling-name]`。*caling-name* 必須以字母開頭，包含不超過 30 個字元，且僅包含字母、數字、連字號 (-) 和底線 (\$1)。

```
[scaling custom]
scaledown_idletime = 10
```

## `scaledown_idletime`
<a name="scaledown-idletime"></a>

**（選用）** 指定沒有任務的分鐘數，之後運算節點會終止。

如果 `awsbatch`是排程器，則不會使用此參數。

預設值為 `10`。

```
scaledown_idletime = 10
```

[更新政策：必須停止運算機群，才能變更此設定以進行更新。](using-pcluster-update.md#update-policy-compute-fleet)

# `[vpc]` 區段
<a name="vpc-section"></a>

指定 Amazon VPC 組態設定。如需 VPCs的詳細資訊，請參閱《[Amazon VPC 使用者指南》中的什麼是 Amazon VPC？](https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html)以及 [VPC 的安全最佳實務](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-security-best-practices.html)。 **

格式為 `[vpc vpc-name]`。*vpc-name* 必須以字母開頭，包含不超過 30 個字元，且僅包含字母、數字、連字號 (-) 和底線 (\$1)。

```
[vpc public]
vpc_id = vpc-xxxxxx
master_subnet_id = subnet-xxxxxx
```

**Topics**
+ [`additional_sg`](#additional-sg)
+ [`compute_subnet_cidr`](#compute-subnet-cidr)
+ [`compute_subnet_id`](#compute-subnet-id)
+ [`master_subnet_id`](#master-subnet-id)
+ [`ssh_from`](#ssh-from)
+ [`use_public_ips`](#use-public-ips)
+ [`vpc_id`](#vpc-id)
+ [`vpc_security_group_id`](#vpc-security-group-id)

## `additional_sg`
<a name="additional-sg"></a>

**（選用）** 為所有執行個體提供額外的 Amazon VPC 安全群組 ID。

沒有預設值。

```
additional_sg = sg-xxxxxx
```

## `compute_subnet_cidr`
<a name="compute-subnet-cidr"></a>

**（選用）** 指定無類別網域間路由 (CIDR) 區塊。如果您想要 AWS ParallelCluster 建立運算子網路，請使用此參數。

```
compute_subnet_cidr = 10.0.100.0/24
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `compute_subnet_id`
<a name="compute-subnet-id"></a>

**（選用）** 指定要在其中佈建運算節點的現有子網路 ID。

如果未指定，則 [`compute_subnet_id`](#compute-subnet-id) 會使用 [`master_subnet_id`](#master-subnet-id) 的值。

如果子網路是私有的，則您必須設定 NAT，才能進行 Web 存取。

```
compute_subnet_id = subnet-xxxxxx
```

[更新政策：必須停止運算機群，才能變更此設定以進行更新。](using-pcluster-update.md#update-policy-compute-fleet)

## `master_subnet_id`
<a name="master-subnet-id"></a>

**（必要）** 指定要在其中佈建前端節點的現有子網路 ID。

```
master_subnet_id = subnet-xxxxxx
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `ssh_from`
<a name="ssh-from"></a>

**（選用）** 指定允許 SSH 存取的 CIDR 格式 IP 範圍。

只有在 AWS ParallelCluster 建立安全群組時，才會使用此參數。

預設值為 `0.0.0.0/0`。

```
ssh_from = 0.0.0.0/0
```

[更新政策：此設定可以在更新期間變更。](using-pcluster-update.md#update-policy-setting-supported)

## `use_public_ips`
<a name="use-public-ips"></a>

**（選用）** 定義是否要將公有 IP 地址指派給運算執行個體。

如果設定為 `true`，則彈性 IP 地址會與前端節點相關聯。

如果設定為 `false`，則根據「自動指派公有 IP」子網路組態參數的值，前端節點具有公有 IP （無論是否具有）。

如需範例，請參閱[聯網設定](networking.md)。

預設值為 `true`。

```
use_public_ips = true
```

**重要**  
根據預設，每個限制 AWS 帳戶 為五 (5) 個彈性 IP 地址 AWS 區域。如需詳細資訊，請參閱《*Amazon EC2 使用者指南*》中的[彈性 IP 地址限制](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#using-instance-addressing-limit)。

[更新政策：必須停止運算機群，才能變更此設定以進行更新。](using-pcluster-update.md#update-policy-compute-fleet)

## `vpc_id`
<a name="vpc-id"></a>

**（必要）** 指定要在其中佈建叢集的 Amazon VPC ID。

```
vpc_id = vpc-xxxxxx
```

[更新政策：如果變更此設定，則不允許更新。](using-pcluster-update.md#update-policy-fail)

## `vpc_security_group_id`
<a name="vpc-security-group-id"></a>

**（選用）** 指定對所有執行個體使用現有的安全群組。

沒有預設值。

```
vpc_security_group_id = sg-xxxxxx
```

建立的安全群組 AWS ParallelCluster 允許從[`ssh_from`](#ssh-from)設定中指定的地址使用連接埠 22 存取 SSH，如果未指定[`ssh_from`](#ssh-from)設定，則允許所有 IPv4 地址 (`0.0.0.0/0`)。如果啟用 Amazon DCV，則安全群組允許從[`access_from`](dcv-section.md#dcv-section-access-from)設定中指定的地址，使用連接埠 8443 （或任何[`port`](dcv-section.md#dcv-section-port)設定指定的） 存取 Amazon DCV，如果未指定[`access_from`](dcv-section.md#dcv-section-access-from)設定，則允許存取所有 IPv4 地址 (`0.0.0.0/0`)。

**警告**  
如果[`[cluster]`](cluster-definition.md)[`fsx_settings`](cluster-definition.md#fsx-settings)未指定 或同時為 指定外部現有 FSx for Lustre 檔案系統`fsx_settings`，您可以變更此參數的值並更新叢集[`fsx-fs-id`](fsx-section.md#fsx-fs-id)[`[fsx fs]`](fsx-section.md)。  
如果在 `fsx_settings`和 中指定 AWS ParallelCluster 受管 FSx for Lustre 檔案系統，則無法變更此參數的值`[fsx fs]`。

[更新政策：如果未在組態中指定 AWS ParallelCluster 受管 Amazon FSx for Lustre 檔案系統，則可以在更新期間變更此設定。](using-pcluster-update.md#update-policy-no-managed-fsx-lustre)

# 範例
<a name="examples"></a>

下列範例組態示範使用 Slurm、 Torque和 AWS Batch 排程器的 AWS ParallelCluster 組態。

**注意**  
從 2.11.5 版開始， AWS ParallelCluster 不支援使用 SGE或 Torque排程器。

**Contents**
+ [Slurm Workload Manager (`slurm`)](#example.slurm)
+ [Son of Grid Engine (`sge`) 和 Torque Resource Manager(`torque`)](#example.torque)
+ [AWS Batch (`awsbatch`)](#example.awsbatch)

## Slurm Workload Manager (`slurm`)
<a name="example.slurm"></a>

以下範例會啟動具 `slurm` 排程器的叢集。範例組態會啟動 1 個具有 2 個任務佇列的叢集。第一個佇列 `spot`最初有 2 個 `t3.micro` Spot 執行個體可用。它最多可擴展至 10 個執行個體，並在 10 分鐘內未執行任何任務時縮減至最少 1 個執行個體 （可使用 [`scaledown_idletime`](scaling-section.md#scaledown-idletime)設定進行調整）。第二個佇列 會從沒有執行個體開始`ondemand`，最多可擴展至 5 個隨`t3.micro`需執行個體。

```
[global]
update_check = true
sanity_check = true
cluster_template = slurm

[aws]
aws_region_name = <your AWS 區域>

[vpc public]
master_subnet_id = <your subnet>
vpc_id = <your VPC>

[cluster slurm]
key_name = <your EC2 keypair name>
base_os = alinux2                   # optional, defaults to alinux2
scheduler = slurm
master_instance_type = t3.micro     # optional, defaults to t3.micro
vpc_settings = public
queue_settings = spot,ondemand

[queue spot]
compute_resource_settings = spot_i1
compute_type = spot                 # optional, defaults to ondemand

[compute_resource spot_i1]
instance_type = t3.micro
min_count = 1                       # optional, defaults to 0
initial_count = 2                   # optional, defaults to 0

[queue ondemand]
compute_resource_settings = ondemand_i1

[compute_resource ondemand_i1]
instance_type = t3.micro
max_count = 5                       # optional, defaults to 10
```

## Son of Grid Engine (`sge`) 和 Torque Resource Manager(`torque`)
<a name="example.torque"></a>

**注意**  
此範例僅適用於 AWS ParallelCluster 2.11.4 版以前的版本。從 2.11.5 版開始， AWS ParallelCluster 不支援使用 SGE或 Torque排程器。

下列範例會使用 `torque`或 `sge`排程器啟動叢集。若要使用 SGE，請將 `scheduler = torque`變更為 `scheduler = sge`。範例組態最多允許 5 個並行節點，並在 10 分鐘內沒有任務執行時縮減至兩個節點。

```
[global]
update_check = true
sanity_check = true
cluster_template = torque

[aws]
aws_region_name = <your AWS 區域>

[vpc public]
master_subnet_id = <your subnet>
vpc_id = <your VPC>

[cluster torque]
key_name = <your EC2 keypair name>but they aren't eligible for future updates
base_os = alinux2                   # optional, defaults to alinux2
scheduler = torque                  # optional, defaults to sge
master_instance_type = t3.micro     # optional, defaults to t3.micro
vpc_settings = public
initial_queue_size = 2              # optional, defaults to 0
maintain_initial_size = true        # optional, defaults to false
max_queue_size = 5                  # optional, defaults to 10
```

**注意**  
從 2.11.5 版開始， AWS ParallelCluster 不支援使用 SGE或 Torque排程器。如果您使用這些版本，您可以繼續使用，或對 AWS 服務和 AWS 支援團隊的支援進行故障診斷。

## AWS Batch (`awsbatch`)
<a name="example.awsbatch"></a>

以下範例會啟動具 `awsbatch` 排程器的叢集。它設定為根據您的任務資源需求選取更好的執行個體類型。

範例組態最多允許 40 個並行 vCPUs，並在 10 分鐘內沒有任務執行時縮減至零 （可使用 [`scaledown_idletime`](scaling-section.md#scaledown-idletime)設定調整）。

```
[global]
update_check = true
sanity_check = true
cluster_template = awsbatch

[aws]
aws_region_name = <your AWS 區域>

[vpc public]
master_subnet_id = <your subnet>
vpc_id = <your VPC>

[cluster awsbatch]
scheduler = awsbatch
compute_instance_type = optimal # optional, defaults to optimal
min_vcpus = 0                   # optional, defaults to 0
desired_vcpus = 0               # optional, defaults to 4
max_vcpus = 40                  # optional, defaults to 20
base_os = alinux2               # optional, defaults to alinux2, controls the base_os of
                                # the head node and the docker image for the compute fleet
key_name = <your EC2 keypair name>
vpc_settings = public
```