Fly.io replaces Sprites filesystem with SBD: ext4 on a block device on a bucket
Brief
Fly.io has replaced the JuiceFS-based storage behind Sprites with a simpler Sprites Block Device (SBD), citing reliability problems in the old multi-database design.
What changed
- SBD takes a bucket and presents it to the Linux kernel as a block device over NBD.
- A Sprite formats that device as ext4 and mounts it like a normal disk.
- Metadata lives in the bucket alongside the blocks, so there is no separate database to keep in sync.
- A daemon inside the Sprite, sbd serve, answers block reads and writes from a local cache and uploads dirty blocks in the background.
Why Fly.io replaced JuiceFS
- The old setup used a 100 GB ext4 disk image on JuiceFS, plus a metadata database and a checkpoints.db database.
- Each component was made durable separately, so they could disagree.
- In writeback mode JuiceFS recorded a chunk before uploading bytes; a kill between steps could leave metadata pointing at a missing chunk.
- A test harness ran 400 JuiceFS Sprites for about 5,000 cycles, and a nonzero number permanently lost the ability to checkpoint.
Checkpoints and recovery
- SBD checkpoints are block snapshots of the whole volume, with a version number recorded in its checkpoint catalog.
- Restore unmounts the filesystem, rewinds the volume in place and mounts it again, costing about as much as a restart.
- SBD checks every block read back from object storage against what it wrote; if SBD dies, the whole Sprite restarts.
Migration
- SBD will be the Sprites filesystem from here on out.
- Sprites created before 10/6 can be migrated using Fly.io's documented storage-upgrade instructions.
Generated by AI from the original article. Check the source for full details.