* seaweed-block: red: a snapshot delete is published over a page whose data was freed Two overlapping runs of one snapshot delete write their intent pages under the same tag. If the first run's stalled page update lands between the second run's read of a page and its adoption (after a cleaning pass deleted and the second run re-staged the page), the second run adopts and publishes an intent whose page data was freed: later snapshot deletes on the volume are refused and its cleaning stops. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: a snapshot delete re-reads each intent page after adopting it Publication reads every intent page, adopts it under this run's tag, then publishes. A stalled update from another run of the same delete can land between that read and the adoption and put a deleted page's data reference on the entry. Reading the page again after the adoption, before the transition publishes, refuses that case: once this run's tag is on the entry, no such update passes. No persisted change; a run that hits it stays refused, and a new request id writes new pages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: ledger row for the intent page re-read INV-SNAPSHOT-DELETE-ADOPT-002 names the re-read after adoption, its test and the model row it projects (PublishedReadable; the refused run is the residue a new request id clears). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: the intent page re-read: typed refusal, twins and a store witness Review: the re-read test now separates the guard from weaker ones. A page that reads but holds other bytes, and a change to only the later of two pages, are refused as well as a freed page; the refusal is a precondition that writes nothing to HEAD, keeps the snapshot, and comes after the adoption; the same schedule with intact bytes publishes. The test is a consequence-level projection; a store-level witness shows the tag-only metadata update writing a deleted object's chunk over a re-created one, which the re-read does not depend on refusing. The ledger row names the witness and marks the model as checked outside the repository. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: the intent page re-read keeps its error's cause The refusal wrapped the re-read's error with %v, so a caller deadline that ended the re-read reached the CLI as a precondition ("page changed during adoption", no_progress) instead of deadline_exceeded, unlike the same deadline on the chain's first read. Wrap both errors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: the intent page re-read sees only data the filer already freed The filer frees a deleted entry's chunks, and the chunks an update drops, from its deletion queue: polled every 1.123 s, and retried after 5 min when a volume server does not answer. A stale update that puts such a reference on an adopted page therefore reads back intact while the deletion is still queued, and the intent publishes over data that is freed moments later. The intact-bytes twin publishes for that reason. State that bound in INV-SNAPSHOT-DELETE-ADOPT-002 and at the guard instead of "changed or vanished ... refuses the publication". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: the delete intent publication row and diagram carry the re-read Part C rule 2 moves a changed guard's Part A row and diagram with it. The publication row now names the re-read after adoption and INV-SNAPSHOT-DELETE-ADOPT-002, and the M9 diagram gains the transition's idle and snap self-loops, which it lacked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: red: a stale adoption or mark lands on a re-created object A metadata change writes the looked-up entry back, chunks included, conditional only on its tags: paused between its lookup and its update, it lands on an object deleted and created again with the same tags in between, puts the deleted object's chunk on it, and a cleaner's stale mark then deletes it. The filer's IF_CHUNKS_EQUAL condition refuses such a write. This commit adds the plumbing and the tests, not the guard itself: - the filer protocol subset gains WriteCondition (IF_CHUNKS_EQUAL) on UpdateEntryRequest; SWFS sends it through UpdateEntryIfChunks, and the fakes evaluate it (or drop it, as an older filer does); - a startup probe sends a mismatched conditional update to the disposable probe HEAD; only a definite refusal turns the guard on for the stores the catalog opens. The startup log and /status/chunk (metadata_guard) name it. The two guard tests fail here: changeMeta does not send the condition yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: metadata changes send the filer's chunk condition With the guard on (the startup probe saw the filer enforce it), an adoption or mark sends IF_CHUNKS_EQUAL with the looked-up entry's chunk fids. A re-created object always has a new chunk, so a stale whole-entry write is refused instead of putting a deleted object's chunk on it; a cleaner's delete expects its own mark and so follows. Without the guard the write is unchanged and the intent page re-read stays the check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: ledger rows for the chunk condition and its probe INV-LAYOUT-META-CHUNKS-001 (adoption and mark under IF_CHUNKS_EQUAL) and INV-WS-CHUNK-CONDITION-PROBE-001 (the startup probe decides it, the log and /status/chunk name it); ADOPT-002 names the renamed store test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: the chunk probe without a definite refusal leaves the guard off; fallback wording Review: the existing failure cases stop at the HEAD gate. New cases pass the gate and then fail only the chunk condition probe (unavailable, lost, deadline, filer error, vanished entry, failed HEAD read): the catalog, its stores, the startup log and the usage all stay on page_reread_only. page_reread_only now reads as enforcement not established, not as a filer without the condition; INV-SNAPSHOT-DELETE-ADOPT-002 cites MetaABA r2's delayed-free counterexample, r1 kept as historical scope. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: sw-block metadata writers run the chunk condition probe sw-block opens its catalog with NewBCatalog, and only DialBCatalog ran the probe, so a snapshot-delete, retain, release or volume-delete from the CLI sent its adoptions and marks without the chunk condition even on a filer that enforces it. bCatalog now runs the same probe (checkConditionalHead, via ProbeChunkGuard) for a writing command; a failed probe only leaves the guard off. Read-only commands write nothing. The volume-delete fakes that stall object deletes let the probe's own cleanup through. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: ChunkGuard reports only a chunk condition the filer can carry SetChunkGuard(true) on a store whose filer does not implement ChunkConditionFiler made ChunkGuard report true while changeMeta sent a plain UpdateEntry. Both now ask chunkCondition: the guard is on and the filer can carry the condition. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: Part A rows for the chunk condition probe and guard Part C rule 2: the M4 table gains the startup probe's guard selection (INV-WS-CHUNK-CONDITION-PROBE-001), and the M9 publication, clean removal and list page retirement rows and diagram carry the chunk condition on adoptions and marks (INV-LAYOUT-META-CHUNKS-001), whose Part B row now names the clean removal as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: sw-block usage leaves out a metadata guard it never probed The usage command opens a read-only catalog, which runs no chunk condition probe, so its answer always said page_reread_only even over a filer every writer sends the condition to. The field is now omitted there; blockvolume's /status/chunk still reports its probed guard. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: the sw-block chunk condition probe runs within --timeout A writing command ran the probe on context.Background(), so after a passing census a stalled disposable HEAD create held it for the probe's own 10 s whatever --timeout said. The probe now runs within the command's filer timeout; its cleanup keeps its own 5 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: a stale sw-block adoption is refused through the CLI catalog The probe test proved only guard selection. This one composes it: through the store of the catalog bCatalog opens, an adoption paused between its lookup and its update while the object is deleted and created again is refused with the re-created chunk intact. An unchanged object is still adopted, and a catalog that ran no probe lets the stale write through. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: the M9 diagram qualifies the chunk condition by the guard The adoption and mark labels read as always chunk-conditioned, while the tables beside them say so only with the guard on; guard off, the page re-read is the only check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: a failed chunk guard probe turns the guard off ProbeChunkGuard set the guard only when checkConditionalHead got as far as the chunk probe, so a second call that failed earlier kept the first call's guard on. It now starts from off. Its comment also says a store takes the guard when it is opened, so the probe goes before the stores. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: pingqiu <pingqiu@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Seaweed Block
Local-first block storage for AI agents.
Run locally. Persist incrementally. Resume anywhere.
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. High density per host is a
design goal; see Vision.
Quick start · How it works · Project status · Documentation
Why not just use...
| Local disk | Conventional network block storage | Seaweed Block | |
|---|---|---|---|
Where writes and fsync complete |
On the host | Typically on a remote storage service | On the host |
| Network in the I/O path | No | Typically, for every read and write | No, for data on the host; a restored or moved volume fetches chunks on first read |
| If the host is lost | The state is lost with it | The volume typically survives | The state survives up to its last confirmed checkpoint |
| Resume on another host | Copy the data yourself | Typically, detach the volume and attach it there | Move the volume there, or restore a snapshot into a new volume there (placed by the cluster spec) |
| What persistence sends | Nothing | Typically every write, as it happens | Only the whole 4 MiB chunks that changed, at each checkpoint |
Run, checkpoint, snapshot, restore
- Run. Start a volume on the host where the agent runs. The guest attaches it over NVMe/TCP or iSCSI, formats it with its own file system, and works at near-local speed.
- Checkpoint. The changed chunks go to your SeaweedFS: on demand (
sw-block ops chunk cut), periodically (the holder's--chunk-capture-interval, 5 minutes or more), with the default daily snapshot, and when you stop the volume (sw-block volume stop). - Snapshot.
sw-block volume backup <volume> --name <name>(orsw-block ops chunk snapshot) names a point in time. Snapshots share chunks with each other. - Restore. A restore makes a new volume from a snapshot, on the host that its placement in the cluster spec names. It serves at once and fetches chunks on first read.
The commands and what each needs: snapshots, restore and verification.
Features
- Near-local speed for agent workloads. Writes and
fsynccomplete on the host's disk, with no network round trip, and every guestfsyncreaches it. - Any file system, unchanged tools. The guest sees a plain block device, so
git,npmand builds run as on a local disk. - Incremental checkpoints. Only the changed 4 MiB chunks upload: on demand, periodically, or with the daily snapshot.
- Snapshots and instant restore. Named snapshots share chunks, and a restored volume serves before its data arrives.
- Safe moves between hosts. Epochs and leases fence the old host, so a stale host cannot publish over the workspace's state.
- Self-hosted and open source. Your data stays in your SeaweedFS. Apache-2.0, written in Go.
Use cases
- AI coding agents whose repositories, dependencies and build caches must outlive the sandbox.
- Agent sandboxes and microVM platforms that give each sandbox its own disk.
- Long-running agents that stop, resume and move between hosts.
- Also: Kubernetes block volumes through the CSI driver (alpha), and replicated volumes for workloads that need
synchronous copies (
sync-quorum,sync-all; preview).
One engine, two durability profiles
Agent workspaces are the focus. The same block engine (write-ahead log and extent, NVMe/TCP and iSCSI frontends,
blockmaster's epochs) also runs replicated volumes, for workloads that need copies on other hosts before fsync
completes (sync-quorum, sync-all).
| Checkpointed volume | Replicated volume (preview) | |
|---|---|---|
| Built for | Agent workspaces: many independent, portable disks | Workloads that need online copies on other hosts |
When fsync completes |
Once the data is on the host's local disk | With sync-quorum or sync-all, once a quorum or every replica has it (the default best-effort waits for none) |
| After a host is lost | An operator's forced move continues from the last checkpoint in SeaweedFS | With --cluster-spec and the lifecycle loop enabled (--lifecycle-product-loop-interval, off by default), blockmaster fails a sync-quorum or sync-all volume over to a replica when its fencing round decides; the operator then starts the guest on the new primary's host (no path failover in the guest). best-effort is not failed over automatically; the operator's forced failover may lose the last acknowledged writes |
| Snapshots, restore, moves | Yes | Not yet: the two profiles cannot be combined in v1.1.x |
| Status in v1.1.x | Supported | Preview, with known limits |
The two biggest limits of the preview: a replica that falls behind the retained log needs a manual re-add, and a
primary cut off from blockmaster is not stopped by a lease, so it may serve stale reads and, under best-effort,
accept writes that are later lost. Do not use replicated volumes for data you cannot lose.
A workload chooses the durability it needs: a checkpointed workspace does not pay for synchronous replicas, and a replicated volume does not wait for checkpoints.
Performance
Metadata-heavy agent work runs at local-disk speed, timing the operation itself (with the guest's final syncfs, 11-23%
slower); fsync latency and fsync-bound work are 1.3 to 1.5 times local. These are lab runs of pre-release builds
(the first four rows on the walstore engine, the last two on walstore-chunk) on Firecracker microVMs over NVMe/TCP
loopback, median of 3: measurements, not SLOs. Every number and how it was measured, with the build where it was
recorded: workspace measurements.
Quick start
A trial on a disposable Linux host, not for data you keep. You need nvme-cli, sudo, and SeaweedFS's weed
binary, tested with SeaweedFS 4.53 (from its release page,
asset linux_amd64.tar.gz, which holds the one weed binary).
TAG=v1.1.1
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
export PATH="$PWD:$PATH" # so the sw-block commands that mini prints run as shown
./blockvolume --version # must print the tag's commit
# blockvolume keeps one lock per volume here, so only one live process serves a volume on a host:
sudo install -d -m 0755 -o root -g root /run/sw-block
sudo install -d -m 0755 -o "$USER" -g "$(id -gn)" /run/sw-block/locks
./sw-block mini --dir ./swb-mini --weed /path/to/weed
A failed start leaves --dir behind: start again with a new --dir, or on the same one with --reuse.
What it shows today:
ministartsweed mini,blockmasterand oneblockvolume: volumev1, 256 MiB, on loopback.- It never runs
sudoitself. It prints thenvme connectcommand that attachesv1, and the status, check and snapshot commands. After the connect,sudo nvme listshows the disk's device (for example/dev/nvme0n1). - Snapshots of
v1work at once, through thesw-block ops chunk snapshotcommand it prints. A scheduledsched-<time>snapshot also appears soon after the start. A restore into a new volume does not run insideminiyet; use the standalone setup for it. - To stop: unmount
v1, run thesudo nvme disconnectthatminiprinted, then press Ctrl-C.
Next:
- Other ways to install (the release image, a build from the tag): operations manual.
- Services, restore and a second host: standalone deployment and two hosts and a planned move.
- Kubernetes (alpha): Kubernetes quick start, with v1.1.1. v1.1.0's generated pod cannot start.
How it works
- Local execution.
blockvolumeserves the guest's block device over NVMe/TCP or iSCSI on the same host. A write lands in a local write-ahead log, andfsynccompletes once the data is on the host's disk. The log then drains into a local extent. - Incremental persistence. A checkpoint (a cut in the CLI and the manuals) 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 read.
- One
blockmasterissues epochs and leases, and the holder of a checkpointed (single-replica) volume serves only under its current lease. - A planned move first seals the volume with a final checkpoint, then revokes the old holder, waits for its recorded release, and grants the next epoch on the new host, which loads chunks on first read.
- The store refuses a HEAD update from a stale holder, even before that holder notices it was replaced.
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 checkpoint 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 (in v1.1.x, not for a snapshot of a restored volume) |
- Writes since the last confirmed checkpoint are lost if the host is lost.
- The default schedule is one snapshot a day. It is attempted, not guaranteed, and it is not a recovery-point
objective. Periodic checkpoints (
--chunk-capture-interval, 5 minutes or more) shorten the window. A persistent agent should checkpoint at its task boundaries. sw-block volume stoptakes a checkpoint by default (--no-cutskips 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; in a standalone setup 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 (replication_factor above 1) |
Preview: no snapshots, restore or moves; a replica that falls behind the retained log needs a manual re-add (limits) |
| Kubernetes CSI | Alpha; in v1.1.x deleting a PVC may leave its volume behind, and that volume cannot be removed until v1.2 |
| Remote guests in a standalone setup, 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.
Vision
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.
- Storage efficiency: remote space that is reclaimed and reused, and rolling persistence with low write amplification.
- Flexible durability: replicated volumes out of preview, and replicas combined with checkpoints and snapshots in SeaweedFS.
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 architecture and formal specifications | 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.