Files
seaweedfs/seaweed-block
pingqiu-cpu 12ed8fb2e4 docs: operations manual answers the rc.2 two-host cell (#1048)
Merge note (batch b14; pull_request_target spec-trace workflow has a startup_failure, so its checks run locally):
- One Test run (47292188573) succeeded (go test (linux), process-level tests (real binaries)) on the integration tree 0c6ffb38 = main 7f8a7f2d + #1047 #1048  in this order; these squash merges reproduce that tree, verified after the last one.
- spec-trace-check.sh and public-text-check.sh, run with main's scripts against this head and body: both exit 0.
2026-12-04 00:08:34 -08:00
..
2026-04-11 14:21:09 -07:00

Seaweed Block

tag CI Go License

Local-first block storage for AI agents.

Local-speed execution. Portable workspace state.

Seaweed Block gives each agent sandbox or microVM its own block disk on the host's local storage, and checkpoints the changed data to your own SeaweedFS. Writes and fsync complete locally; checkpoints, named snapshots and restores carry the workspace's state beyond that host.

Three ways to give an agent VM a disk. Local disk: every I/O stays on the host, fast, but the state is tied to that host. Network block storage: every I/O crosses the network to a remote volume, so the state outlives the host, but the network is on every I/O. Seaweed Block: every I/O stays on the host's local disk and changed chunks go to your SeaweedFS in the background, so it runs at local speed and the state outlives the host.

Why Seaweed Block

  • Agent compute is short-lived; its workspace is not. Repositories, dependencies and build caches must outlive the sandbox that made them.
  • A local disk is fast, but its state is tied to one host.
  • Network block storage frees the state from the host, but puts the network on every I/O and every fsync.
  • Seaweed Block separates the two: execution on the local disk, persistence as incremental checkpoints to SeaweedFS in the background.

Features

  • Local-first I/O. Writes and fsync complete on the host's disk, and every guest fsync reaches it.
  • Native file systems. The guest sees a plain block device, so git, npm and builds run unchanged.
  • Incremental checkpoints. A cut uploads only the changed 4 MiB chunks.
  • Named snapshots and restore. A snapshot shares its chunks with the others, and a restore makes a new volume from it.
  • Lazy restore. A restored volume serves at once and fetches each chunk on its first read or write.
  • Planned moves between hosts. Epochs and leases fence the old holder, so a stale host cannot publish.
  • Flexible persistence. Checkpoint on demand, every 5 minutes or more, or with the default daily snapshot.
  • Open source. Apache-2.0, self-hosted, written in Go.

Designed for

AI coding agents · agent sandboxes · long-running agents that stop and resume · microVM platforms · Kubernetes block volumes (alpha)

Performance

Time on Seaweed Block relative to a local disk, over NVMe/TCP loopback: npm ci 1.00, git clone 1.02, untar 100,000 files 1.04, cold find and stat 0.97, 2,000 create plus write plus fsync 1.52, guest fsync median 1.31.
Workload Seaweed Block Local disk Relative
npm ci (617 packages, offline) 2.14 s 2.14 s 1.00
git clone (Go 1.23 repository, local) 7.10 s 6.99 s 1.02
Untar 100,000 files 1.10 s 1.06 s 1.04
Cold find + stat over them 0.32 s 0.33 s 0.97
2,000 × create + write + fsync 9.27 s 6.11 s 1.52
Guest fsync median (fio 4 KiB random write, one at a time) 3.59 ms 2.74 ms 1.31
Guest write pause during a checkpoint not yet published measured in the v1.1.1 run

Measurements, not SLOs: lab runs, median of 3, on Firecracker microVMs (4 vCPU, 4 GiB) on one bare-metal host, over NVMe/TCP loopback, against a local file-backed disk.

  • The first four rows come from a pre-release build (f7a6305) on the walstore engine, which the released path builds on. They time the operation itself. With the guest's final syncfs included on both sides, the first three are 11-23% slower than the local disk, and untar of 5,000 small files takes about 2.2 times as long.
  • The 2,000 × create + write + fsync row and the guest fsync median come from a later pre-release run of the walstore-chunk path after the group-commit fix (#173), on the same host; that run's build commit is not recorded. They are not measurements of a tagged release.
  • The checkpoint pause is not published yet.

Every number, and how it was measured: workspace measurements. Measurements of v1.1.1 will replace these.

Quick start

A trial on a disposable Linux host, not for data you keep. You need nvme-cli, sudo (only for the commands that mini prints), and SeaweedFS's weed binary (tested with SeaweedFS 4.53).

TAG=v1.1.0
curl -fsSLO https://github.com/seaweedfs/seaweed-block/releases/download/$TAG/sw-block-$TAG-linux-amd64.tar.gz
curl -fsSLO https://github.com/seaweedfs/seaweed-block/releases/download/$TAG/SHA256SUMS
sha256sum -c --ignore-missing SHA256SUMS && tar -xzf sw-block-$TAG-linux-amd64.tar.gz --strip-components=1
./blockvolume --version      # must print the tag's commit
./sw-block mini --dir ./swb-mini --weed /path/to/weed

This is for v1.1.0, whose archive keeps the binaries in a directory. From v1.1.1 the archive holds the three binaries at its top and SHA256SUMS lists the archive: extract it without --strip-components.

What it shows today:

  • mini starts weed mini, blockmaster and one blockvolume: volume v1, 256 MiB, on loopback.
  • It never runs sudo itself. It prints the nvme connect command that attaches v1, and the status, check and snapshot commands.
  • Snapshots of v1 work at once. A restore into a new volume does not run inside mini yet; use the standalone setup for it.
  • To stop: unmount v1, run the sudo nvme disconnect that mini printed, then press Ctrl-C.

Next:

How it works

  • Local execution. blockvolume serves the guest's block device over NVMe/TCP or iSCSI on the same host. A write lands in a local write-ahead log, and fsync completes once the data is on the host's disk. The log then drains into a local extent.
  • Incremental persistence. A cut uploads the volume's changed 4 MiB chunks to SeaweedFS. It then advances the volume's HEAD root with a conditional update on its generation and epoch. A snapshot names a root and shares chunks with the others, with no backing chain.
  • Recovery and mobility.
    • A restore makes a new volume that serves at once and fetches each chunk from the snapshot on first use.
    • One blockmaster issues epochs and leases, and a holder serves only under its current lease.
    • A planned move revokes the old holder, waits for its recorded release, and grants the next epoch on the new host.
    • The store refuses a HEAD update from a stale holder, even before that holder notices it was replaced.

Write path: a microVM writes over NVMe/TCP or iSCSI to blockvolume, which completes write and fsync on its local WAL. Background path: a cut uploads changed 4 MiB chunks to SeaweedFS and updates HEAD on generation and epoch; blockmaster issues epochs and leases; a stale holder's update is refused.

More: agent workspace design, volume lifecycle, and the TLA+ specifications of the protocols where a bug would lose data.

Durability model

Level Reached when Where the data is What it protects against
Local synced the guest's fsync returns the holder host's disk a crash or restart of the processes on that host
Remotely checkpointed a cut is confirmed (after its commit in SeaweedFS) SeaweedFS the loss of the host: a forced move continues from the last confirmed checkpoint
Named snapshot a snapshot command answers ok SeaweedFS, kept by name a restore into a new volume at that point
  • Writes since the last confirmed checkpoint are lost if the host is lost. They are reported, not hidden.
  • The default schedule is one snapshot a day. It is attempted, not guaranteed, and it is not a recovery-point objective. Periodic cuts (--chunk-capture-interval, 5 minutes or more) shorten the window. A persistent agent should checkpoint at its task boundaries.
  • sw-block volume stop takes a cut by default (--no-cut skips it). A holder stopped any other way (systemctl stop, a kill, or the loss of its host) takes none.
  • No production SLO, RPO or RTO is claimed. Details: operator guide.

Project status

Capability v1.1.x
Local single-replica volumes (walstore-chunk) Supported
NVMe/TCP and iSCSI Supported; the guest runs on the holder's host
Incremental checkpoints Supported
Named snapshots and lazy restore into a new volume Supported
Planned moves between hosts (operator-run, fenced) Supported
Volumes up to 1 TiB Supported; above 256 GiB only at format level 1 (new clusters start at it; upgraded clusters run sw-block cluster finalize-format) and only after every host runs v1.1
Replicated volumes Preview
Kubernetes CSI Alpha; in v1.1.x a PVC cannot be removed once it is provisioned (removal comes with v1.2)
Remote guests, authenticated remote NVMe/TCP Not in v1.1.x
Templates, instant fork Not in v1.1.x

Use tagged releases only: main is unreleased work. Each release's conditions are in the capabilities table and the release notes.

Roadmap

Directions, not commitments; no dates.

  • Lightweight execution: more volumes per host and less overhead per volume.
  • Instant workspaces: shared templates, fast creation, branching.
  • Continuous persistence: efficient rolling checkpoints.
  • Portable state: recovery, migration and resume across hosts with less operator work.

Documentation

To Read
Try it, run the services, restore a snapshot Standalone deployment
Install, upgrade, finalize, monitor, read typed errors Operations manual
Size a host, choose a recovery point, handle host loss Operator guide
Move, revoke, delete Volume lifecycle
Run on Kubernetes (alpha) Kubernetes quick start, Kubernetes status
See what each release supports Capabilities, release notes
Check the numbers Workspace measurements
Read the design and its proofs Agent workspace design, core design, TLA+ specifications

Community and license

Questions and bug reports: GitHub Issues. To build and test: go build ./... && go vet ./... && go test -short ./... (the unit checks; CI also runs the process-level suite). Seaweed Block builds on SeaweedFS. License: Apache-2.0.