Skip to content

Migrating from ostree to composefs backend #2079

Open

Description

@jeckersb

I don't think we have any reasonable, documented way to do this today. Just creating this as a tracker and a place to write down potential approaches and any known problems. We're going to need to be able to do this eventually, and selfishly right now I'm in a place where my laptop has migrated from ostree-based Silverblue => ostree-based custom bootc deployment and I would like to swap to the composefs backend but am also too lazy at the moment to back everything up and wipe to do a clean install.

Activity

  1. cgwalters commented on Mar 20, 2026

    @cgwalters
    Member

    So part of this (the storage side) I think just goes into #20 - enabling unified storage should actually unify all three by default I think.

    But past that yes it's a bit tricky as we need to copy bits from the state directories (or perhaps have a mode where composefs is used but we discover state directories from ostree - messy).

    It depends a lot on what you mean by "migrate" I guess - like do we want to support rollbacks? Is the goal a complete removal? It changes the design a bit depending on the answers to this.

  2. jeckersb commented on Mar 20, 2026

    @jeckersb
    CollaboratorAuthor

    I guess the minimum viable thing would be to splat out the image into a new composefs repo, copy (reflink?) over the state dirs, and wire up the boot to use the new backend. Don't clean up the old ostree data, just leave it there. Don't try to preserve rolling back to ostree (although I could see that being an early RFE once the bare minimum works). Probably also ignore any ostree kargs?

  3. MatthiasGrandl commented on May 2, 2026

    @MatthiasGrandl

    What happens if you just boot install to-existing-root --composefs-backend ? I assume it’s gonna blow up my install, but I am definitely curious.

  4. travier commented on May 4, 2026

    @travier
    Contributor

    We accounted for that in the layout described in #1190 (comment) & composefs/composefs-rs#38 (comment).

    Ideally, we should only have to implement a --composefs option for bootc switch --composefs as the /var state can stay as is and only the /etc state needs to be created in the new location.

    The composefs repo would live on the side, duplicating storage for a while until all ostree refs are gone.

  5. cgwalters commented on May 4, 2026

    @cgwalters
    Member

    What happens if you just boot install to-existing-root --composefs-backend ? I assume it’s gonna blow up my install, but I am definitely curious.

    Yes, we're not CI testing that right now but we should - at a minimum it should definitely not break things, just a clean error.

    More importantly: I think that should also be the API/interface, not switch.

    /var state can stay as is

    Hmm, like a symlink from composefs location to ostree? If we did that then we'd need to be somewhat careful about GC later - from ostree's PoV it'd be an orphaned stateroot if there are no deployments. But we don't auto-delete stateroots right now.

    That said what seems cleanest is to move it once there's no ostree deployments left referencing it.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions