Guide · Amazon FSx for OpenZFS · Snapshots & Clones

Amazon FSx for OpenZFS with MCP Servers — Snapshots, Clones, and NFS Volumes

Amazon FSx for OpenZFS runs the OpenZFS file system on fully managed NVMe SSD storage, accessible via NFS v3 and v4.1. For MCP server teams, OpenZFS's most compelling features are its instant snapshots and writable clones: a snapshot of a 100 GB model cache is created in milliseconds (not minutes), and a writable clone of that snapshot gives every developer their own isolated, copy-on-write copy of the data without duplicating the underlying blocks. OpenZFS also offers transparent LZ4 or ZSTD compression, inline deduplication, and sub-millisecond latency at up to 12.5 GB/s aggregate throughput. This guide covers creating file systems and volumes, managing snapshots and clones, configuring NFS export policies, compression options, deduplication trade-offs, and monitoring — along with practical Node.js and ECS patterns for using OpenZFS in MCP server deployments.

TL;DR

FSx for OpenZFS uses a volume tree with a root volume at the top and child volumes beneath it. Create the file system (CreateFileSystemCommand) with ThroughputCapacity: 512 and RootVolumeConfiguration.DataCompressionType: LZ4. Create child volumes for each service or environment. Take snapshots (CreateSnapshotCommand) before any risky operation — they are instant, immutable, and cost only the incremental changed blocks. Create clones (CreateVolumeFromSnapshotCommand) to give a dev environment an isolated, writable copy of a production volume without copying any data. Mount using NFS v4.1: mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576 fs-0abc.fsx.us-east-1.amazonaws.com:/fsx /mnt/fsx.

OpenZFS concepts: file systems, volumes, and the pool

OpenZFS organizes storage into a layered hierarchy:

Unlike EFS, FSx for OpenZFS does not auto-scale storage — you provision a fixed capacity (minimum 64 GiB) and can expand online at any time. Throughput capacity is provisioned separately (64 MB/s to 12.5 GB/s) and can be changed without downtime.

Creating a file system and child volumes

import {
  FSxClient,
  CreateFileSystemCommand,
  CreateVolumeCommand,
  DescribeFileSystemsCommand,
} from "@aws-sdk/client-fsx";

const fsx = new FSxClient({ region: "us-east-1" });

// 1. Create the file system
const { FileSystem } = await fsx.send(new CreateFileSystemCommand({
  FileSystemType: "OPENZFS",
  StorageCapacity: 1024,       // GiB; minimum 64, can grow later
  StorageType: "SSD",
  SubnetIds: ["subnet-aaa111"],
  SecurityGroupIds: ["sg-fsx-openzfs"],
  OpenZFSConfiguration: {
    ThroughputCapacity: 512,  // MB/s; options: 64, 128, 256, 512, 1024, 2048, 3072, 4096, 6144, 12288
    DeploymentType: "SINGLE_AZ_1",
    RootVolumeConfiguration: {
      DataCompressionType: "LZ4",   // transparent compression for all child volumes by default
      ReadCachingEnabled: true,     // NVMe read cache (enabled by default on 2nd gen file systems)
      NfsExports: [
        {
          ClientConfigurations: [
            {
              Clients: "*",        // all clients in SG; restrict to specific CIDR for defense-in-depth
              Options: ["rw", "sync", "no_subtree_check", "no_root_squash"],
            },
          ],
        },
      ],
    },
  },
  Tags: [{ Key: "Name", Value: "mcp-openzfs-prod" }],
  ClientRequestToken: "mcp-openzfs-prod-v1",
}));

const fsId = FileSystem?.FileSystemId!;  // fs-0abc123def456

// 2. Wait for available
async function waitForOpenZFS(id: string): Promise<string> {
  for (let i = 0; i < 30; i++) {
    const { FileSystems } = await fsx.send(new DescribeFileSystemsCommand({ FileSystemIds: [id] }));
    if (FileSystems?.[0]?.Lifecycle === "AVAILABLE") return FileSystems[0].DNSName!;
    if (FileSystems?.[0]?.Lifecycle === "FAILED") throw new Error("FSx OpenZFS creation failed");
    await new Promise(r => setTimeout(r, 10_000));
  }
  throw new Error("Timed out");
}

const dnsName = await waitForOpenZFS(fsId);  // fs-0abc123def456.fsx.us-east-1.amazonaws.com

// 3. Create child volumes for separate MCP server services
const rootVolumeId = FileSystem?.OpenZFSConfiguration?.RootVolumeId!;

for (const service of ["models", "sessions", "artifacts"]) {
  await fsx.send(new CreateVolumeCommand({
    VolumeType: "OPENZFS",
    Name: `mcp-${service}`,
    OpenZFSConfiguration: {
      ParentVolumeId: rootVolumeId,
      DataCompressionType: "LZ4",   // inherit or override root setting
      StorageCapacityQuotaGiB: 256, // hard limit per volume
      StorageCapacityReservationGiB: 128, // guaranteed minimum
      NfsExports: [
        {
          ClientConfigurations: [
            {
              Clients: "10.0.0.0/8",   // restrict NFS to VPC CIDR
              Options: ["rw", "sync", "no_subtree_check", "no_root_squash"],
            },
          ],
        },
      ],
    },
  }));
}

Child volumes appear as subdirectories under the root mount point. The models volume is accessible at /fsx/mcp-models/ once you mount the root at /fsx. You can also mount individual volumes directly by their volume path.

Snapshots — instant point-in-time copies

An OpenZFS snapshot is a copy-on-write bookmark. At creation time, it consumes no storage beyond a small metadata entry. As blocks in the volume change after the snapshot, those original blocks are retained to serve the snapshot — the storage cost of a snapshot grows proportionally to the write rate after it was taken.

import { CreateSnapshotCommand, DescribeSnapshotsCommand } from "@aws-sdk/client-fsx";

// Take a snapshot before a potentially destructive operation
const { Snapshot } = await fsx.send(new CreateSnapshotCommand({
  VolumeId: "fsvol-0xyz789abc",   // the volume to snapshot
  Name: `before-model-update-${new Date().toISOString().slice(0, 10)}`,
  Tags: [
    { Key: "Trigger", Value: "pre-deploy" },
    { Key: "Service", Value: "mcp-server" },
  ],
  ClientRequestToken: `snap-${Date.now()}`,
}));

console.log("SnapshotId:", Snapshot?.SnapshotId);     // fsvolsnap-0abc123
console.log("ResourceARN:", Snapshot?.ResourceARN);
console.log("Lifecycle:", Snapshot?.Lifecycle);       // CREATING (transitions to AVAILABLE in <1s)

Snapshots transition from CREATING to AVAILABLE in under a second for most volumes. They are immutable and permanent until explicitly deleted. Access snapshot data at /mnt/fsx/.snapshot/<snapshot-name>/ — this directory appears automatically on the mount point without requiring any special mount option.

# List available snapshots on the mounted file system
ls /mnt/fsx/.snapshot/
# before-model-update-2026-11-14
# before-model-update-2026-11-07
# weekly-2026-11-10

# Restore a file from a snapshot (copy-based restore)
cp /mnt/fsx/.snapshot/before-model-update-2026-11-14/models/config.json \
   /mnt/fsx/mcp-models/config.json

For full volume rollback (restore entire volume to snapshot state), use RestoreVolumeFromSnapshotCommand:

import { RestoreVolumeFromSnapshotCommand } from "@aws-sdk/client-fsx";

await fsx.send(new RestoreVolumeFromSnapshotCommand({
  VolumeId: "fsvol-0xyz789abc",
  SnapshotId: "fsvolsnap-0abc123",
  Options: ["DELETE_INTERMEDIATE_DATA"],  // deletes data written after the snapshot
  ClientRequestToken: `restore-${Date.now()}`,
}));

// The volume enters MISCONFIGURED state briefly during restore, then returns to AVAILABLE
// All mounted clients will experience I/O errors during the brief restore window (~30s)

Warning: volume rollback is destructive — all data written to the volume after the snapshot is taken will be lost. Unmount the volume from all clients before initiating a rollback.

Clones — writable copies for dev/test isolation

A clone is a writable child volume derived from a snapshot. At creation time, the clone shares all storage blocks with the source snapshot — no data is copied. Only blocks that the clone writes diverge from the source, consuming additional storage incrementally. This makes clones ideal for giving each developer or CI/CD job an isolated copy of a 50 GB model cache without paying for 50 GB per clone.

import { CreateVolumeFromSnapshotCommand } from "@aws-sdk/client-fsx";

// Create a writable clone of the production models snapshot
const { Volume: clone } = await fsx.send(new CreateVolumeFromSnapshotCommand({
  SnapshotId: "fsvolsnap-0abc123",          // snapshot to clone from
  Name: `dev-models-clone-${Date.now()}`,
  OpenZFSConfiguration: {
    ParentVolumeId: rootVolumeId,            // parent in the volume tree
    StorageCapacityQuotaGiB: 512,            // limit how much the clone can diverge
    CopyTagsToSnapshots: false,
    NfsExports: [
      {
        ClientConfigurations: [
          {
            Clients: "10.0.1.0/24",          // restrict to dev subnet CIDR
            Options: ["rw", "sync", "no_subtree_check", "no_root_squash"],
          },
        ],
      },
    ],
  },
  ClientRequestToken: `clone-${Date.now()}`,
}));

console.log("CloneVolumeId:", clone?.VolumeId);   // fsvol-0clone123
console.log("JunctionPath:", clone?.OpenZFSConfiguration?.VolumePath);
// e.g., /dev-models-clone-1731600000000

Mount the clone on a dev machine:

# Mount the clone using its junction path
mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576 \
  fs-0abc123def456.fsx.us-east-1.amazonaws.com:/dev-models-clone-1731600000000 \
  /mnt/dev-models

# Writes to /mnt/dev-models only affect the clone, not the production volume

When the CI job or dev session ends, delete the clone volume to reclaim storage:

import { DeleteVolumeCommand } from "@aws-sdk/client-fsx";

await fsx.send(new DeleteVolumeCommand({
  VolumeId: clone?.VolumeId!,
  OpenZFSConfiguration: {
    FinalBackupTags: [],
    SkipFinalBackup: true,   // no final backup for ephemeral dev clones
    DeleteClonedVolumes: true,
    DeleteIntermediateData: true,
    DeleteIntermediateSnapshots: true,
  },
  ClientRequestToken: `delete-clone-${Date.now()}`,
}));

Compression: LZ4 vs ZSTD

FSx for OpenZFS supports two compression algorithms — LZ4 and ZSTD — plus NONE (no compression). The right choice depends on data type and the CPU/throughput trade-off:

AlgorithmSpeed (compress/decompress)Ratio (typical)Best for
LZ4 ~500 MB/s / ~2 GB/s per core 1.5–2.5× Default choice; compressible data at high I/O rates; model config files, JSON schemas, text documents
ZSTD level 1 ~400 MB/s / ~1 GB/s per core 2.0–4.0× High compression ratio for text-heavy datasets (OpenAPI specs, Markdown, JSON) where write speed is not the bottleneck
NONE N/A 1.0× Already-compressed data: JPEG, PNG, ZIP, model weights in GGUF/ONNX (entropy-dense binary)

For MCP server use cases with mixed workloads (some JSON, some binary model weights), LZ4 is the best default: fast enough to not bottleneck throughput, and effective on the compressible fraction. ZSTD makes sense if storage cost is the primary concern and your data is predominantly text or structured data.

Compression can be set per-volume and changed online; it only applies to newly written blocks:

import { UpdateVolumeCommand } from "@aws-sdk/client-fsx";

// Switch a volume from LZ4 to ZSTD compression (new writes only)
await fsx.send(new UpdateVolumeCommand({
  VolumeId: "fsvol-0xyz789abc",
  OpenZFSConfiguration: {
    DataCompressionType: "ZSTD",
  },
  ClientRequestToken: `update-compression-${Date.now()}`,
}));

Deduplication

FSx for OpenZFS supports inline block-level deduplication. Deduplication eliminates duplicate blocks before writing to storage, which can significantly reduce storage consumption for datasets with many identical files (e.g., container image layers, repeated JSON schemas across thousands of configuration files).

However, deduplication has a significant trade-off: the dedup table is memory-resident and consumes approximately 5–10 GB of RAM per TB of data. For FSx file systems with limited throughput capacity (64–256 MB/s), the dedup table fits comfortably in the system's memory. For large file systems at high throughput, deduplication can degrade performance if the table exceeds available memory and spills to disk.

When to enable deduplication:

When NOT to enable deduplication:

// Enable deduplication on a child volume (not recommended for root volume)
await fsx.send(new UpdateVolumeCommand({
  VolumeId: "fsvol-0xyz789abc",
  OpenZFSConfiguration: {
    // Note: deduplication is set at volume creation time; not all FSx OpenZFS versions
    // support enabling it post-creation via UpdateVolume. Check the FSx API docs for
    // the RecordSizeKiB and UserAndGroupQuotas parameters specific to your version.
  },
  ClientRequestToken: `update-dedup-${Date.now()}`,
}));

NFS mount options for MCP servers

Mount options significantly affect NFS performance for MCP server workloads:

# Recommended mount options for MCP servers using FSx OpenZFS
mount -t nfs4 \
  -o nfsvers=4.1,          # use NFS v4.1 (stateful, better performance than v3)
     rsize=1048576,         # read buffer size 1 MB (optimal for large sequential reads)
     wsize=1048576,         # write buffer size 1 MB
     timeo=600,             # NFS timeout in tenths of a second (60s)
     retrans=2,             # retry count before soft mount gives up
     _netdev,               # don't mount until network is up (important for fstab)
     noresvport             # use non-privileged port (required for some security policies)
  fs-0abc123def456.fsx.us-east-1.amazonaws.com:/fsx/mcp-models \
  /mnt/fsx/models

For read-heavy workloads (loading large model files), use nfsvers=4.1 rather than v3 — NFS v4.1 uses session trunking which allows parallel connections to multiple server NICs, increasing aggregate bandwidth. The difference is most visible for file systems above 1 TB with high throughput capacity.

Avoid soft mount behavior (default is hard). Hard mount retries indefinitely on network interruption; soft mount returns an I/O error after timeo × retrans tenths of a second. For model loading, a hard mount that retries is preferable to an I/O error that crashes the MCP server.

Snapshot scheduling with EventBridge

FSx for OpenZFS does not have built-in snapshot schedules as a first-class feature (unlike EBS). Use EventBridge Scheduler to trigger a Lambda that creates snapshots on a cron:

// Lambda handler: create daily snapshot of production models volume
import { FSxClient, CreateSnapshotCommand } from "@aws-sdk/client-fsx";

const fsx = new FSxClient({ region: process.env.AWS_REGION! });

export const handler = async (): Promise<void> => {
  const volumeId = process.env.VOLUME_ID!;    // fsvol-0xyz789abc
  const retentionDays = parseInt(process.env.RETENTION_DAYS ?? "7");
  const date = new Date().toISOString().slice(0, 10);  // 2026-11-14

  // Create today's snapshot
  await fsx.send(new CreateSnapshotCommand({
    VolumeId: volumeId,
    Name: `daily-${date}`,
    Tags: [
      { Key: "RetentionDays", Value: String(retentionDays) },
      { Key: "Service",       Value: "mcp-server" },
    ],
    ClientRequestToken: `daily-${date}-${volumeId}`,
  }));

  // Prune snapshots older than retention period
  const { Snapshots } = await fsx.send(new (await import("@aws-sdk/client-fsx")).DescribeSnapshotsCommand({
    Filters: [
      { Name: "volume-id", Values: [volumeId] },
      { Name: "name",      Values: ["daily-*"] },
    ],
  }));

  const cutoff = Date.now() - retentionDays * 24 * 60 * 60 * 1000;
  for (const snap of Snapshots ?? []) {
    if (snap.CreationTime && snap.CreationTime.getTime() < cutoff) {
      await fsx.send(new (await import("@aws-sdk/client-fsx")).DeleteSnapshotCommand({
        SnapshotId: snap.SnapshotId!,
      }));
      console.log(`Deleted old snapshot: ${snap.SnapshotId} (${snap.Name})`);
    }
  }
};

Wire this Lambda to an EventBridge Scheduler rule at rate(1 day) or a specific cron expression like cron(0 2 * * ? *) (2 AM UTC daily).

Throughput capacity planning

FSx for OpenZFS provisions throughput separately from storage. Available tiers (MB/s): 64, 128, 256, 512, 1024, 2048, 3072, 4096, 6144, 12288. You can change throughput capacity online at any time — the update takes ~30 minutes and is non-disruptive.

Tier (MB/s)Approx. Monthly CostMCP Server Profile
64~$30/mo (throughput only)Dev/test; loading a single 2 GB model at startup
128–256~$60–$120/moSmall production; 1–5 concurrent container starts per minute
512~$240/moMedium production; 10–20 concurrent container starts; serving inference at scale
1024+~$480+/moLarge fleets; rapid auto-scaling events; batch inference pipelines

Monitor DataReadBytes and DataWriteBytes CloudWatch metrics over a 1-week period to establish a baseline, then right-size the throughput tier. Add a CloudWatch alarm for when DataReadBytes / period approaches 90% of provisioned throughput as a scale-up trigger:

import { CloudWatchClient, PutMetricAlarmCommand } from "@aws-sdk/client-cloudwatch";

await new CloudWatchClient({ region: "us-east-1" }).send(new PutMetricAlarmCommand({
  AlarmName: "fsx-openzfs-throughput-saturation",
  Namespace: "AWS/FSx",
  MetricName: "DataReadBytes",
  Dimensions: [{ Name: "FileSystemId", Value: "fs-0abc123def456" }],
  Statistic: "Sum",
  Period: 60,
  EvaluationPeriods: 5,
  // 512 MB/s * 60s * 0.90 = 27,648,000,000 bytes per minute at 90% utilization
  Threshold: 512 * 1_000_000 * 60 * 0.9,
  ComparisonOperator: "GreaterThanOrEqualToThreshold",
  AlarmActions: ["arn:aws:sns:us-east-1:123456789012:ops-alerts"],
  TreatMissingData: "notBreaching",
}));

Common errors and fixes

ErrorCauseFix
mount.nfs4: Operation not permittedNFS export policy does not include the client's IPUpdate NFS export Clients in the volume's export configuration; use 10.0.0.0/8 for VPC-wide access
mount.nfs4: Permission deniedroot_squash in export options maps root UID to nobodyUse no_root_squash for containers that run as root (UID 0); or run container as non-root UID and ensure volume permissions match
Snapshot not accessible via .snapshotNFSv3 clients do not support the .snapshot directory auto-mount by defaultMount the snapshot explicitly by junction path, or use NFSv4.1 which surfaces .snapshot automatically
StorageCapacity must be >= StorageCapacityReservationGiBChild volume quota set below current utilization plus reservationLower StorageCapacityReservationGiB, or increase the quota
Clone creation fails: ParentVolumeId not foundCreateVolumeFromSnapshotCommand requires the ParentVolumeId of the new clone's parent, not the source snapshot's volumePass the root volume ID or the desired parent volume ID, not the snapshot's volume ID
Throughput lower than provisionedReading many small files sequentially (high metadata load)Enable ReadCachingEnabled: true; consider merging small files; NFS v4.1 pipelining helps for small-file workloads vs v3

Related guides