Skip to content

Allow configuring the writable root overlay (upper.ext4) size #762

@boostd

Description

@boostd

The 4 GiB cap on the writable overlay gets tight once one installs a normal toolchain (for longer-lived sandboxes). Bind-mounts and /tmp do cover some writes but not everything. Currently working around it by baking more things into the OCI image.

Ext4FormatOptions::size_bytes already exists and format_ext4_with_tree honours it. The only caller create_upper_ext4 in crates/microsandbox/lib/sandbox/mod.rs always passes Ext4FormatOptions::default(), pinning it to DEFAULT_SIZE_BYTES = 4 * 1024 * 1024 * 1024 (crates/image/lib/ext4/mod.rs:25). Nothing in SandboxConfig, the builder, the CLI, or SandboxDefaults exposes the field.

Environment: msb 0.4.6, WSL2 Ubuntu 24.04.2 LTS
Proposal: sandbox-level knob (builder method / CLI flag / SandboxDefaults entry) for upper-layer size, default unchanged.

PS: happy to send a PR if this seems like a reasonable request

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions