

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

# 取代叢集中的節點
<a name="replacement"></a>

若要取代節點，您必須先訂購替換。您可以從 主控台、 AWS CLI或其中一個 AWS SDKs 訂購替換節點。如果您是從主控台訂購替換節點，則可以針對任何尚未取消或完成的任務訂購替換節點。然後，您將運作狀態不佳的節點與叢集取消關聯、將替換節點連接至您的網路，並解鎖叢集，包括替換節點、將替換節點與叢集建立關聯，以及在 Snowball Edge 服務上重新啟動 Amazon S3 相容儲存。

**從主控台訂購替換節點**

1. 登入 [AWS Snow 系列管理主控台](https://console.aws.amazon.com/snowfamily/home)。

1. 針對屬於您已從任務儀表板建立之叢集的節點，尋找並選擇一個任務。

1. 針對 **Actions (動作)**，選擇 **Replace node (取代節點)**。

   這樣做會開啟任務建立精靈的最後一個步驟，而所有設定與原先建立叢集的方式相同。

1. 選擇**建立作業**。

您的替代 Snowball Edge 現在已準備就緒。使用下列程序從叢集中移除運作狀態不佳的節點。

**從叢集移除節點**

1. 關閉要移除的節點。如需詳細資訊，請參閱[關閉 Snowball Edge](https://docs.aws.amazon.com/snowball/latest/developer-guide/turnitoff.html)。

1. 使用 `describe-cluster`命令來確保無法連線運作狀態不佳的節點。這由 `NetworkReachability` 物件`UNREACHABLE``State`名稱的 值表示。

   ```
   snowballEdge describe-cluster --manifest-file path/to/manifest/file.bin --unlock-code unlock-code --endpoint https://ip-address-of-device-in-cluster                
   ```  
**Example `describe-cluster` 輸出的**  

   ```
   {
       "ClusterId": "CID12345678-1234-1234-1234-123456789012",
       "Devices": [
           {
               "DeviceId": "JID12345678-1234-1234-1234-123456789012",
               "UnlockStatus": {
                   "State": "UNLOCKED"
               },
               "ActiveNetworkInterface": {
                   "IpAddress": "10.0.0.0"
               },
               "ClusterAssociation": {
                   "ClusterId": "CID12345678-1234-1234-1234-123456789012",
                   "State": "ASSOCIATED"
               },
               "NetworkReachability": {
                   "State": "REACHABLE"
               },
               "Tags": []
           },
           {
               "DeviceId": "JID12345678-1234-1234-1234-123456789013",
               "UnlockStatus": {
                   "State": "UNLOCKED"
               },
               "ActiveNetworkInterface": {
                   "IpAddress": "10.0.0.1"
               },
               "ClusterAssociation": {
                   "ClusterId": "CID12345678-1234-1234-1234-123456789012",
                   "State": "ASSOCIATED"
               },
               "NetworkReachability": {
                   "State": "REACHABLE"
               },
               "Tags": []
           },
           {
               "DeviceId": "JID12345678-1234-1234-1234-123456789014",
               "ClusterAssociation": {
                   "ClusterId": "CID12345678-1234-1234-1234-123456789012",
                   "State": "ASSOCIATED"
               },
               "NetworkReachability": {
                   "State": "UNREACHABLE"
               }
           }
       ]
   }
   ```

1. 使用 `describe-service`命令來確保`s3-snow`服務的狀態為 `DEGRADED`。

   ```
   snowballEdge describe-service --service-id s3-snow --device-ip-addresses snow-device-1-address snow-device-2-address --manifest-file path/to/manifest/file.bin --unlock-code unlock-code --endpoint https://snow-device-ip-address        
   ```  
**Example `describe-service` 命令的輸出**  

   ```
   {
       "ServiceId": "s3-snow",
       "Autostart": true,
       "Status": {
           "State": "DEGRADED"
       },
       "ServiceCapacities": [
           {
               "Name": "S3 Storage",
               "Unit": "Byte",
               "Used": 38768180432,
               "Available": 82961231819568
           }
       ],
       "Endpoints": [
           {
               "Protocol": "https",
               "Port": 443,
               "Host": "10.0.0.10",
               "CertificateAssociation": {
                   "CertificateArn": "arn:aws:snowball-device:::certificate/7Rg2lP9tQaHnW4sC6xUzF1vGyD3jB5kN8MwEiYpT"
               },
               "Description" : "s3-snow bucket API endpoint (for s3control SDK)",
               "DeviceId": "JID-beta-207012320001-24-02-05-17-17-26",
               "Status": {
                   "State": "ACTIVE"
               }
           },
           {
               "Protocol": "https",
               "Port": 443,
               "Host": "10.0.0.11",
               "CertificateAssociation": {
                   "CertificateArn": "arn:aws:snowball-device:::certificate/7Rg2lP9tQaHnW4sC6xUzF1vGyD3jB5kN8MwEiYpT"
               },
               "Description": "Description" : "s3-snow object & bucket API endpoint (for s3api SDK)",
               "DeviceId": "JID-beta-207012320001-24-02-05-17-17-26",
               "Status": {
                   "State": "ACTIVE"
               }
           },
           {
               "Protocol": "https",
               "Port": 443,
               "Host": "10.0.0.12",
               "CertificateAssociation": {
                   "CertificateArn": "arn:aws:snowball-device:::certificate/7Rg2lP9tQaHnW4sC6xUzF1vGyD3jB5kN8MwEiYpT"
               },
               "Description": "Description" : "s3-snow bucket API endpoint (for s3control SDK)",
               "DeviceId": "JID-beta-207012240003-24-02-05-17-17-27",
               "Status": {
                   "State": "ACTIVE"
               }
           },
           {
               "Protocol": "https",
               "Port": 443,
               "Host": "10.0.0.13",
               "CertificateAssociation": {
                   "CertificateArn": "arn:aws:snowball-device:::certificate/7Rg2lP9tQaHnW4sC6xUzF1vGyD3jB5kN8MwEiYpT"
               },
               "Description": "Description" : "s3-snow object & bucket API endpoint (for s3api SDK)",
               "DeviceId": "JID-beta-207012320001-24-02-05-17-17-27",
               "Status": {
                   "State": "ACTIVE"
               }
           }
       ]
   }
   ```

1. 使用 `disassociate-device`命令從叢集取消關聯和移除運作狀態不佳的節點。

   ```
   snowballEdge disassociate-device --device-id device-id --manifest-file path/to/manifest/file.bin --unlock-code unlock-code --endpoint https://ip-address-of-unhealthy-device                    
   ```  
**Example `disassociate-device` 命令的輸出**  

   ```
   Disassociating your Snowball Edge device from the cluster. Your Snowball Edge device will be disassociated from the cluster when it is in the "DISASSOCIATED" state. You can use the describe-cluster command to determine the state of your cluster.                        
   ```

1. 再次使用 `describe-cluster`命令，以確保運作狀態不佳的節點與叢集取消關聯。

   ```
   snowballEdge describe-cluster --manifest-file path/to/manifest/file.bin --unlock-code unlock-code --endpoint https:ip-address-of-healthy-device                    
   ```  
**Example `describe-cluster` 命令的 命令顯示節點已取消關聯**  

   ```
   {
       "ClusterId": "CID12345678-1234-1234-1234-123456789012",
       "Devices": [
           {
               "DeviceId": "JID12345678-1234-1234-1234-123456789012",
               "UnlockStatus": {
                   "State": "UNLOCKED"
               },
               "ActiveNetworkInterface": {
                   "IpAddress": "10.0.0.0"
               },
               "ClusterAssociation": {
                   "ClusterId": "CID12345678-1234-1234-1234-123456789012",
                   "State": "ASSOCIATED"
               },
               "NetworkReachability": {
                   "State": "REACHABLE"
               },
               "Tags": []
           },
           {
               "DeviceId": "JID12345678-1234-1234-1234-123456789013",
               "UnlockStatus": {
                   "State": "UNLOCKED"
               },
               "ActiveNetworkInterface": {
                   "IpAddress": "10.0.0.1"
               },
               "ClusterAssociation": {
                   "ClusterId": "CID12345678-1234-1234-1234-123456789012",
                   "State": "ASSOCIATED"
               },
               "NetworkReachability": {
                   "State": "REACHABLE"
               },
               "Tags": []
           },
           {
               "DeviceId": "JID12345678-1234-1234-1234-123456789014",
               "ClusterAssociation": {
                   "ClusterId": "CID12345678-1234-1234-1234-123456789012",
                   "State": "DISASSOCIATED"
               }
           }
       ]
   }
   ```

1. 關閉並傳回運作狀態不佳的裝置 AWS。如需詳細資訊，請參閱[關閉 Snowball Edge](https://docs.aws.amazon.com/snowball/latest/developer-guide/turnitoff.html) 和[傳回 Snowball Edge 裝置](https://docs.aws.amazon.com/snowball/latest/developer-guide/return-device.html)。

當替代裝置送達時，請使用下列程序將其新增至叢集。

**新增替代裝置**

1. 放置叢集的替換裝置，以便您可以存取所有裝置的正面、背面和頂部。

1. 開啟節點電源，並確保節點連接到與叢集其他部分相同的內部網路。如需詳細資訊，請參閱[連線至本機網路](https://docs.aws.amazon.com/snowball/latest/developer-guide/getting-started-connect.html)。

1. 使用 `unlock-cluster`命令並包含新節點的 IP 地址。

   ```
   snowballEdge unlock-cluster --manifest-file path/to/manifest/file.bin --unlock-code unlock-code --endpoint https://ip-address-of-cluster-device --device-ip-addresses node-1-ip-address node-2-ip-address new-node-ip-address    
   ```

   新節點的狀態會是 ，`DEGRADED`直到您在下一個步驟中將其與叢集建立關聯為止。

1. 使用 `associate-device`命令將取代節點與叢集建立關聯。

   ```
   snowballEdge associate-device --device-ip-address new-node-ip-address
   ```  
**Example `associate-device` 命令輸出的**  

   ```
   Associating your Snowball Edge device with the cluster. Your Snowball Edge device will be associated with the cluster when it is in the ASSOCIATED state. You can use the describe-device command to determine the state of your devices.                        
   ```

1. 使用 `describe-cluster`命令來確保新節點與叢集相關聯。

   ```
   snowballEdge describe-cluster --manifest-file path/to/manifest/file.bin --unlock-code unlock-code --endpoint https://node-ip-address                    
   ```  
**Example `describe-cluster` 命令輸出的**  

   ```
   {
       "ClusterId": "CID12345678-1234-1234-1234-123456789012",
       "Devices": [
           {
               "DeviceId": "JID12345678-1234-1234-1234-123456789012",
               "UnlockStatus": {
                   "State": "UNLOCKED"
               },
               "ActiveNetworkInterface": {
                   "IpAddress": "10.0.0.0"
               },
               "ClusterAssociation": {
                   "ClusterId": "CID12345678-1234-1234-1234-123456789012",
                   "State": "ASSOCIATED"
               },
               "NetworkReachability": {
                   "State": "REACHABLE"
               },
               "Tags": []
           },
           {
               "DeviceId": "JID-CID12345678-1234-1234-1234-123456789013",
               "UnlockStatus": {
                   "State": "UNLOCKED"
               },
               "ActiveNetworkInterface": {
                   "IpAddress": "10.0.0.1"
               },
               "ClusterAssociation": {
                   "ClusterId": "CID12345678-1234-1234-1234-123456789012",
                   "State": "ASSOCIATED"
               },
               "NetworkReachability": {
                   "State": "REACHABLE"
               },
               "Tags": []
           },
           {
               "DeviceId": "JID-CID12345678-1234-1234-1234-123456789015",
               "UnlockStatus": {
                   "State": "UNLOCKED"
               },
               "ActiveNetworkInterface": {
                   "IpAddress": "10.0.0.2"
               },
               "ClusterAssociation": {
                   "ClusterId": "CID12345678-1234-1234-1234-123456789012",
                   "State": "ASSOCIATED"
               },
               "NetworkReachability": {
                   "State": "REACHABLE"
               },
               "Tags": []
           }
       }
   ]
   }
   ```

1. 在新節點上，建立兩個虛擬網路介面 VNIs)。如需詳細資訊，請參閱[在 Snowball Edge 服務上啟動 Amazon S3 相容儲存](s3-edge-snow-setting-up.md#setting-up-s3-on-snow-cluster)

1. 使用 `stop-service`命令來停止 s3-snow 服務。

   ```
   snowballEdge stop-service --service-id s3-snow --device-ip-addresses cluster-device-1-ip-address cluster-device-2-ip-address cluster-device-3-ip-address --manifest-file path/to/manifest/file.bin --unlock-code unlock-code --endpoint https://snow-device-ip-address                    
   ```  
**Example `stop-service` 命令輸出的**  

   ```
   Stopping the AWS service on your Snowball Edge. You can determine the status of the AWS service using the describe-service command.                                            
   ```

1. 將新節點新增至叢集後，請使用 `start-service`命令啟動 s3-snow 服務。

   ```
   snowballEdge start-service --service-id s3-snow --device-ip-addresses cluster-device-1-ip-address cluster-device-2-ip-address cluster-device-3-ip-address --virtual-network-interface-arns "device-1-vni-ip-address-a" "device-1-vni-ip-address-b" "device-2-vni-ip-address-a" "device-2-vni-ip-address-b" "device-3-vni-ip-address-a" "device-3-vni-ip-address-b" --manifest-file path/to/manifest/file.bin --unlock-code unlock-code --endpoint https://snow-device-ip-address                    
   ```  
**Example `start-service` 命令輸出的**  

   ```
   Starting the AWS service on your Snowball Edge. You can determine the status of the AWS service using the describe-service command.                        
   ```

1. 使用 `describe-service`命令來確保 s3-snow 服務已啟動。

   ```
   snowballEdge describe-service --service-id s3-snow --device-ip-addresses snow-device-1-address snow-device-2-address snow-device-3-address --manifest-file path/to/manifest/file.bin --unlock-code unlock-code --endpoint https://snow-device-ip-address             
   ```  
**Example `descibe-service` 命令輸出的**  

   ```
   {
       "ServiceId": "s3-snow",
       "Autostart": true,
       "Status": {
           "State": "ACTIVE"
       },
       "ServiceCapacities": [{
           "Name": "S3 Storage",
           "Unit": "Byte",
           "Used": 38768180432,
           "Available": 82961231819568
       }],
       "Endpoints": [{
               "Protocol": "https",
               "Port": 443,
               "Host": "10.0.0.10",
               "CertificateAssociation": {
                   "CertificateArn": "arn:aws:snowball-device:::certificate/7Rg2lP9tQaHnW4sC6xUzF1vGyD3jB5kN8MwEiYpT"
               },
               "Description": "s3-snow bucket API endpoint (for s3control SDK)",
               "DeviceId": "JID12345678-1234-1234-1234-123456789012",
               "Status": {
                   "State": "ACTIVE"
               }
           }, {
               "Protocol": "https",
               "Port": 443,
               "Host": "10.0.0.11",
               "CertificateAssociation": {
                   "CertificateArn": "arn:aws:snowball-device:::certificate/7Rg2lP9tQaHnW4sC6xUzF1vGyD3jB5kN8MwEiYpT"
               },
               "Description": "s3-snow object & bucket API endpoint (for s3api SDK)",
               "DeviceId": "JID12345678-1234-1234-1234-123456789013",
               "Status": {
                   "State": "ACTIVE"
               }
           }, {
               "Protocol": "https",
               "Port": 443,
               "Host": "10.0.0.12",
               "CertificateAssociation": {
                   "CertificateArn": "arn:aws:snowball-device:::certificate/7Rg2lP9tQaHnW4sC6xUzF1vGyD3jB5kN8MwEiYpT"
               },
               "Description": "s3-snow bucket API endpoint (for s3control SDK)",
               "DeviceId": "JID12345678-1234-1234-1234-123456789015",
               "Status": {
                   "State": "ACTIVE"
               }
           }, {
               "Protocol": "https",
               "Port": 443,
               "Host": "10.0.0.13",
               "CertificateAssociation": {
                   "CertificateArn": "arn:aws:snowball-device:::certificate/7Rg2lP9tQaHnW4sC6xUzF1vGyD3jB5kN8MwEiYpT"
               },
               "Description": "s3-snow object & bucket API endpoint (for s3api SDK)",
               "DeviceId": "JID-beta-207012320001-24-02-05-17-17-27",
               "Status": {
                   "State": "ACTIVE"
               }
           }, {
               "Protocol": "https",
               "Port": 443,
               "Host": "10.0.0.14",
               "CertificateAssociation": {
                   "CertificateArn": "arn:aws:snowball-device:::certificate/7Rg2lP9tQaHnW4sC6xUzF1vGyD3jB5kN8MwEiYpT"
               },
               "Description": "s3-snow bucket API endpoint (for s3control SDK)",
               "DeviceId": "JID-beta-207012240003-24-02-05-17-17-28",
               "Status": {
                   "State": "ACTIVE"
               }
           }, {
               "Protocol": "https",
               "Port": 443,
               "Host": "10.0.0.15",
               "CertificateAssociation": {
                   "CertificateArn": "arn:aws:snowball-device:::certificate/7Rg2lP9tQaHnW4sC6xUzF1vGyD3jB5kN8MwEiYpT"
               },
               "Description": "s3-snow object & bucket API endpoint (for s3api SDK),
               "DeviceId": "JID-beta-207012320001-24-02-05-17-17-28",
               "Status": {
                   "State": "ACTIVE"
               }
           }
       }]
   }
   ```