You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update the experimental-unified-storage doc and add rustdocs to describe
the planned upcoming three-store architecture (containers-storage -> composefs -> ostree).
This will eliminate tar serialization and share physical disk blocks.
Assisted-by: OpenCode (claude-sonnet-4-6)
Signed-off-by: Colin Walters <walters@verbum.org>
Unified storage is an experimental feature that allows bootc to fetch and store
11
-
the default OS image in the same [containers/storage](https://github.com/containers/storage)
12
-
backend used for [logically bound images](logically-bound-images.md) (and by podman).
13
-
This enables several benefits:
10
+
Unified storage is the goal of having all storage for bootc be "unified" with the storage
11
+
used by a container runtime, such as podman.
12
+
13
+
Currently, bootc uses either ostree or composefs. [Logically bound images](logically-bound-images.md)
14
+
use the podman container storage.
15
+
16
+
## Goals
14
17
15
18
- Direct support for zstd:chunked: Container images using zstd:chunked compression
16
19
can be efficiently pulled with deduplication
@@ -21,20 +24,6 @@ This enables several benefits:
21
24
- When used with `bootc image cmd build`, can support direct build into the bootc-owned
22
25
storage without a copy from the podman (or other app container) storage.
23
26
24
-
## Background
25
-
26
-
Historically, bootc has used two separate storage backends:
27
-
28
-
1.**ostree**: For the booted host OS image, via [ostree-rs-ext](https://github.com/ostreedev/ostree-rs-ext/)
29
-
2.**containers/storage**: For logically bound images (LBIs)
30
-
31
-
This split created challenges: the booted image couldn't be easily accessed
32
-
by podman, and container layer sharing between the host and LBIs wasn't possible.
33
-
34
-
Unified storage addresses this by pulling the host image into the bootc-owned
35
-
container storage (`/usr/lib/bootc/storage`) first, then importing from there
36
-
into ostree and setting it up for booting (e.g. performing SELinux labeling).
37
-
38
27
## Current status
39
28
40
29
**Status**: Experimental. The unified storage feature is under active development.
@@ -56,16 +45,10 @@ from its container storage into ostree, or when copying between different
56
45
container storage instances, each layer is fully re-serialized even when both
57
46
storages are on the same filesystem.
58
47
59
-
With reflink support (as proposed in that issue), copies between storages on
60
-
the same filesystem would be nearly instantaneous and use no additional disk
61
-
space. Without it, unified storage works but involves redundant I/O and
62
-
temporary disk space usage proportional to layer sizes. This is particularly
63
-
noticeable with large non-chunked layers.
64
-
65
48
The architectural fix requires separating metadata from data in the copy path,
66
49
allowing file descriptors to be passed and reflinked rather than streamed
67
-
through tar. This is related to the composefs approach of content-addressed
68
-
storage with distinct metadata and data channels.
50
+
through tar. This will be solved by putting [composefs-rs](https://github.com/containers/composefs-rs)
51
+
in the middle to orchestrate zero-copy pulls. See [Future plans: composefs-to-ostree](#future-plans-composefs-to-ostree).
69
52
70
53
## Enabling unified storage
71
54
@@ -153,7 +136,41 @@ podman --storage-opt=additionalimagestore=/usr/lib/bootc/storage run localhost/b
153
136
Unified storage is complementary to the [composefs backend](experimental-composefs.md).
154
137
While unified storage changes *how images are pulled* (using containers/storage),
155
138
the composefs backend changes *how the filesystem is stored and verified*.
156
-
These features can potentially be combined in the future.
139
+
140
+
## Future plans: composefs-to-ostree
141
+
142
+
These features will be combined in upcoming work to build a "composefs-first"
143
+
import pipeline. In this planned model, containers/storage will pull the image,
144
+
composefs will import it via reflinks (`FICLONE`), and then ostree will
145
+
synthesize its commit by `FICLONE`ing from the composefs objects.
146
+
147
+
This will eliminate tar serialization entirely, meaning only one physical copy
148
+
of the image data will exist on disk, shared across all three stores.
149
+
150
+
## Future plans: composefs-as-storage
151
+
152
+
Looking further ahead, the ultimate evolution of unified storage is to make the host's `/sysroot/composefs` object store the single, global source of truth for all content-addressed files on the system.
153
+
154
+
Instead of `containers/storage` maintaining its own copy of application image layers and merely sharing the *host* OS layers, podman's composefs backend could be configured to write objects directly into `/sysroot/composefs` on bootc-managed systems.
155
+
156
+
This means there would be exactly one storage pool for:
157
+
158
+
1. The bootc host OS image
159
+
2. Logically bound app containers
160
+
3. Standard Podman app containers
161
+
4. Flatpak apps (by having flatpak's system helper write to the same object store)
162
+
163
+
Every file across the entire system—whether part of the base OS, a containerized database, or a desktop application—would be deduplicated automatically and perfectly at the object level via fsverity digests.
164
+
165
+
### Implementation notes
166
+
167
+
For developers, the internal design and target architecture for this three-store
168
+
unified storage model is documented in the rustdoc comments of the relevant source files:
169
+
170
+
-`crates/lib/src/store/mod.rs` — the target three-store architecture and reflink behavior
0 commit comments