Skip to content

tmpfiles.d support creating btrfs subvolumes on ostree systems #18502

Closed
@AdrianVovk

Description

@AdrianVovk

Is your feature request related to a problem? Please describe.
I'd like tmpfiles to create a few btrfs subvolumes for me when booting from an empty /var. Problem is, on OSTree systems, / is not considered to be a btrfs subvolume, and so v/q/Q ends up creating basic directories instead of subvolumes. I put the real system root into a subvolume, and at runtime that ends up being put into /sysroot (which is considered to be a subvolume)

Describe the solution you'd like
I think a few options would work well for my use case:
A) Somehow detect this case (/sysroot is a subvolume, /run/ostree-booted, things like that)
B) Create a way to override this check in a system (maybe a drop-in that sets an environment variable on systemd-tmpfiles-setup.service or a config file?)
C) Only enforce this check when a container runtime is detected (since it was implemented for container managers that don't know about subvolumes, according to #1915)

Describe alternatives you've considered
A script that creates subvolumes before tmpfiles runs? That seems messy/ugly. Or, OSTree could create subvolumes instead of directories when checking out of the repo and into what eventually gets mounted to /, but that seems overkill (OSTree itself gains nothing from this)

The systemd version you checked that didn't have the feature you are asking for
247

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFE 🎁Request for Enhancement, i.e. a feature requesttmpfiles

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions