Guide · Amazon FSx for NetApp ONTAP · Multi-Protocol Storage
Amazon FSx for NetApp ONTAP with MCP Servers — Multi-Protocol Storage and SnapMirror Replication
Amazon FSx for NetApp ONTAP runs the full NetApp ONTAP storage operating system on managed AWS infrastructure, accessible simultaneously via NFS v3/v4.1, SMB v2/v3, and iSCSI. For MCP server teams, ONTAP is the right choice when you need the same data accessible from Linux containers via NFS and Windows clients via SMB, when you need cross-region disaster recovery with block-level SnapMirror replication and RPO under 15 minutes, or when you are lifting an existing on-premises ONTAP environment into AWS and need storage compatibility without application changes. ONTAP's storage tiering automatically moves cold blocks to a capacity pool backed by S3, reducing storage costs for large infrequently-accessed datasets by up to 85%. This guide covers the FSx ONTAP architecture, creating file systems and storage virtual machines, volumes, SnapMirror replication, tiering policies, and iSCSI LUNs for block storage use cases.
TL;DR
FSx for ONTAP has three layers: the file system (the ONTAP cluster, billed per SSD TiB provisioned), storage virtual machines (SVMs — isolated ONTAP tenants with their own NFS/SMB endpoints), and volumes (NFS shares or SMB shares inside an SVM). For most MCP server use cases, create one file system in MULTI_AZ_1 deployment type for HA, one SVM per environment (prod/staging), and one volume per service. Mount NFS volumes from Linux ECS tasks using mount -t nfs4 svm-endpoint:/vol-junction /mnt. Enable storage tiering (TieringPolicy: AUTO) to move cold blocks to the capacity pool ($0.025/GB-month vs $0.125/GB-month SSD) automatically. Use SnapMirror for cross-region DR — configure a replication relationship between two FSx ONTAP file systems in different regions with up to 15-minute RPO.
ONTAP architecture on FSx
Understanding the three-tier architecture is required before deploying FSx for ONTAP:
- File system — the ONTAP cluster. Consists of one (Single-AZ) or two (Multi-AZ) HA nodes. You choose the deployment type, storage capacity (SSD tier, minimum 1 TiB), and throughput capacity (128 MB/s to 2 GB/s). The file system has an endpoint IP for management (ONTAP System Manager, CLI, or REST API). Storage capacity here is for the SSD tier (hot data).
- Storage virtual machine (SVM) — an isolated tenant within the file system. Each SVM has its own NFS DNS name, SMB server identity (CIFS server), iSCSI target, and access control. You can have multiple SVMs per file system to separate workloads. Each SVM gets its own management endpoint and data endpoint IP(s).
- Volume — a logical dataset within an SVM. Each volume has a junction path (NFS mount point), capacity, tiering policy, and optional SnapMirror relationship. Volumes are thin-provisioned by default.
The layered model means NFS mount operations target the SVM's NFS DNS name and the volume's junction path, not the file system's DNS name directly. This is the most common source of confusion when moving from EFS or OpenZFS to ONTAP.
Creating a Multi-AZ file system
import {
FSxClient,
CreateFileSystemCommand,
DescribeFileSystemsCommand,
CreateStorageVirtualMachineCommand,
CreateVolumeCommand,
} from "@aws-sdk/client-fsx";
const fsx = new FSxClient({ region: "us-east-1" });
// 1. Create ONTAP file system (Multi-AZ for production HA)
const { FileSystem } = await fsx.send(new CreateFileSystemCommand({
FileSystemType: "ONTAP",
StorageCapacity: 2048, // GiB for SSD tier; can expand later
StorageType: "SSD",
SubnetIds: ["subnet-aaa111", "subnet-bbb222"], // two subnets in different AZs for Multi-AZ
SecurityGroupIds: ["sg-fsx-ontap"],
OntapConfiguration: {
DeploymentType: "MULTI_AZ_1", // HA across two AZs; "SINGLE_AZ_1" for cost savings
ThroughputCapacity: 512, // MB/s; options: 128, 256, 512, 1024, 2048
PreferredSubnetId: "subnet-aaa111", // primary node subnet (Multi-AZ only)
RouteTableIds: ["rtb-11111111", "rtb-22222222"], // route tables to update for floating IPs
AutomaticBackupRetentionDays: 7,
DailyAutomaticBackupStartTime: "02:00", // UTC
WeeklyMaintenanceStartTime: "7:04:00", // Sunday 04:00 UTC
// FsxAdminPassword is required for ONTAP REST API and System Manager access
FsxAdminPassword: process.env.FSX_ADMIN_PASSWORD!,
},
Tags: [{ Key: "Name", Value: "mcp-ontap-prod" }],
ClientRequestToken: "mcp-ontap-prod-v1",
}));
const fsId = FileSystem?.FileSystemId!; // fs-0abc123def456
// 2. Wait for available
async function waitForOntap(id: string): Promise<void> {
for (let i = 0; i < 60; i++) { // ONTAP Multi-AZ can take 20-45 minutes
const { FileSystems } = await fsx.send(new DescribeFileSystemsCommand({ FileSystemIds: [id] }));
if (FileSystems?.[0]?.Lifecycle === "AVAILABLE") return;
if (FileSystems?.[0]?.Lifecycle === "FAILED") throw new Error("FSx ONTAP creation failed");
await new Promise(r => setTimeout(r, 30_000)); // poll every 30s
}
throw new Error("Timed out after 30 minutes");
}
Multi-AZ ONTAP file systems typically take 20–45 minutes to become available. The RouteTableIds parameter is required for Multi-AZ — ONTAP uses floating IPs that move between nodes on failover, and the route tables must be updated when failover occurs. Provide all route tables in your VPC that need access to the file system.
Storage virtual machines and volumes
// 3. Create a storage virtual machine (SVM) for production
const { StorageVirtualMachine: svm } = await fsx.send(new CreateStorageVirtualMachineCommand({
FileSystemId: fsId,
Name: "mcp-prod-svm",
SvmAdminPassword: process.env.SVM_ADMIN_PASSWORD!, // vsadmin user password
ActiveDirectoryConfiguration: undefined, // only needed for SMB (CIFS) access
Tags: [{ Key: "Environment", Value: "production" }],
ClientRequestToken: "mcp-prod-svm-v1",
}));
const svmId = svm?.StorageVirtualMachineId!; // svm-0abc123def456
const nfsDns = svm?.Endpoints?.Nfs?.DNSName!; // svm-0abc123def456.fs-0abc.fsx.us-east-1.amazonaws.com
// 4. Create a volume for MCP server models
const { Volume: vol } = await fsx.send(new CreateVolumeCommand({
VolumeType: "ONTAP",
Name: "mcp-models",
OntapConfiguration: {
StorageVirtualMachineId: svmId,
JunctionPath: "/mcp-models", // NFS mount path under SVM root
SizeInMegabytes: 102400, // 100 GiB
StorageEfficiencyEnabled: true, // enables compression, dedup, compaction
TieringPolicy: {
Name: "AUTO", // move cold blocks to capacity pool after 31 days
CoolingPeriod: 31, // days of inactivity before tiering; 2–183
},
SecurityStyle: "UNIX", // UNIX for Linux/NFS; NTFS for Windows/SMB; MIXED for both
SnapshotPolicy: "default", // hourly/daily/weekly schedule (ONTAP built-in)
AutosizingMode: "GROW_SHRINK", // auto-resize volume as data is added/removed
OntapVolumeType: "RW", // ReadWrite (normal); DP for SnapMirror destination
},
ClientRequestToken: "mcp-models-vol-v1",
}));
Mount the volume from an EC2 instance or ECS container:
# Mount ONTAP NFS volume
mkdir -p /mnt/fsx/models
mount -t nfs4 \
-o nfsvers=4.1,rsize=1048576,wsize=1048576,timeo=600,retrans=2,_netdev \
${nfsDns}:/mcp-models \
/mnt/fsx/models
# Verify mount
df -h /mnt/fsx/models
# Filesystem Size Used Avail Use%
# svm-0abc123def456.fs-0abc.fsx.us-east-1.amazonaws.com:/mcp-models 100G 0 100G 0% /mnt/fsx/models
Storage tiering — SSD to capacity pool
FSx for ONTAP has two storage tiers:
- SSD tier — the provisioned NVMe SSD storage. Fast (<1ms latency). Billed per GB provisioned at ~$0.125/GB-month.
- Capacity pool tier — S3-backed cold storage. Slower first-access latency (10–100ms). Billed per GB used at ~$0.025/GB-month — 80% cheaper than SSD.
Tiering policies control when ONTAP moves cold blocks from SSD to capacity pool:
| Policy | Behavior | Best For |
|---|---|---|
NONE | No tiering; all data stays on SSD | High-performance, latency-sensitive workloads (database WAL, active model cache) |
SNAPSHOT_ONLY | Tier only snapshot blocks (not live data) | Volumes with large snapshots; production data stays on SSD |
AUTO | Tier blocks unused for CoolingPeriod days (default 31) | Mixed-temperature datasets; MCP model archives, historical logs |
ALL | Tier all data immediately | Archive volumes; compliance storage; disaster recovery replicas |
For a 1 TiB ONTAP volume with 20% hot data and 80% cold data under AUTO tiering:
- 204 GB on SSD: 204 × $0.125 = $25.50/month
- 820 GB in capacity pool: 820 × $0.025 = $20.50/month
- Total: $46/month vs $128/month if all data stayed on SSD (64% savings)
import { UpdateVolumeCommand } from "@aws-sdk/client-fsx";
// Change tiering policy on an existing volume
await fsx.send(new UpdateVolumeCommand({
VolumeId: vol?.VolumeId!,
OntapConfiguration: {
TieringPolicy: {
Name: "AUTO",
CoolingPeriod: 14, // tier faster — after 14 days of inactivity
},
},
ClientRequestToken: `update-tiering-${Date.now()}`,
}));
SnapMirror cross-region replication
SnapMirror is ONTAP's native replication technology. FSx for ONTAP supports SnapMirror between two FSx ONTAP file systems in different AWS regions, providing block-level asynchronous replication with configurable RPO (minimum ~1 minute, typical 15 minutes for cross-region). The destination volume is read-only until a planned failover or disaster recovery activation.
Setting up SnapMirror requires using the ONTAP REST API (not the FSx API) because replication is managed at the ONTAP layer, not the FSx control plane layer. Use the FSx ONTAP management endpoint:
// Setup: get management endpoint credentials
// The management endpoint is the IP/hostname in OntapConfiguration.Endpoints.Management.DNSName
// Credentials: admin user + FsxAdminPassword you set at creation
const MGMT_ENDPOINT = "management.fs-0abc123def456.fsx.us-east-1.amazonaws.com";
const ADMIN_PASS = process.env.FSX_ADMIN_PASSWORD!;
// Use ONTAP REST API v1 (always available on FSx ONTAP)
const baseUrl = `https://${MGMT_ENDPOINT}/api`;
const headers = {
"Content-Type": "application/json",
"Authorization": "Basic " + Buffer.from(`admin:${ADMIN_PASS}`).toString("base64"),
};
// Step 1: Create a SnapMirror relationship (source: us-east-1, dest: us-west-2)
// The destination FSx file system must already exist in us-west-2 with a DP volume
const response = await fetch(`${baseUrl}/snapmirror/relationships`, {
method: "POST",
headers,
body: JSON.stringify({
source: {
path: "mcp-prod-svm:mcp-models", // source_svm_name:source_volume_name
cluster: { name: "FSxId:fs-0abc123def456" },
},
destination: {
path: "mcp-dr-svm:mcp-models-dr", // destination SVM and DP volume in us-west-2
cluster: { name: "FSxId:fs-0def456abc789" },
},
policy: { name: "MirrorAllSnapshots" },
schedule: { name: "15min" }, // built-in ONTAP schedule; replication every 15 min
}),
});
const { uuid: mirrorUuid } = await response.json();
// Step 2: Initialize the relationship (triggers baseline transfer of all data)
await fetch(`${baseUrl}/snapmirror/relationships/${mirrorUuid}/transfers`, {
method: "POST",
headers,
body: JSON.stringify({}),
});
The baseline transfer copies all existing data to the destination. Depending on data volume and inter-region bandwidth, this can take minutes to hours. Subsequent replication transfers are incremental — only changed blocks are sent. Monitor replication lag:
// Check SnapMirror relationship health and lag
const statusResp = await fetch(`${baseUrl}/snapmirror/relationships/${mirrorUuid}`, { headers });
const status = await statusResp.json();
console.log("State:", status.state); // snapmirrored (healthy) or uninitialized
console.log("Healthy:", status.healthy); // true/false
console.log("Lag time:", status.lag_time); // e.g., "PT10M30S" (ISO 8601 duration)
console.log("Last transfer:", status.transfer?.end_time);
// Alert if lag exceeds 30 minutes (indicates replication issues)
if (status.lag_time) {
const lagMinutes = parseLagMinutes(status.lag_time);
if (lagMinutes > 30) {
console.error(`SnapMirror lag critical: ${lagMinutes} minutes`);
}
}
Failover procedure: in a DR scenario, break the SnapMirror relationship and make the destination volume writable:
// DR failover: break the SnapMirror relationship and make destination writable
// 1. Break the relationship (run on the DESTINATION file system's management endpoint)
await fetch(`${destBaseUrl}/snapmirror/relationships/${mirrorUuid}`, {
method: "PATCH",
headers: destHeaders,
body: JSON.stringify({ state: "broken_off" }),
});
// 2. Reverse the relationship direction after the original source recovers
// (use "resync" to bring the original source back as a new replica)
Dual-protocol NFS + SMB access
ONTAP is unique among FSx variants in supporting simultaneous NFS and SMB access to the same volume. This is useful when your MCP server produces output files that need to be consumed by both Linux-based containers (via NFS) and Windows-based business intelligence or reporting tools (via SMB).
For dual-protocol access, you must:
- Join the SVM to Active Directory (required for SMB/CIFS access)
- Set the volume's
SecurityStyle: MIXED(orNTFSif Windows ACLs should be authoritative) - Configure both NFS export policy and CIFS share on the volume
// Create SVM with Active Directory integration for SMB access
const { StorageVirtualMachine: svmWithAD } = await fsx.send(new CreateStorageVirtualMachineCommand({
FileSystemId: fsId,
Name: "mcp-mixed-svm",
SvmAdminPassword: process.env.SVM_ADMIN_PASSWORD!,
ActiveDirectoryConfiguration: {
NetBiosName: "MCP-SVM", // CIFS server name (max 15 chars)
SelfManagedActiveDirectoryConfiguration: {
DomainName: "corp.example.com",
OrganizationalUnitDistinguishedName: "OU=FSx,DC=corp,DC=example,DC=com",
UserName: process.env.AD_JOIN_USER!, // AD user with rights to join domain
Password: process.env.AD_JOIN_PASSWORD!,
DnsIps: ["10.0.1.10", "10.0.1.11"], // AD DNS server IPs in your VPC
FileSystemAdministratorsGroup: "Domain Admins",
},
},
ClientRequestToken: "mcp-mixed-svm-v1",
}));
// Create a MIXED-security-style volume for dual-protocol access
await fsx.send(new CreateVolumeCommand({
VolumeType: "ONTAP",
Name: "mcp-reports",
OntapConfiguration: {
StorageVirtualMachineId: svmWithAD?.StorageVirtualMachineId!,
JunctionPath: "/mcp-reports",
SizeInMegabytes: 51200, // 50 GiB
StorageEfficiencyEnabled: true,
SecurityStyle: "MIXED", // UNIX permissions when accessed via NFS; NTFS ACLs via SMB
TieringPolicy: { Name: "AUTO", CoolingPeriod: 31 },
OntapVolumeType: "RW",
},
ClientRequestToken: "mcp-reports-vol-v1",
}));
After creating the volume, use the ONTAP REST API to create the CIFS share (SMB share) on top of the NFS volume:
// Create CIFS (SMB) share using ONTAP REST API
await fetch(`${baseUrl}/protocols/cifs/shares`, {
method: "POST",
headers,
body: JSON.stringify({
name: "mcp-reports", // share name visible to Windows clients
path: "/mcp-reports", // junction path of the volume
svm: { name: "mcp-mixed-svm" },
acls: [
{ user_or_group: "Everyone", permission: "read" },
{ user_or_group: "Domain Admins", permission: "full_control" },
],
}),
});
Linux clients then mount via NFS as usual; Windows clients mount via \\svm-cifs-server\mcp-reports using their domain credentials.
iSCSI LUNs for block storage
FSx for ONTAP supports iSCSI block storage in addition to NFS and SMB. iSCSI is useful when your MCP server needs a raw block device rather than a file system — for example, to run a local SQLite or PostgreSQL database on a remotely-attached block device shared between container instances during maintenance.
// Create an iSCSI LUN via ONTAP REST API
// 1. Create an iSCSI LUN
await fetch(`${baseUrl}/storage/luns`, {
method: "POST",
headers,
body: JSON.stringify({
name: "/vol/mcp-db-lun/mcp-postgres-lun",
space: { size: 10 * 1024 * 1024 * 1024 }, // 10 GB in bytes
os_type: "linux",
svm: { name: "mcp-prod-svm" },
}),
});
// 2. Create an iGroup (initiator group) mapping the LUN to specific iSCSI initiators
await fetch(`${baseUrl}/protocols/san/igroups`, {
method: "POST",
headers,
body: JSON.stringify({
name: "mcp-server-igroup",
protocol: "iscsi",
os_type: "linux",
svm: { name: "mcp-prod-svm" },
initiators: [
{ name: "iqn.2026-11.com.example:mcp-server-01" }, // iSCSI initiator IQN from EC2 instance
],
}),
});
iSCSI over FSx ONTAP is relatively rare for MCP server use cases — most teams use NFS or EFS for shared storage, and EBS gp3 for single-instance block storage. iSCSI becomes relevant when migrating an on-premises workload that depends on a SAN or when you need ONTAP's thin provisioning and snapshot features on a block device.
Security group configuration for ONTAP
FSx for ONTAP requires ports for all enabled protocols. Configure the security group before creating the file system:
# FSx ONTAP security group: allow required ports from MCP server SG
# NFS
aws ec2 authorize-security-group-ingress --group-id sg-fsx-ontap \
--protocol tcp --port 2049 --source-group sg-mcp-server
# SMB (only if using CIFS/SMB access)
aws ec2 authorize-security-group-ingress --group-id sg-fsx-ontap \
--protocol tcp --port 445 --source-group sg-mcp-server
# iSCSI (only if using iSCSI LUNs)
aws ec2 authorize-security-group-ingress --group-id sg-fsx-ontap \
--protocol tcp --port 3260 --source-group sg-mcp-server
# Management API (HTTPS) — allow from management hosts only
aws ec2 authorize-security-group-ingress --group-id sg-fsx-ontap \
--protocol tcp --port 443 --source-group sg-mgmt-bastion
# ONTAP inter-node communication (required for Multi-AZ HA)
# Ports 11104–11105 for cluster interconnect
aws ec2 authorize-security-group-ingress --group-id sg-fsx-ontap \
--ip-permissions '[
{"IpProtocol":"tcp","FromPort":11104,"ToPort":11105,"UserIdGroupPairs":[{"GroupId":"sg-fsx-ontap"}]}
]'
Monitoring ONTAP with CloudWatch
FSx for ONTAP emits standard CloudWatch metrics for the file system level. For volume-level metrics (throughput per volume, inode usage, tiering status), use the ONTAP REST API or the FSx ONTAP built-in Prometheus endpoint:
import { CloudWatchClient, PutMetricAlarmCommand } from "@aws-sdk/client-cloudwatch";
const cw = new CloudWatchClient({ region: "us-east-1" });
// Alert when SSD storage utilization exceeds 80%
// StorageCapacity * 0.8 = threshold in bytes
const storageSsdThreshold = 2048 * 1024 * 1024 * 1024 * 0.8; // 80% of 2 TiB
await cw.send(new PutMetricAlarmCommand({
AlarmName: "fsx-ontap-ssd-80pct",
Namespace: "AWS/FSx",
MetricName: "StorageCapacityUtilization",
Dimensions: [{ Name: "FileSystemId", Value: fsId }],
Statistic: "Average",
Period: 300,
EvaluationPeriods: 3,
Threshold: 80,
ComparisonOperator: "GreaterThanOrEqualToThreshold",
AlarmActions: ["arn:aws:sns:us-east-1:123456789012:ops-alerts"],
TreatMissingData: "notBreaching",
}));
// Alert on throughput saturation (512 MB/s provisioned; alarm at 90% = 460 MB/s)
await cw.send(new PutMetricAlarmCommand({
AlarmName: "fsx-ontap-throughput-90pct",
Namespace: "AWS/FSx",
MetricName: "FileServerDiskThroughputUtilization",
Dimensions: [{ Name: "FileSystemId", Value: fsId }],
Statistic: "Average",
Period: 60,
EvaluationPeriods: 5,
Threshold: 90,
ComparisonOperator: "GreaterThanOrEqualToThreshold",
AlarmActions: ["arn:aws:sns:us-east-1:123456789012:ops-alerts"],
TreatMissingData: "notBreaching",
}));
When to choose ONTAP vs EFS or OpenZFS
FSx for ONTAP has the highest operational complexity of any FSx variant — it requires understanding SVM architecture, ONTAP REST API for advanced configuration, and Active Directory integration for SMB. The upgrade to ONTAP is justified when:
- Multi-protocol access is required (NFS + SMB to the same files)
- Cross-region DR with block-level SnapMirror and RPO <15 minutes is a business requirement
- Large cold datasets benefit from capacity pool auto-tiering at $0.025/GB-month
- Existing ONTAP investment: on-prem NetApp systems with ONTAP expertise, being lifted to AWS
- iSCSI block storage is needed alongside NFS volumes
For teams without an existing ONTAP operational background, the complexity premium is rarely worth it compared to EFS (simpler NFS) or OpenZFS (snapshots + clones without the ONTAP learning curve).
Common errors and fixes
| Error | Cause | Fix |
|---|---|---|
RouteTableIds required for MULTI_AZ_1 | Multi-AZ ONTAP needs route tables to update floating IPs during failover | Pass at least one route table ID per subnet CIDR used by clients |
| NFS mount hangs or times out | SG missing TCP 2049 inbound on FSx SG, or NFS export policy doesn't include client IP | Verify SG rules; check NFS export with ONTAP REST: GET /api/protocols/nfs/export-policies |
| SMB authentication fails | SVM not joined to AD, or DNS resolution failing for AD domain | Confirm SVM ActiveDirectoryConfiguration state is JOINED via DescribeSVMs; verify DNS IPs in SVM config resolve AD domain |
SnapMirror relationship stuck in Transferring | Network connectivity between regions; large baseline transfer; throttling | Check inter-region VPC peering or Transit Gateway routing; check SnapMirror throttle setting via ONTAP REST |
| Capacity pool tier not activating | Tiering policy set but SVM/volume missing capacity pool license or configuration | Verify file system has capacity pool configured (OntapConfiguration.DiskIopsConfiguration); check volume tiering policy via DescribeVolumes |
Volume JunctionPath conflict | Two volumes in the same SVM with the same junction path | Use unique junction paths per volume within an SVM; e.g., /mcp-models, /mcp-sessions |
Related guides
- Amazon FSx overview: choosing between Lustre, OpenZFS, ONTAP, and Windows File Server
- FSx for Lustre: high-performance ML model loading and S3 data repositories
- FSx for OpenZFS: POSIX snapshots and clones for MCP server dev/test isolation
- Amazon EFS for MCP Servers: simpler shared NFS storage
- EFS performance modes: Bursting, Elastic, and Provisioned throughput
- RDS Multi-AZ for MCP servers: managed relational database HA
- MCP server uptime monitoring