

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

# 在 AWS 大型遷移中遷移共用檔案系統
<a name="migrate-shared-file-systems-in-an-aws-large-migration"></a>

*Amit Rudraraju、Sam Apa、Bheemeswararao Balla、Wally Lu 和 Sanjeev Prakasam、Amazon Web Services*

## 總結
<a name="migrate-shared-file-systems-in-an-aws-large-migration-summary"></a>

遷移 300 個以上的伺服器會被視為*大型遷移*。大型遷移的目的是將工作負載從現有的現場部署資料中心遷移到 AWS 雲端，這些專案通常專注於應用程式和資料庫工作負載。不過，共用檔案系統需要集中注意力和單獨的遷移計畫。此模式說明共用檔案系統的遷移程序，並提供在大型遷移專案中成功遷移它們的最佳實務。

*共用檔案系統* (SFS) 也稱為*網路*或*叢集*檔案系統，是掛載到多個伺服器的檔案共用。共用檔案系統可透過網路檔案系統 (NFS)、通用網際網路檔案系統 (CIFS) 或伺服器訊息區塊 (SMB) 等通訊協定存取。

這些系統不會使用標準遷移工具進行遷移，例如， AWS Application Migration Service 因為它們既不專用於要遷移的主機，也不表示為區塊型設備。雖然大多數主機相依性都是透明遷移的，但相依檔案系統的協調和管理必須分別處理。

您會在下列階段遷移共用檔案系統：探索、規劃、準備、切換和驗證。使用此模式和連接的手冊，您可以將共用檔案系統遷移至 AWS 儲存服務，例如 Amazon Elastic File System (Amazon EFS)、Amazon FSx for NetApp ONTAP 或 Amazon FSx for Windows File Server。若要傳輸檔案系統，您可以使用 AWS DataSync 或第三方工具，例如 NetApp SnapMirror。

**注意**  
此模式是有關[大型遷移到 AWS 雲端](https://aws.amazon.com/prescriptive-guidance/large-migrations/) AWS 的規範性指引系列的一部分。此模式包含將 SFSs 整合到伺服器的波浪計劃的最佳實務和指示。如果您要在大型遷移專案之外遷移一或多個共用檔案系統，請參閱 [Amazon EFS](https://docs.aws.amazon.com/efs/latest/ug/trnsfr-data-using-datasync.html)、[Amazon FSx for Windows File Server](https://docs.aws.amazon.com/fsx/latest/WindowsGuide/migrate-to-fsx.html) 和 [Amazon FSx for NetApp ONTAP](https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/migrating-fsx-ontap.html) AWS 文件中的資料傳輸說明。

## 先決條件和限制
<a name="migrate-shared-file-systems-in-an-aws-large-migration-prereqs"></a>

**先決條件**

先決條件可能會根據您的來源和目標共用檔案系統和您的使用案例而有所不同。以下是最常見的：
+ 作用中 AWS 帳戶。
+ 您已完成大型遷移專案的應用程式產品組合探索，並開始開發波動計畫。如需詳細資訊，請參閱[AWS 大型遷移的產品組合手冊](https://docs.aws.amazon.com/prescriptive-guidance/latest/large-migration-portfolio-playbook/welcome.html)。
+ 虛擬私有雲端 (VPCs) 和安全群組，允許內部部署資料中心與您的 AWS 環境之間的輸入和輸出流量。如需詳細資訊，請參閱[網路對 Amazon VPC 連線選項](https://docs.aws.amazon.com/whitepapers/latest/aws-vpc-connectivity-options/network-to-amazon-vpc-connectivity-options.html)和[AWS DataSync 網路需求](https://docs.aws.amazon.com/datasync/latest/userguide/datasync-network.html)。
+ 建立 AWS CloudFormation 堆疊的許可或建立 Amazon EFS 或 Amazon FSx 資源的許可。如需詳細資訊，請參閱 [CloudFormation 文件](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html)、[Amazon EFS 文件](https://docs.aws.amazon.com/efs/latest/ug/security-iam.html)或 [Amazon FSx 文件](https://docs.aws.amazon.com/fsx/latest/WindowsGuide/security-iam.html)。
+ 如果您使用 AWS DataSync 執行遷移，則需要下列許可：
  +  AWS DataSync 將日誌傳送至 Amazon CloudWatch Logs 日誌群組的許可。如需詳細資訊，請參閱[允許 DataSync 將日誌上傳至 CloudWatch 日誌群組](https://docs.aws.amazon.com/datasync/latest/userguide/monitor-datasync.html#cloudwatchlogs)。
  + 存取 CloudWatch Logs 日誌群組的許可。如需詳細資訊，請參閱[管理 CloudWatch Logs 資源存取許可的概觀](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html)。
  + 在 DataSync 中建立客服人員和任務的許可。如需詳細資訊，請參閱[使用 所需的 IAM 許可 AWS DataSync](https://docs.aws.amazon.com/datasync/latest/userguide/permissions-requirements.html)。

**限制**
+ 此模式旨在將 SFSs 遷移為大型遷移專案的一部分。它包含將 SFSs 併入您遷移應用程式的波浪計劃的最佳實務和說明。如果您要在大型遷移專案之外遷移一或多個共用檔案系統，請參閱 [Amazon EFS](https://docs.aws.amazon.com/efs/latest/ug/trnsfr-data-using-datasync.html)、[Amazon FSx for Windows File Server](https://docs.aws.amazon.com/fsx/latest/WindowsGuide/migrate-to-fsx.html) 和 [Amazon FSx for NetApp ONTAP](https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/migrating-fsx-ontap.html) AWS 文件中的資料傳輸說明。
+ 此模式是以常用的架構、服務和遷移模式為基礎。不過，大型遷移專案和策略可能因組織而異。您可能需要根據您的需求自訂此解決方案或提供的手冊。

## Architecture
<a name="migrate-shared-file-systems-in-an-aws-large-migration-architecture"></a>

**來源技術堆疊**

下列一個或多個：
+ Linux (NFS) 檔案伺服器
+ Windows (SMB) 檔案伺服器
+ NetApp 儲存陣列
+ Dell EMC Isilon 儲存陣列

**目標技術堆疊**

下列一個或多個：
+ Amazon Elastic File System
+ Amazon FSx for NetApp ONTAP
+ Amazon FSx for Windows File Server

**目標架構**

![\[使用 AWS DataSync 將內部部署共用檔案系統遷移至 AWS 的架構圖。\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/images/pattern-img/a30cf791-7a8a-4f71-8927-bc61f3b332f2/images/13232433-7d33-44c8-8998-b720f33f67b3.png)


圖表顯示下列程序：

1. 您可以使用 AWS Direct Connect 或 AWS 服務 等 AWS 雲端 ，在現場部署資料中心與 之間建立連線 AWS Site-to-Site VPN。

1. 您可以在內部部署資料中心安裝 DataSync 代理程式。

1. 根據您的波動計畫，您可以使用 DataSync 將來源共用檔案系統的資料複寫至目標 AWS 檔案共用。

**遷移階段**

下圖顯示在大型遷移專案中遷移 SFS 的階段和高階步驟。

![\[探索、規劃、準備、切換和驗證將共用檔案系統遷移至 AWS 的階段。\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/images/pattern-img/a30cf791-7a8a-4f71-8927-bc61f3b332f2/images/f1e0c94d-0eea-46a8-bdec-3297b34c1d43.png)


此模式的 [Epics](#migrate-shared-file-systems-in-an-aws-large-migration-epics) 區段包含有關如何完成遷移和使用連接工作手冊的詳細說明。以下是此分階段方法中步驟的高階概觀。


| 
| 
| 階段 | 步驟 | 
| --- |--- |
| 探索 | 1. 使用探索工具，您可以收集共用檔案系統的資料，包括伺服器、掛載點和 IP 地址。2. 使用組態管理資料庫 (CMDB) 或遷移工具，您可以收集伺服器的詳細資訊，包括遷移波動、環境、應用程式擁有者、IT 服務管理 (ITSM) 服務名稱、組織單位和應用程式 ID 的相關資訊。 | 
| 計畫 | 3. 使用 SFSs和伺服器所收集的資訊，建立 SFS 波動計畫。4. 使用建置工作表中的資訊，為每個 SFS 選擇目標 AWS 服務 和遷移工具。 | 
| 準備 | 5. 在 Amazon EFS、Amazon FSx for NetApp ONTAP 或 Amazon FSx for Windows File Server 中設定目標基礎設施。6. 設定資料傳輸服務，例如 DataSync，然後啟動初始資料同步。當初始同步完成時，您可以設定重複發生的同步以排程執行，7. 使用目標檔案共享的相關資訊更新 SFS 波動計畫，例如 IP 地址或路徑。 | 
| 剪下 | 8. 停止主動存取來源 SFS 的應用程式。9. 在資料傳輸服務中，執行最終資料同步。10. 同步完成時，請檢閱 CloudWatch Logs 中的日誌資料，以驗證是否完全成功。 | 
| 驗證 | 11. 在伺服器上，將掛載點變更為新的 SFS 路徑。12. 重新啟動並驗證應用程式。 | 

## 工具
<a name="migrate-shared-file-systems-in-an-aws-large-migration-tools"></a>

**AWS 服務**
+ [Amazon CloudWatch Logs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html) 可協助您集中所有系統、應用程式的日誌， AWS 服務 以便您可以監控日誌並將其安全地存檔。
+ [AWS DataSync](https://docs.aws.amazon.com/datasync/latest/userguide/what-is-datasync.html) 是一種線上資料傳輸和探索服務，可協助您在 AWS 儲存服務之間來回移動檔案或物件資料。
+ [Amazon Elastic File System (Amazon EFS)](https://docs.aws.amazon.com/efs/latest/ug/whatisefs.html) 協助您在 AWS 雲端中建立和設定共用檔案系統。
+ [Amazon FSx](https://docs.aws.amazon.com/fsx/?id=docs_gateway) 提供檔案系統，可支援業界標準的連線通訊協定，並提供高可用性和跨系統複寫 AWS 區域。

**其他工具**
+ [SnapMirror](https://library.netapp.com/ecmdocs/ECMP1196991/html/GUID-BA1081BE-B2BB-4C6E-8A82-FB0F87AC514E.html) 是一種 NetApp 資料複寫工具，可將資料分別從指定的來源磁碟區或[樹狀目錄](https://library.netapp.com/ecmdocs/ECMP1154894/html/GUID-8F084F85-2AB8-4622-B4F3-2D9E68559292.html)複寫到目標磁碟區或樹狀目錄。您可以使用此工具將 NetApp 來源檔案系統遷移至 Amazon FSx for NetApp ONTAP。
+ [Robocopy](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy) 短於*強式檔案複製*，是 Windows 的命令列目錄和命令。您可以使用此工具將 Windows 來源檔案系統遷移至 Amazon FSx for Windows File Server。

## 最佳實務
<a name="migrate-shared-file-systems-in-an-aws-large-migration-best-practices"></a>

**波規劃方法**

為您的大型遷移專案規劃波浪時，請考慮延遲和應用程式效能。當 SFS 和相依應用程式在不同位置操作時，例如一個在雲端，另一個在內部部署資料中心，這可能會增加延遲並影響應用程式效能。以下是建立波動計畫時的可用選項：

1. **在同一波內遷移 SFS 和所有相依伺服器** – 此方法可防止效能問題，並將重做降至最低，例如多次重新設定掛載點。當應用程式和 SFS 之間需要非常低的延遲時，建議使用此選項。不過，波動規劃很複雜，目標是從相依性分組中移除變數，而不是新增到它們。此外，如果許多伺服器存取相同的 SFS，則不建議使用此方法，因為它會使波動過大。

1. **在遷移最後一個相依伺服器之後遷移 SFS **– 例如，如果多個伺服器存取 SFS，且這些伺服器排程在波 4、6 和 7 中遷移，請排程 SFS 在波 7 中遷移。

   這種方法通常是大型遷移最符合邏輯的方法，建議用於對延遲敏感的應用程式。它可降低與資料傳輸相關的成本。它也可以將 SFS 和更高層級 （例如生產） 應用程式之間的延遲期間降至最低，因為在開發和 QA 應用程式之後，更高層級的應用程式通常會排程為最後遷移。

   不過，這種方法仍然需要探索、規劃和敏捷性。您可能需要在較早的波動中遷移 SFS。確認應用程式可以在第一個相依波與包含 SFS 的波之間的時間內承受額外的延遲。與應用程式擁有者進行探索工作階段，並將應用程式遷移至對延遲最敏感的應用程式。如果在遷移相依應用程式後發現效能問題，請準備好盡快進行樞紐，以盡快遷移 SFS。

1. **在大型遷移專案結束時遷移 SFS **– 如果延遲不是一個因素，例如當 SFS 中的資料不常存取或不對應用程式效能至關重要時，建議使用此方法。此方法可簡化遷移，並簡化切換任務。

您可以根據應用程式的延遲敏感度來混合這些方法。例如，您可以使用方法 1 或 2 遷移對延遲敏感SFSs，然後使用方法 3 遷移其餘SFSs。

**選擇 AWS 檔案系統服務**

AWS 為檔案儲存提供數種雲端服務。每個 都為效能、擴展、可存取性、整合、合規和成本最佳化提供不同的優點和限制。有一些邏輯預設選項。例如，如果您目前的現場部署檔案系統正在操作 Windows Server，則 Amazon FSx for Windows File Server 是預設選項。或者，如果內部部署檔案系統正在操作 NetApp ONTAP，則 Amazon FSx for NetApp ONTAP 是預設選項。不過，您可以根據您的應用程式需求或實現其他雲端操作優勢，選擇目標服務。如需詳細資訊，請參閱[為您的部署選擇正確的 AWS 檔案儲存服務](https://d1.awsstatic.com/events/Summits/awsnycsummit/Choosing_the_right_AWS_file_storage_service_for_your_deployment_STG302.pdf)AWS (Summit presentation)。

**選擇遷移工具**

Amazon EFS 和 Amazon FSx 支援使用 AWS DataSync 將共用檔案系統遷移至 AWS 雲端。如需支援的儲存系統和服務、優點和使用案例的詳細資訊，請參閱[什麼是 AWS DataSync](https://docs.aws.amazon.com/datasync/latest/userguide/what-is-datasync.html) 。如需使用 DataSync 傳輸檔案的程序概觀，請參閱[AWS DataSync 傳輸的運作方式](https://docs.aws.amazon.com/datasync/latest/userguide/how-datasync-transfer-works.html)。

也有數種可用的第三方工具，包括下列項目：
+ 如果您選擇 Amazon FSx for NetApp ONTAP，您可以使用 NetApp SnapMirror 將檔案從內部部署資料中心遷移至雲端。SnapMirror 使用區塊層級複寫，可以比 DataSync 更快，並減少資料傳輸程序的持續時間。如需詳細資訊，請參閱[使用 NetApp SnapMirror 遷移至 FSx for ONTAP](https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/migrating-fsx-ontap-snapmirror.html)。
+ 如果您選擇 Amazon FSx for Windows File Server，您可以使用 Robocopy 將檔案遷移至雲端。如需詳細資訊，請參閱[使用 Robocopy 將現有檔案遷移至 FSx for Windows File Server](https://docs.aws.amazon.com/fsx/latest/WindowsGuide/migrate-files-to-fsx.html)。

## 史詩
<a name="migrate-shared-file-systems-in-an-aws-large-migration-epics"></a>

### 探索
<a name="discover"></a>


| 任務 | Description | 所需的技能 | 
| --- | --- | --- | 
| 準備 SFS 探索工作手冊。 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/migrate-shared-file-systems-in-an-aws-large-migration.html) | 遷移工程師，遷移負責人 | 
| 收集來源 SFS 的相關資訊。 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/migrate-shared-file-systems-in-an-aws-large-migration.html) | 遷移工程師，遷移負責人 | 
| 收集伺服器的相關資訊。 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/migrate-shared-file-systems-in-an-aws-large-migration.html) | 遷移工程師，遷移負責人 | 

### 計畫
<a name="plan"></a>


| 任務 | Description | 所需的技能 | 
| --- | --- | --- | 
| 建置 SFS 波動計畫。 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/migrate-shared-file-systems-in-an-aws-large-migration.html) | 組建領導、Cutover 領導、遷移工程師、遷移領導 | 
| 選擇目標 AWS 服務 和遷移工具。 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/migrate-shared-file-systems-in-an-aws-large-migration.html) | 遷移工程師，遷移負責人 | 

### 準備
<a name="prepare"></a>


| 任務 | Description | 所需的技能 | 
| --- | --- | --- | 
| 設定目標檔案系統。 | 根據您的波動計畫中記錄的詳細資訊，在目標、 AWS 帳戶 VPC 和子網路中設定目標檔案系統。如需說明，請參閱下列 AWS 文件：[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/migrate-shared-file-systems-in-an-aws-large-migration.html) | 遷移工程師、遷移負責人、AWS 管理員 | 
| 設定遷移工具和傳輸資料。 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/migrate-shared-file-systems-in-an-aws-large-migration.html) | AWS 管理員、雲端管理員、遷移工程師、遷移主管 | 
| 更新波動計畫。 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/migrate-shared-file-systems-in-an-aws-large-migration.html) | 遷移工程師，遷移負責人 | 

### 切換
<a name="cut-over"></a>


| 任務 | Description | 所需的技能 | 
| --- | --- | --- | 
| 停止應用程式。 | 如果應用程式或用戶端正在來源 SFS 中主動執行讀取和寫入操作，請在執行最終資料同步之前停止它們。如需說明，請參閱應用程式文件或停止讀取和寫入活動的內部程序。例如，請參閱[啟動或停止 Web 伺服器 (IIS 8)](https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/jj635851(v=ws.11)) (Microsoft 文件） 或使用 [systemctl 管理系統服務](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_basic_system_settings/managing-systemd_configuring-basic-system-settings#managing-system-services-with-systemctl_managing-systemd) (Red Hat 文件）。 | 應用程式擁有者、應用程式開發人員 | 
| 執行最終資料傳輸。 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/migrate-shared-file-systems-in-an-aws-large-migration.html) | 遷移工程師，遷移負責人 | 
| 驗證資料傳輸。 | 如果您使用的是 AWS DataSync，請執行下列動作來驗證已成功完成的最終資料傳輸：[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/migrate-shared-file-systems-in-an-aws-large-migration.html)如果您使用第三方工具，請參閱所選遷移工具文件中的資料傳輸驗證說明。 | 遷移工程師，遷移負責人 | 

### 驗證
<a name="validate"></a>


| 任務 | Description | 所需的技能 | 
| --- | --- | --- | 
| 重新掛載檔案系統並驗證應用程式函數和效能。 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/migrate-shared-file-systems-in-an-aws-large-migration.html) | AWS 系統管理員、應用程式擁有者 | 

## 疑難排解
<a name="migrate-shared-file-systems-in-an-aws-large-migration-troubleshooting"></a>


| 問題 | 解決方案 | 
| --- | --- | 
| Microsoft Excel 中的儲存格值不會更新。 | 拖曳填充控點，複製範例資料列中的公式。如需詳細資訊，請參閱 [Windows ](https://support.microsoft.com/en-us/office/fill-a-formula-down-into-adjacent-cells-041edfe2-05bc-40e6-b933-ef48c3f308c6)或 [Mac](https://support.microsoft.com/en-au/office/copy-a-formula-by-dragging-the-fill-handle-in-excel-for-mac-dd928259-622b-473f-9a33-83aa1a63e218) 的說明 (Microsoft Support 網站）。 | 

## 相關資源
<a name="migrate-shared-file-systems-in-an-aws-large-migration-resources"></a>

**AWS 文件**
+ [AWS DataSync 文件](https://docs.aws.amazon.com/datasync/latest/userguide/what-is-datasync.html)
+ [Amazon EFS 文件](https://docs.aws.amazon.com/efs/latest/ug/whatisefs.html)
+ [Amazon FSx 文件](https://docs.aws.amazon.com/fsx/latest/WindowsGuide/index.html)
+ [大型遷移至 AWS 雲端](https://aws.amazon.com/prescriptive-guidance/large-migrations/)
  + [AWS 大型遷移指南](https://docs.aws.amazon.com/prescriptive-guidance/latest/large-migration-guide/welcome.html)
  + [AWS 大型遷移的產品組合手冊](https://docs.aws.amazon.com/prescriptive-guidance/latest/large-migration-portfolio-playbook/welcome.html)

**疑難排解**
+ [故障診斷 AWS DataSync 問題](https://docs.aws.amazon.com/datasync/latest/userguide/troubleshooting-datasync.html)
+ [Amazon EFS 故障診斷](https://docs.aws.amazon.com/efs/latest/ug/troubleshooting.html)
+ [Amazon FSx for Windows File Server 故障診斷](https://docs.aws.amazon.com/fsx/latest/WindowsGuide/troubleshooting.html)
+ [對 Amazon FSx for NetApp ONTAP 進行故障診斷](https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/troubleshooting.html)

## 附件
<a name="attachments-a30cf791-7a8a-4f71-8927-bc61f3b332f2"></a>

若要存取與本文件相關聯的其他內容，請解壓縮下列檔案： [attachment.zip](samples/p-attach/a30cf791-7a8a-4f71-8927-bc61f3b332f2/attachments/attachment.zip)