[systemd-devel] install Fedora systemd-nspawn container on btrfs

Lennart Poettering lennart at poettering.net
Thu Apr 23 05:00:02 PDT 2015


On Thu, 23.04.15 14:57, Andrei Borzenkov (arvidjaar at gmail.com) wrote:

> On Thu, Apr 23, 2015 at 2:50 PM, Lennart Poettering
> <lennart at poettering.net> wrote:
> > On Thu, 23.04.15 13:45, arnaud gaboury (arnaud.gaboury at gmail.com) wrote:
> >
> >> Not sure what I did wrong, but I can't install/boot my nspawn container.
> >> Here is my setup:
> >>
> >> Archlinux box- updated
> >>
> >> 1- created 3 btrfs subvol on /dev/sdb1 (SSD). The goal is to manage
> >> snapshots easily.
> >> no nested subvol.
> >> ------------------------------------------
> >> # btrfs subvolume list .
> >> ID 266 gen 39 top level 5 path rootvol
> >> ID 268 gen 41 top level 5 path var
> >> ID 269 gen 42 top level 5 path etc
> >> # btrfs filesystem show
> >> Label: 'poppy-root'  uuid: ef1b44cd-e7b0-4166-b933-e7d4d20a1171
> >>     Total devices 1 FS bytes used 64.00KiB
> >>     devid    1 size 80.00GiB used 12.00MiB path /dev/sdb1
> >> --------------------------------------------------
> >>
> >> 2 - mount btrfs subvol
> >> -------------------------------------------------------------------
> >> # mount -t btrfs -o subvol=rootvol /dev/sdb1 /var/lib/machines/enl
> >> # mkdir /var/lib/machines/enl/var
> >> # mkdir /var/lib/machines/enl/etc
> >> # mount -t btrfs -o subvol=etc /dev/sdb1 /var/lib/machines/enl/etc
> >> # mount -t btrfs -o subvol=var /dev/sdb1 /var/lib/machines/enl/var
> >> --------------------------------------------------------------------
> >
> > THis isn't really how one would normally use subvolumes. No need to
> > mount each subvolume explicitly, they are just special directories...
> 
> As long as you never clone parent volume (but why use btrfs then?) As
> soon as you create clone or snapshot of parent volume, all childs will
> be out of place in it unless you explicitly mount them in correct
> place in hierarchy.

Hmm? not following. The "btrfs" tool surely doesn't do recursive
snapshots currently. But it doesn't reinstate mount points either (or
even makes them persistent), hence I really don't get what you are
saying.

(note that machined's clone command in git *does* recursive snapshots)

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list