Storage and Sizing
Terrarium works best when the host has a small boot disk and a separate disk for LXD container data plus the local ZFS time machine.
Recommended Storage Strategy
Best setup:
- boot disk for Ubuntu and Terrarium control-plane services
- separate block volume for the ZFS pool that stores LXD containers and snapshots
Recommended mode for that setup:
--storage-mode disk
Fallback:
- if your provider only gives you one disk, use
--storage-mode file
partition mode exists for cases where you already have an unused partition or safe free space on a non-root disk, but it is not the primary Terrarium path.
How The Local Time Machine Uses Space
Terrarium keeps its local time-machine history as ZFS snapshots on the same pool as the containers.
That means:
- snapshots are copy-on-write, not full copies
- they keep changed blocks for as long as the snapshots exist
- the more your workloads rewrite large files or churn package trees and caches, the more space snapshots will consume over time
Current default local retention:
415-minute snapshots24hourly snapshots14daily snapshots3monthly snapshots
So the smallest automatic local time-machine step is 15 minutes.
Pool defaults:
compression=zstd- dedup disabled
S3 exports are separate from the local time machine. They are streamed from ZFS and compressed with zstd before upload, so they do not need extra permanent local storage beyond Terrarium's working state.
Hardware Guidance
- Minimum practical host:
2 vCPU4 GB RAM30-40 GBboot disk- separate
80-120 GBZFS disk
- Recommended general-purpose host:
4 vCPU8-16 GB RAM40-60 GBboot disk- separate
150-300 GBZFS disk
- Heavier multi-environment or agent-heavy host:
8 vCPU16+ GB RAM50-80 GBboot disk300+ GBZFS disk
How Much ZFS Space To Plan For
As a starting point:
- for moderate churn, plan
2x-3xyour expected live container data - for churn-heavy workloads, plan
3x-4x
Examples:
- if you expect
50 GBof live container data, a good starting point is:20-30 GBboot disk100-150 GBZFS disk
- if that same
50 GBis churn-heavy, prefer:150-250 GBZFS disk
- if you must use
--storage-mode file, combine both budgets on the root disk:- typically
120-180 GBtotal for that same50 GBworkload
- typically
Mode-Specific Notes
disk
- best fit for most providers that support attached block storage
- Terrarium wipes the selected non-root disk and creates the ZFS pool there
partition
- use only when you already have a safe target on a non-root disk
- Terrarium can discover free extents and unused partitions, but it will not shrink the mounted root filesystem
file
- easiest fallback on single-disk VPSes
- host OS, container data, and snapshots all share the same filesystem
- choose a noticeably larger root disk than you would for a separate-disk setup
For provider-specific examples, see Provider Guides.