Skip to content

support /var lvs in bootc #2

Open
0 of 3 issues completed
Open

Description

@jmarrero

bootc-dev/bootc#2521
has new comments from Colin, let's prototype in the forge how implementing the --var and DPS support would look like.

Activity

  1. jmarrero commented on Oct 2, 2026

    @jmarrero
    ContributorAuthor

    @jmarrero-bot open code can you summarize what the PR linked is trying to accomplish?

  2. jmarrero commented on Oct 2, 2026

    @jmarrero
    ContributorAuthor

    @jmarrero-bot opencode can you summarize what the PR linked is trying to accomplish?

  3. jmarrero-bot commented on Oct 2, 2026

    @jmarrero-bot
    Contributor

    @jmarrero Unknown agent open. Usage: @jmarrero-bot <agent> <request>; agents: claude, opencode

  4. jmarrero-bot commented on Oct 2, 2026

    @jmarrero-bot
    Contributor

    @jmarrero opencode result for #2 (comment)

    bootc PR #2521 aims to make separate /var filesystems—including LVM volumes and nested mounts such as /var/log—start with the content shipped in the container image.

    Why it’s needed

    Currently, bootc install to-filesystem seeds /var into bootc’s internal state directory. A separate filesystem mounted over /var or one of its subdirectories hides that content, leaving the actual volume empty.

    What the draft implements

    • Detect filesystems already mounted under the installation target’s /var.
    • Populate empty mount trees from the image’s seeded /var, preserving metadata, applying SELinux labels, and syncing the filesystems.
    • Preserve any mount tree that already contains data, without merging into it.
    • Advertise an initialize-var-mounts capability through bootc container inspect, so image builders can detect support.
    • Extend tests for separate and nested volumes, and fix the test’s /boot UUID.

    This applies to fresh to-filesystem installs; callers still arrange for those filesystems to mount at boot. It pairs with image-builder PR #2733.

    Colin’s requested direction

    Colin suggests changing the interface to:

    • Provide an explicit --var mount option.
    • Automatically discover and use a DPS (Discoverable Partitions Specification) “Variable Data Partition.”
    • Let --var= disable that automatic discovery and retain the default /var layout.
    • Report global capabilities through bootc --version.

    Bottom line: the current draft fixes initialization of pre-mounted /var volumes; the proposed next step is for bootc to select and mount /var itself through explicit configuration or DPS discovery. Those review suggestions are not yet implemented in the draft.

    bootc-bot · opencode · 25s · exit 0

  5. jmarrero commented on Oct 2, 2026

    @jmarrero
    ContributorAuthor

    @jmarrero-bot can you prototype how doing Colin's suggestions would look like?

  6. jmarrero-bot commented on Oct 2, 2026

    @jmarrero-bot
    Contributor

    @jmarrero Unknown agent can. Usage: @jmarrero-bot <agent> <request>; agents: claude, opencode

  7. moved this from In Progress to Draft in Workstreamon Oct 2, 2026
  8. jmarrero-bot commented on Oct 13, 2026

    @jmarrero-bot
    Contributor

    Status update (2026-10-13), replacing the earlier plan in this issue's body. The --var / DPS prototype in jmarrero-forge/bootc#1 predates the current direction and would need rework, so it's paused.

    Problem. bootc install to-filesystem seeds the image's /var into the stateroot (libostree prepare_deployment_var() on OSTree, bootc's own copy on composefs). Filesystems mounted at the target's /var or below stay empty and hide that content at boot. Image builders that mount separate /var volumes hit this, and so do their post-install stages and the final relabel. Upstream issues: bootc-dev/bootc#1615, #997, #336.

    Current PRs

    Proposed direction (to confirm on #2521). Defer the /var copy at install, then initialize the mounts from the image, so each file lands once:

    1. install to-filesystem --defer-var (name TBD) skips seeding /var. On OSTree that needs a marker in the stateroot var now, or a libostree deploy option later.
    2. --initialize-var-mounts copies from the image's /var into an assembled /var (the volumes bind-mounted over the stateroot var). Without --defer-var the result is the same as today.
    3. A day-two command (e.g. bootc state initialize-var) runs the same routine on a booted system, for volumes added later.

    Open decisions:

    • flag names (--defer-var vs --var=empty; keep --initialize-var-mounts?);
    • marker vs libostree option;
    • whether a re-run fills only empty volumes or missing files too;
    • who runs the second step after a deferred install;
    • PR structure (keep #2521 minimal, then follow-ups).

    Testing still missing for #2521 revision 2, tracked in a sub-issue: a composefs install and boot, upgrade and rollback with separate /var volumes, multiple VGs, nested-mount edge cases, and the image-builder end-to-end path, all with synthetic layouts.

    Generated-by: https://github.com/jmarrero-bot#llms

  9. added
    epicA goal; live only when jmarrero applied this label
    on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1epicA goal; live only when jmarrero applied this labeltarget:bootc-dev

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions