Skip to content

Add ephemeral scratch disk with overlayfs - #1

Merged
danievanzyl merged 1 commit into
mainfrom
feat/scratch-storage
Mar 25, 2026
Merged

Add ephemeral scratch disk with overlayfs#1
danievanzyl merged 1 commit into
mainfrom
feat/scratch-storage

Conversation

@danievanzyl

Copy link
Copy Markdown
Owner

Summary

  • Adds scratch_size_mib param to POST /sandboxes — creates a sparse ext4 as /dev/vdb
  • Agent mounts at /scratch and layers overlayfs on /usr, /var, /etc
  • apt install, pip install, npm install all write to scratch transparently
  • Rootfs stays pristine, scratch is destroyed with the sandbox

Test plan

  • Create sandbox with scratch_size_mib=1024/scratch mounts as 974MB
  • overlayfs active on /usr, /var, /etc
  • pip install flask writes to scratch overlay, imports work
  • Sandbox without scratch still works (no regression)

@danievanzyl
danievanzyl merged commit 185f1fb into main Mar 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant