0Pricing
AWS Solutions Architect · 课时

FSx:Windows 文件服务器与 Lustre

使用 FSx for Windows 运行完全托管的 Windows 原生 SMB 文件系统,或使用 FSx for Lustre 承载高性能计算工作负载

FSx:Windows 文件服务器与 Lustre 是 CoddyKit 上的免费 AWS Solutions Architect 课时。 这是第 4 节课,共 4 节。 你可以在下方免费阅读本课时的完整内容 — 然后在浏览器中使用内置代码编辑器和全天候 AI 导师进行实践。 这是 AWS Solutions Architect 学习路径的一部分,你的进度在网页和 CoddyKit 应用中同步。 AWS Solutions Architect 课程共包含 4 节课。

什么是 Amazon FSx?

Amazon FSx 是 AWS 上一系列完全托管的文件系统,基于业界标准技术构建。EFS 为 Linux 提供 POSIX NFS 文件系统,而 FSx 则为需要原生协议支持或专用性能特征的特定工作负载提供专用文件系统。FSx 有四种类型:FSx for Windows File Server(SMB)、FSx for Lustre(HPC)、FSx for NetApp ONTAP 和 FSx for OpenZFS。SAA-C03 考试主要考查 Windows 和 Lustre。

FSx for Windows File Server:概述

Amazon FSx for Windows File Server 是基于 Windows Server 构建的完全托管、原生 Windows SMB 文件系统。它支持所有 Windows 特有功能:SMB 协议(2.0–3.1.1 版本)、Active Directory 集成、分布式文件系统(DFS)命名空间、Windows ACL、NTFS、用户配额和卷影副本。它是本地 Windows 文件服务器在 AWS 上的原生替代方案,专为需要 SMB 访问的 Windows 应用程序设计,包括 Microsoft SharePoint、SQL Server、主目录和自定义 Windows .NET 应用程序。

# Create an FSx for Windows file system joined to an AD domain
aws fsx create-file-system \
  --file-system-type WINDOWS \
  --storage-capacity 2000 \
  --storage-type SSD \
  --subnet-ids subnet-aaa111 subnet-bbb222 \
  --windows-configuration '{
    "ActiveDirectoryId": "d-1234567890",
    "ThroughputCapacity": 256,
    "DeploymentType": "MULTI_AZ_1",
    "AutomaticBackupRetentionDays": 7
  }'

Active Directory 集成

FSx for Windows 可与 AWS Managed Microsoft Active Directory 或您自行管理的 AD(本地环境或 EC2 上)集成。所有用户都使用其 AD 凭证进行身份验证,您可以使用 Windows ACL 管理文件权限——这与本地 Windows 文件服务器完全相同。因此,对于 Windows 文件共享而言,FSx for Windows 是最直接的迁移方案。连接到自行管理的 AD 时,FSx 要求通过 Direct Connect 或 VPN 与域控制器建立网络连接。

# Join FSx to a self-managed (on-premises) AD via Direct Connect
# aws fsx create-file-system with windows configuration:
# "SelfManagedActiveDirectoryConfiguration": {
#   "DomainName": "corp.example.com",
#   "OrganizationalUnitDistinguishedName": "OU=FSx,DC=corp,DC=example,DC=com",
#   "FileSystemAdministratorsGroup": "FSxAdmins",
#   "UserName": "svc-fsx@corp.example.com",
#   "Password": "...",
#   "DnsIps": ["10.0.0.10", "10.0.0.11"]
# }

FSx for Windows:部署类型

FSx for Windows 有两种部署类型:Single-AZ(一个 AZ 中的一台文件服务器——99.9% 可用性 SLA,成本较低)和 Multi-AZ(将数据同步复制到第二个 AZ 中的备用文件服务器,并在故障时自动切换——99.99% 可用性 SLA)。Multi-AZ 需要位于不同 AZ 中的两个子网,并使用浮动 IP;发生故障切换时,该 IP 会自动迁移到备用服务器。对于需要 HA 的生产 Windows 工作负载,请始终选择 Multi-AZ。Single-AZ 适合开发和测试环境。

# Compare availability SLAs:
# Single-AZ 1 or 2: 99.9% SLA
# Multi-AZ 1: 99.99% SLA (synchronous standby, auto-failover)

# Access the FSx share from a Windows instance using UNC path:
# \\fs-0abc1234def567890.corp.example.com\share

# Or map a drive using PowerShell:
# New-SmbMapping -LocalPath 'Z:' -RemotePath '\\amznfsxabcd1234.corp.example.com\share'

FSx for Windows:备份和卷影副本

FSx for Windows 支持自动每日备份(保留 0–90 天)和存储在 S3 中的按需手动备份。备份采用增量方式,并且应用程序状态一致,因为 FSx 使用 VSS(卷影复制服务)。卷影副本提供文件的先前版本访问权限——最终用户可以在 Windows 资源管理器中右键单击文件并恢复先前版本,无需联系 IT。卷影副本存储在文件系统本身中,与 FSx 备份彼此独立。

# Create an on-demand backup of an FSx Windows file system
aws fsx create-backup \
  --file-system-id fs-0abc1234def567890 \
  --tags Key=Purpose,Value=PreUpgradeBackup

# Configure shadow copy schedule via FSx console or PowerShell:
# $schedule = '{ "CopyFrequency": "DAILY_07_00" }'
# Set-FsxWindowsConfiguration -ShadowCopyConfiguration $schedule

# Shadow copies give end users self-service file recovery

FSx for Lustre:概述

Amazon FSx for Lustre 是基于开源 Lustre 文件系统构建的完全托管高性能并行文件系统。Lustre 是超级计算机和 HPC 集群的首选文件系统。FSx for Lustre 提供亚毫秒级延迟、数百 GB/s 吞吐量和数百万 IOPS,非常适合机器学习训练、基因组学、金融模拟、地震分析和视频渲染。它还可以原生与 Amazon S3 集成,将 S3 作为数据存储库。

# Create an FSx for Lustre file system linked to S3
aws fsx create-file-system \
  --file-system-type LUSTRE \
  --storage-capacity 1200 \
  --subnet-ids subnet-aaa111 \
  --lustre-configuration '{
    "ImportPath": "s3://my-hpc-data-bucket",
    "ExportPath": "s3://my-hpc-data-bucket/exports",
    "DeploymentType": "PERSISTENT_2",
    "PerUnitStorageThroughput": 250
  }'

FSx for Lustre:S3 集成

FSx for Lustre 可以链接到 S3 存储桶,作为数据存储库。S3 中的文件会立即显示在 Lustre 命名空间中(延迟加载——实际数据会在首次访问时复制到 Lustre)。HPC 作业完成后,您可以通过数据存储库任务将结果导出回 S3。这种模式允许您经济高效地将大型数据集存储在 S3 中,仅在计算作业期间启动 Lustre 文件系统,然后销毁 Lustre 系统——只需为计算时间付费。

# Import data from S3 to FSx Lustre on demand
aws fsx create-data-repository-task \
  --type IMPORT_METADATA_AND_DATA \
  --paths 's3://my-hpc-data-bucket/dataset/' \
  --file-system-id fs-0abc1234def567890 \
  --report '{ "Enabled": true, "Path": "s3://my-hpc-data-bucket/task-reports/", "Scope": "FAILED_FILES_ONLY"}'

# Export results back to S3 after computation
aws fsx create-data-repository-task \
  --type EXPORT_TO_REPOSITORY \
  --paths '/results/' \
  --file-system-id fs-0abc1234def567890

FSx for Lustre:部署类型

FSx for Lustre 主要有两种部署类型:Scratch(临时、不复制、单位价格吞吐量最高——适用于短时间运行的批处理作业;由于所有数据都来自 S3,因此可以接受数据丢失)和 Persistent(在 AZ 内复制,专为需要弹性的长期运行 HPC 工作负载设计)。Persistent 2 是当前一代版本,提供 125、250 或 500 MB/s/TiB 的 PerUnitStorageThroughput。对于 SAA-C03 考试:Scratch = 注重成本的临时作业,Persistent = 长期运行或敏感数据。

# Scratch file system (no replication, cheaper, for temporary jobs)
aws fsx create-file-system \
  --file-system-type LUSTRE \
  --storage-capacity 1200 \
  --subnet-ids subnet-aaa111 \
  --lustre-configuration '{
    "DeploymentType": "SCRATCH_2",
    "ImportPath": "s3://my-data-bucket"
  }'

# Scratch 2 specs:
# 200 MB/s per TiB baseline
# 6x burst (data not replicated within AZ)

在 Linux 上挂载 FSx for Lustre

FSx for Lustre 使用 Lustre 客户端挂载到 Linux 实例上。Amazon Linux 2 和 Amazon Linux 2023 都包含 Lustre 内核模块。创建挂载目标并配置安全组以允许 Lustre 协议流量(端口 988 和端口范围 1018–1023)后,使用 lustre 文件系统类型进行挂载。挂载点提供完整的 POSIX 语义。对于 ML 训练,请在所有训练实例上挂载该文件系统——所有实例都能看到同一个数据集,无需复制数据。

# Install Lustre client on Amazon Linux 2
sudo amazon-linux-extras install -y lustre

# Mount the FSx for Lustre file system
sudo mkdir /mnt/fsx
sudo mount -t lustre \
  -o relatime,flock \
  fs-0abc1234def567890.fsx.us-east-1.amazonaws.com@tcp:/fsx \
  /mnt/fsx

# Verify mount and check throughput
df -h /mnt/fsx
lsattr /mnt/fsx

FSx for NetApp ONTAP 和 OpenZFS

FSx for NetApp ONTAP 提供多协议访问(NFS、SMB 和 iSCSI),以及包括精简配置、数据去重、压缩和 SnapMirror 复制在内的高级 ONTAP 功能,非常适合在不重新设计架构的情况下将 NetApp 存储迁移到 AWS。FSx for OpenZFS 提供可通过 NFS 访问的存储,以及 ZFS 内置的数据完整性检查、压缩和快照功能。两者都支持 Linux 和 Windows 客户端。对于 SAA-C03 考试,当场景提到“现有 NetApp 存储”或“多协议文件访问”时,应选择 ONTAP。

在 EFS、FSx for Windows 和 FSx for Lustre 之间进行选择

关键选择标准:EFS——Linux/POSIX NFS、弹性容量、多实例共享以及 Lambda 支持。FSx for Windows——需要 SMB、Active Directory 集成、Windows ACL 和 NTFS 的 Windows 客户端;对于需要原生 Windows 文件服务器功能的 Windows 应用程序,这是唯一的选择。FSx for Lustre——适用于 HPC、ML 训练、基因组学和视频渲染;当您需要数百 GB/s 吞吐量和数百万 IOPS,并需要与 S3 集成时,应选择它。SAA-C03 考试会通过工作负载场景问题考查这些区别。

快速检查

测试您对本课 AWS 解决方案架构师(SAA-C03)相关概念的理解。

课程回顾

本课中您学习了:FSx for Windows File Server 为需要 NTFS、ACL 和卷影副本的 Windows 工作负载提供原生 SMB 及 Active Directory 集成;FSx for Lustre 通过与 S3 数据存储库直接集成,为 HPC 和 ML 训练提供数百万 IOPS 及数百 GB/s 的吞吐量;Scratch deployments 针对临时作业进行了成本优化,而 Persistent deployments 适合长时间运行且需要高恢复能力的工作负载。接下来,我们将探索使用 ElastiCache 进行缓存。

常见问题解答

「FSx:Windows 文件服务器与 Lustre」课时是免费的吗?

是的 — 「FSx:Windows 文件服务器与 Lustre」的完整文本可在网页上免费阅读。要进行交互式练习(内置代码编辑器和全天候 AI 导师)并解锁 AWS Solutions Architect 课程的其余内容,请升级到 CoddyKit PRO。 AWS Solutions Architect 课程共包含 4 节课。

「FSx:Windows 文件服务器与 Lustre」这节课中我会学到什么?

使用 FSx for Windows 运行完全托管的 Windows 原生 SMB 文件系统,或使用 FSx for Lustre 承载高性能计算工作负载 你通过在浏览器中直接运行的动手代码来练习 AWS Solutions Architect,全天候 AI 导师会在你学习这节课的过程中回答你的问题。

学习 AWS Solutions Architect 需要有经验吗?

无需任何先前经验。CoddyKit 上的 AWS Solutions Architect 课程适合初学者到高级学习者,你可以从这里开始或从头开始,按照自己的节奏学习。 这是第 4 节课,共 4 节。

「FSx:Windows 文件服务器与 Lustre」课时需要多长时间?

大多数 CoddyKit 课程大约需要 5–10 分钟。每节课都很精短且互动,所以你能稳步进步,并在网页和应用中从离开的地方继续。

我能在这节 AWS Solutions Architect 课中编写并运行代码吗?

能。每节 AWS Solutions Architect 课都包含内置代码编辑器,你可以在浏览器中直接编写并运行真实代码,并获得即时 AI 反馈 — 无需本地设置。

此课程中的所有课时

  1. EBS 卷类型:gp3、io2、st1、sc1
  2. EBS 快照、加密与 RAID
  3. EFS:Linux 共享文件存储
  4. FSx:Windows 文件服务器与 Lustre
← 返回 AWS Solutions Architect