[systemd-devel] systemd-tmpfiles subvolume handling vs. changing default btrfs root

Lennart Poettering lennart at poettering.net
Wed Jun 27 14:34:08 UTC 2018


On Mi, 27.06.18 15:50, Ignaz Forster (iforster at suse.de) wrote:

> > By recursive snaphots I really mean recursive snapshots, i.e. if you
> > have a subvolume called `/foobar` and there's a subvolume below it
> > called `/foobar/var`, and you'd make a snapshot of `/foobar` and call
> > it `/foobar2`, then this would implicitly also have the effect of
> > snapshotting `/foobar/var` and calling it `/foobar2/var`, so that each
> > snapshot is always "complete".
> 
> Ah, I see - no, that's not the problem here.
> The subvolumes are there because we do *not* want to snapshot them.
> 
> It's guess it's best to just ignore the second bullet point - it's a follow
> up problem, but it isn't really important for the main point: Attaching a
> new subvolume to a snapshot.

I still don't grok this. What's the precise problem then?

The assumption systemd-tmpfiles makes is always that the subvolumes
it implicitly creates for you if they are missing are associated
with the subvolume they are created below, and that this means they
are snapshotted, removed and otheerwise managed along with them.

systemd will never create disassociated subvolumes for you. If you
want that use some other tools, but tmpfiles is not really supposed to
do complex stuff like that.

But quite frankly I don't grok the problem at hand, i.e. what you are
trying to do, even. 

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list