Mailinglist Archive: opensuse-factory (988 mails)

< Previous Next >
[opensuse-factory] systemd, btrfs, /var/lib/machines
  • From: Chris Murphy <lists@xxxxxxxxxxxxxxxxx>
  • Date: Wed, 15 Jul 2015 22:05:44 -0600
  • Message-id: <>
Starting with systemd 219, it automatically creates subvolumes for
nspawn containers at /var/lib/machines. And there's also an commit
sometime in March/April that brings snapshot and rollback control of
containers into machinectl which leverages btrfs snapshotting.

Has anyone using Factory looked at how snapper behaves when doing
rollbacks? I'm pretty sure the following will happen:

The snapshot of the top level of the file system done by snapper will
stop at /var/lib/machines/ and not include any of the subvolumes in
it. That's not the problem though. The problem happens if you do a
rollback, and of course now the /var/lib/machines directory will be
empty. All of your containers are in a different subvolume.

I don't think it's snappers job to do a recursive snapshot in order to
make sure these containers are present in every snapshot. This
explodes the number of subvolumes. It duplicates snapshotting (both
machinectl and snapper).

I think this is "yet another example" of why nested subvolumes usually
aren't a good idea. There probably should be a systemd-machines
subvolume at the top level of the file system, which is added to fstab
to mount it at /var/lib/machines. And then snapper needs a way to know
to exclude systemd-machines from its snapshotting management.

Chris Murphy
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-factory+owner@xxxxxxxxxxxx

< Previous Next >