

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

# 刪除檔案系統
<a name="delete-file-system"></a>

您可以使用 Amazon FSx 主控台 AWS CLI、 和 Amazon FSx API 刪除 Amazon FSx for Lustre 檔案系統。刪除 FSx for Lustre 檔案系統之前，您應該從每個連接的 Amazon EC2 執行個體[卸載](unmounting-fs.md)它。在 S3-linked的檔案系統上，為了確保在刪除檔案系統之前將所有資料寫回 S3，您可以監控 [AgeOfOldestQueuedMessage](fs-metrics.md#auto-import-export-metrics) 指標是否為零 （如果使用自動匯出），也可以執行[匯出資料儲存庫任務](export-data-repo-task-dra.md)。如果您已啟用自動匯出，並想要使用匯出資料儲存庫任務，您必須在執行匯出資料儲存庫任務之前停用自動匯出。

從每個 Amazon EC2 執行個體卸載後刪除檔案系統：
+ **使用 主控台** – 遵循中所述的程序[步驟 5：清除 資源](getting-started.md#getting-started-step4)。
+ **使用 API 或 CLI** – 使用 [DeleteFileSystem](https://docs.aws.amazon.com/fsx/latest/APIReference/API_DeleteFileSystem.html) API 操作或 [delete-file-system](https://docs.aws.amazon.com/cli/latest/reference/fsx/delete-file-system.html) CLI 命令。