Hướng dẫn toàn diện: AWS File Storage & Khái niệm nền tảng
EFS, FSx, Storage Gateway, NFS, SMB, NTFS, Active Directory — giải thích toàn diện
Tổng quan 3 loại Storage
Trước khi đi vào file storage, cần hiểu AWS có 3 loại storage hoàn toàn khác nhau:
Ví dụ dễ hiểu:
| Loại | Ví dụ đời thực | AWS Service |
|---|---|---|
| Block Storage | Ổ cứng gắn trong máy tính — chỉ máy đó dùng | EBS, Instance Store |
| File Storage | Folder share trên mạng nội bộ — nhiều máy cùng truy cập | EFS, FSx |
| Object Storage | Google Drive/Dropbox — upload/download qua internet | S3, Glacier |
EBS thuộc Block Storage — hoàn toàn khác loại so với EFS, FSx. EBS là "ổ cứng ảo" gắn vào 1 EC2 instance, bạn tự format thành NTFS (Windows) hoặc ext4 (Linux).
Khái niệm nền tảng
NFS vs SMB — Hai giao thức chia sẻ file
Khi muốn nhiều máy tính cùng truy cập 1 folder trên server, cần một giao thức mạng (network protocol) để giao tiếp — giống như 2 người nói chuyện cần chung 1 ngôn ngữ.
| NFS (Network File System) | SMB (Server Message Block) | |
|---|---|---|
| Xuất xứ | Thế giới Unix/Linux | Thế giới Windows |
| Dùng cho | Linux servers, containers | Windows desktops, AD environments |
| Ví dụ | Web server cluster share code | Văn phòng Windows share \\server\shared |
| Xác thực | IP-based, Kerberos | Active Directory, username/password |
| Mount kiểu | mount -t nfs server:/share /mnt | Map network drive Z:\ hoặc \\server\share |
| AWS Service | EFS, S3 File Gateway | FSx for Windows, FSx File Gateway |
Quy tắc nhớ:
- NFS = Linux/Unix (nghĩ đến EC2 Linux, containers, HPC)
- SMB = Windows (nghĩ đến Active Directory, Windows desktops, Windows apps)
NTFS — File System của Windows
NTFS (New Technology File System) là hệ thống file mặc định của Windows — cách ổ cứng tổ chức và lưu trữ dữ liệu.
NTFS hỗ trợ:
- File-level permissions: ai được đọc, ghi, xóa file nào (kết hợp với AD)
- Disk quotas: giới hạn dung lượng cho từng user
- Encryption: mã hóa file/folder (EFS — Encrypting File System, khác với Amazon EFS)
- Journaling: khôi phục dữ liệu khi mất điện đột ngột
NTFS vs SMB — Khác tầng, khác việc
Hai cái này hay bị nhầm vì luôn đi cùng nhau trong Windows, nhưng ở 2 tầng hoàn toàn khác nhau:
Ví dụ chi tiết trên Windows Server:
So sánh trực tiếp:
| NTFS | SMB | |
|---|---|---|
| Là gì | File System (hệ thống tập tin) | Network Protocol (giao thức mạng) |
| Làm gì | Tổ chức data trên ổ đĩa | Truyền data qua mạng |
| Hoạt động ở đâu | Trên chính cái máy đó | Giữa 2+ máy qua network |
| Tương đương Linux | ext4, XFS | NFS |
| Không có thì sao | Không lưu được file lên ổ đĩa | Lưu được, nhưng chỉ máy đó dùng |
Cách chúng phối hợp khi mở file qua mạng:
Active Directory (AD)
Active Directory là hệ thống quản lý users và quyền truy cập của Microsoft, dùng phổ biến trong doanh nghiệp.
AD làm gì?
- Đăng nhập 1 lần (Single Sign-On): login 1 account → truy cập email, file share, printer, ứng dụng nội bộ
- Phân quyền theo group: Developer vào folder code, HR vào folder nhân sự
- Quản lý tập trung: IT admin thêm/xóa user, đặt policy từ 1 chỗ
Tại sao liên quan đến FSx for Windows?
FSx for Windows File Server tích hợp AD nên khi migrate lên AWS, nhân viên login y như cũ, quyền truy cập giữ nguyên. EFS không có tính năng này.
Windows Ecosystem: AD + SMB + NTFS
Ba thứ này luôn đi cùng nhau:
Amazon EFS — NAS cho Linux trên Cloud
| Đặc điểm | Chi tiết |
|---|---|
| Protocol | NFS (v4.0, v4.1) |
| Client | Linux EC2, ECS, EKS, Lambda |
| Windows | KHÔNG hỗ trợ (không có SMB) |
| Scaling | Tự động scale — dung lượng tăng/giảm theo file thực tế |
| Availability | Multi-AZ — data replicate across AZs |
| Max throughput | ~10 GB/s |
| Use cases | Web serving, content management, shared config, container storage |
Khi nào chọn EFS? → Cần shared file storage cho Linux workloads, không cần Windows/AD.
FSx for Windows File Server — Windows file server trên Cloud
| Đặc điểm | Chi tiết |
|---|---|
| Protocol | SMB (2.0, 2.1, 3.0, 3.1.1) |
| File System | NTFS |
| Client | Windows, Linux, macOS (qua SMB) — thiết kế cho Windows ecosystem |
| Active Directory | Tích hợp AD — quản lý users/permissions |
| Features | NTFS permissions, DFS (Distributed File System), quotas, deduplication |
| Deployment | Single-AZ hoặc Multi-AZ |
| Max throughput | 12-20 GB/s |
| Use cases | Windows file shares, .NET apps, SQL Server, SharePoint, Home directories |
Khi nào chọn? → Câu hỏi nhắc đến: Active Directory, SMB, Windows file shares, NTFS, DFS, Windows-based applications.
FSx for Lustre — Siêu xe cho tính toán nặng
| Đặc điểm | Chi tiết |
|---|---|
| Protocol | Lustre (POSIX-compliant, custom protocol tối ưu hiệu năng) |
| Client | CHỈ Linux |
| Throughput | Lên đến 1000 GB/s, hàng triệu IOPS |
| S3 Integration | Tự động import/export data từ S3 bucket |
| Deployment | Chỉ Single-AZ (Persistent hoặc Scratch) |
| Latency | Sub-millisecond |
| Use cases | HPC, Machine Learning training, video processing, financial modeling, genomics |
So sánh EFS vs FSx for Lustre:
| EFS | FSx for Lustre | |
|---|---|---|
| Throughput max | ~10 GB/s | 1000 GB/s |
| S3 integration | Không có native | Tự động link S3 bucket |
| AZ | Multi-AZ | Single-AZ only |
| Use case | General-purpose shared files | HPC, ML, big data processing |
| Multi-AZ SLA | 99.99% | 99.5% (single-AZ) |
Keywords trong thi: "high performance", "compute-intensive", "machine learning training data", "HPC cluster", "process large datasets from S3".
AWS Storage Gateway — Cầu nối On-premises và AWS
Storage Gateway là dịch vụ hybrid — đặt tại on-premises, giúp app cũ truy cập AWS storage mà không cần thay đổi code.
4 loại Gateway
| Loại | Backend AWS | Protocol | Use case |
|---|---|---|---|
| S3 File Gateway | S3 | NFS, SMB | File → Object storage, backup, data lake |
| FSx File Gateway | FSx for Windows | SMB | Cache local cho FSx Windows shares |
| Volume Gateway | S3 + EBS snapshots | iSCSI | Block storage hybrid |
| Tape Gateway | S3 + Glacier | iSCSI/VTL | Thay thế tape backup vật lý |
S3 File Gateway — phổ biến nhất:
FSx File Gateway — cho Windows multi-region:
Keywords trong thi: "on-premises", "hybrid", "local cache", "migrate to cloud without changing applications".
FSx for NetApp ONTAP và OpenZFS
Ngoài Windows và Lustre, FSx còn 2 loại nữa thỉnh thoảng xuất hiện trong thi:
FSx for NetApp ONTAP
| Đặc điểm | Chi tiết |
|---|---|
| Protocol | NFS + SMB + iSCSI (cả 3!) |
| Đặc biệt | Multi-protocol, tự động tiering (hot/cold), data dedup, SnapMirror |
| Use case | Migrate NAS appliances lên AWS, cần cả NFS lẫn SMB cùng lúc |
Keyword: "multi-protocol", "NFS and SMB simultaneously", "NAS migration", "iSCSI"
FSx for OpenZFS
| Đặc điểm | Chi tiết |
|---|---|
| Protocol | NFS |
| Đặc biệt | Snapshots, cloning, compression, latency <0.5ms |
| Use case | Migrate Linux ZFS file servers, dev/test environments |
Keyword: "ZFS", "Linux file server migration", "snapshots and cloning"
Bảng so sánh tổng hợp
Protocol và Compatibility
| Dịch vụ | File System | Protocol | Client OS | AD Support |
|---|---|---|---|---|
| EFS | NFS-managed | NFS v4 | Linux only | Không |
| FSx Windows | NTFS | SMB | Windows, Linux, macOS | Có |
| FSx Lustre | Lustre | Lustre (POSIX) | Linux only | Không |
| FSx NetApp ONTAP | WAFL | NFS + SMB + iSCSI | Tất cả | Có |
| FSx OpenZFS | ZFS | NFS | Windows, Linux, macOS | Không |
| EBS | Tự format | N/A (block) | Gắn 1 EC2 | N/A |
Performance
| Dịch vụ | Max Throughput | Max IOPS | Latency |
|---|---|---|---|
| EFS | ~10 GB/s | Hàng trăm nghìn | <1ms |
| FSx Windows | 12-20 GB/s | Hàng trăm nghìn | <1ms |
| FSx Lustre | 1000 GB/s | Hàng triệu | <1ms |
| FSx NetApp ONTAP | 72-80 GB/s | Hàng triệu | <1ms |
| FSx OpenZFS | 10-21 GB/s | 1-2 triệu | <0.5ms |
Availability
| Dịch vụ | Deployment | SLA |
|---|---|---|
| EFS | Multi-AZ (mặc định) | 99.99% |
| FSx Windows | Single-AZ hoặc Multi-AZ | Multi-AZ: 99.99%, Single-AZ: 99.5% |
| FSx Lustre | Single-AZ (Persistent/Scratch) | 99.5% |
| FSx NetApp ONTAP | Single-AZ hoặc Multi-AZ | Multi-AZ: 99.99%, Single-AZ: 99.9% |
| FSx OpenZFS | Single-AZ hoặc Multi-AZ | Multi-AZ: 99.99%, Single-AZ: 99.5% |
Bản đồ toàn cảnh AWS File Storage
Diagram dưới đây gom tất cả các chiều quan trọng vào 1 bức tranh duy nhất: client/use case → protocol → service → đặc tính chính, kèm lớp hybrid và bối cảnh rộng hơn (Block vs File vs Object).
Quick decision tree — chọn service nào?
Lưu ý thuật ngữ — NAS (Network Attached Storage): thiết bị/server chuyên dụng chứa file và chia sẻ qua mạng cho nhiều máy cùng truy cập (NFS/SMB). Hãng NAS phổ biến: NetApp, Dell EMC, Synology, QNAP. Trong AWS: EFS (NAS cho Linux), FSx for Windows (NAS cho Windows), FSx for NetApp ONTAP (thay thế trực tiếp NAS appliance on-premises).
Bức tranh toàn cảnh: 5 nhóm Storage trong AWS
File storage không đứng một mình — nó nằm trong hệ sinh thái rộng hơn gồm 5 nhóm dịch vụ. Hiểu toàn cảnh giúp tránh nhầm lẫn giữa các service.
Tóm tắt nhanh:
| Nhóm | Câu hỏi trả lời | Services chính |
|---|---|---|
| Core Storage | "Lưu ở đâu?" | EBS, EFS, FSx (4 loại), S3, Glacier |
| Hybrid | "On-prem kết nối AWS thế nào?" | Storage Gateway (4 loại) |
| Data Transfer | "Di chuyển data vào/ra AWS bằng gì?" | Transfer Family, DataSync, Snow Family, S3 Transfer Acceleration |
| Access & Delivery | "Truy cập data nhanh/an toàn thế nào?" | CloudFront, S3 Access Points, VPC Endpoints, Direct Connect |
| Management | "Bảo vệ & tối ưu data thế nào?" | AWS Backup, S3 Lifecycle, S3 Replication, Storage Lens |
Lưu ý: AWS Transfer Family (SFTP/FTPS/FTP/AS2) là cổng upload — nó không lưu trữ data mà chuyển file từ bên ngoài vào S3 hoặc EFS. Đừng nhầm với File Storage.
Cheat Sheet cho thi
Keyword → Chọn dịch vụ nào
| Keyword trong đề | → Chọn |
|---|---|
| Linux shared file, NFS, containers | EFS |
| Windows, SMB, Active Directory, NTFS, DFS | FSx for Windows |
| HPC, ML, high throughput, S3 integration, compute-intensive | FSx for Lustre |
| On-premises ↔ Cloud, hybrid, local cache, no app changes | Storage Gateway |
| NAS migration, multi-protocol (NFS + SMB + iSCSI) | FSx for NetApp ONTAP |
| ZFS, Linux file server migration | FSx for OpenZFS |
| Ổ cứng gắn 1 EC2, block storage, boot volume | EBS |
| SFTP, FTPS, FTP, AS2, managed file transfer | AWS Transfer Family |
| Sync data on-prem ↔ AWS nhanh, scheduled transfer | AWS DataSync |
| Petabytes, physical transfer, offline migration | Snow Family |
| Upload S3 nhanh từ xa, global users upload | S3 Transfer Acceleration |
Mẹo phân biệt nhanh khi làm bài
- Thấy "Active Directory" + "file share" → FSx for Windows (EFS không có AD)
- Thấy "NFS" + "Linux" + "shared" → EFS
- Thấy "HPC" hoặc "machine learning" + "file system" → FSx for Lustre
- Thấy "on-premises" cần access cloud storage → Storage Gateway
- Thấy "S3 File Gateway" → on-prem app truy cập S3 qua NFS/SMB (data lưu thành objects trong S3)
- Thấy "FSx File Gateway" → on-prem cần local cache cho FSx Windows shares
- Thấy "NFS and SMB" cùng lúc → FSx for NetApp ONTAP
- Thấy "DFS" (Distributed File System) → FSx for Windows
- Thấy "Lustre" + "S3" → FSx for Lustre (tự động sync data với S3)
- Thấy "tape backup" + "cloud" → Storage Gateway (Tape Gateway)
Các cạm bẫy thường gặp
| Cạm bẫy | Sai | Đúng |
|---|---|---|
| "Linux cần shared file" → chọn FSx Windows | FSx Windows | EFS |
| "Windows cần shared file" → chọn EFS | EFS | FSx for Windows |
| "HPC cần high throughput" → chọn EFS | EFS | FSx for Lustre |
| "On-prem cần access S3" → chọn EFS/FSx | EFS/FSx | S3 File Gateway |
| "Cần NFS + SMB cùng lúc" → chọn EFS | EFS | FSx NetApp ONTAP |
Tài liệu tham khảo
- Choosing an Amazon FSx File System — So sánh chi tiết 4 loại FSx
- AWS Storage Gateway - File Gateway — S3 File Gateway vs FSx File Gateway
- Replatforming File Shares — Hướng dẫn migrate file shares lên AWS
- AWS Storage Services Overview (Whitepaper) — Tổng quan tất cả storage services
Tài liệu liên quan trong repo
- Amazon EFS — Chi tiết về EFS
- Amazon FSx — Chi tiết 4 loại FSx
- AWS Storage Gateway — Chi tiết 4 loại Gateway
- AWS Storage Deep Dive — So sánh tất cả loại storage
- AWS Transfer Family — SFTP/FTPS/FTP/AS2 managed file transfer
- AWS DataSync — Sync data on-prem ↔ AWS
- Snow Family — Physical data transfer
- S3 Transfer Acceleration — Upload S3 nhanh qua Edge
- EBS — Block Storage chi tiết