---
title: "SBD: We Have a Filesystem at Home"
description: "Fly.io replaced the modified JuiceFS stack behind Sprites with the Sprites Block Device (SBD), which exposes an object storage bucket to the Linux kernel as an NBD block device formatted with ext4."
url: "https://swe.quest/articles/sbd-we-have-a-filesystem-at-home-3c737c700e710a53"
canonical: "https://fly.io/blog/sprites-block-device/"
source: "Fly.io"
published: "2026-10-22"
difficulty: "medium"
kind: "Case study"
reading_minutes: 5
tags: ["storage-systems","linux","testing"]
---

# SBD: We Have a Filesystem at Home

A post on [Fly.io](https://swe.quest/sources/flyio.md), published 2026-10-22, 5 min read, Case study. Original: [https://fly.io/blog/sprites-block-device/](https://fly.io/blog/sprites-block-device/)

## Summary

Fly.io replaced the modified JuiceFS stack behind Sprites with the Sprites Block Device (SBD), which exposes an object storage bucket to the Linux kernel as an NBD block device formatted with ext4. The old design kept data chunks, a Litestream-backed SQLite metadata database and a separate checkpoints database consistent with each other. In writeback mode, a machine killed between recording metadata and uploading a chunk left dangling references that corrupted every clone-based checkpoint. SBD stores its metadata in the bucket beside the blocks, uses a single daemon with a local cache and background uploads, makes checkpoints versioned block snapshots, and verifies every block read back, restarting the Sprite rather than running on an untrusted disk. A torture-test harness driving write/checkpoint/sleep/wake/restore cycles showed SBD to be orders of magnitude more reliable.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Storage systems](https://swe.quest/tags/storage-systems.md) (Infrastructure)
- [Linux](https://swe.quest/tags/linux.md) (Infrastructure)
- [Testing](https://swe.quest/tags/testing.md) (Engineering practices)

## Prerequisites

- object storage semantics ([easy posts on Storage systems](https://swe.quest/tags/storage-systems.md?difficulty=easy))
- Linux block devices and filesystems ([easy posts on Linux](https://swe.quest/tags/linux.md?difficulty=easy))
- copy-on-write snapshots

## Keywords

Sprites, SBD, JuiceFS, NBD, ext4, Litestream, SQLite, Fly.io

## Related posts

- [The Design & Implementation of Sprites](https://swe.quest/articles/the-design-implementation-of-sprites-47c917ae90794ea9.md): Fly.io · 2026-01-14 · Medium · 10 min read · Virtualization, Storage systems, System design, Cloud platforms, Sandboxing & isolation
  Sprites are Linux microVMs that create in a second or two, carry a 100GB durable root filesystem and sleep automatically when idle.
- [Litestream Writable VFS](https://swe.quest/articles/litestream-writable-vfs-4f950262d6c7f5b0.md): Fly.io · 2026-01-29 · Medium · 7 min read · SQLite, Storage engines, Replication, Storage systems
  Litestream's SQLite VFS now supports an optional write mode and background hydration, built so the Sprites storage stack can serve reads and writes milliseconds after a cold boot without first downloading its JuiceFS block map from object storage.
- [Building fast filesystems for VMs](https://swe.quest/articles/building-fast-filesystems-for-vms-c974511fa7175ffd.md): Modal · 2026-10-16 · Hard · 9 min read · Storage systems, Virtualization, Performance engineering, Linux, Sandboxing & isolation
  Modal replaced virtio-fs with a custom virtio-blk backend, ImageFS-blk, for its VM Sandboxes.
- [An adventure in writing compatible systems](https://swe.quest/articles/an-adventure-in-writing-compatible-systems-f48d37f87fc6e365.md): Turso · 2025-08-28 · Medium · 4 min read · SQLite, Storage engines, Formal methods, Debugging, Rust
  Turso, a Rust rewrite of SQLite, hit a bug where every write after the database crossed 1GB made SQLite's integrity checks fail, even though Turso's own checks found the file intact.
- [Making multiplayer more reliable](https://swe.quest/articles/making-multiplayer-more-reliable-3fb296ccf52c818b.md): Figma · 2022-10-20 · Medium · 10 min read · Real-time systems, Storage systems, Resilience, Rust, Cloud platforms
  Figma added a write-ahead journal to its in-memory multiplayer service, which previously persisted files only via full checkpoints to S3 every 30–60 seconds.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
