Replies: 1 comment 1 reply
-
This can only be solved if mkfs.btrfs from btrfs-progs learns to optionally set nocow on subvolumes it creates. We can then extend systemd-repart to allow setting nocow for subvolumes created via Subvolumes=. If I understand correctly you have some colleagues that are btrfs developers so maybe you can get them to add this to mkfs.btrfs. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Maybe this is not a topic for
mkosi
, but forsystemd-repart
. Sorry if this is the case and I am posting in the wrong forum.I am building images that use subvolumes created by
systemd-repart
. For each subvolume, a new directory is created. There is one subvolume that is special:/@/var
. This should be marched as a non-cow, and this is usually done withchatrr +C
.The documentation advise that this is very time sensitive, and if in
btrfs
this attribute is set to a subvolume that is already populated, there is no guarantee how this content will behave. So this attribute needs to be set just when the subvolume is created and is still empty.Reading the documentation for systemd-repart seems that those extra attributes should be applied with
systemd-tmpfiles
, using theh
type. IIUC this should be done after the image is created.The problem is that the buildroot generated by mkosi is already populating some content for /var, so when systemd-repart runs and see the
CopyFiles=
, it will populate /var before there is a chance to set this +C attribute.How can this be resolved? Some ideas:
Beta Was this translation helpful? Give feedback.
All reactions