Re: [systemd-devel] systemd-nspawn overlay and rootfs

2016-08-19 Thread Lennart Poettering
On Fri, 19.08.16 13:18, Juanjo Presa (juan...@gmail.com) wrote:

> Ok, thanks for your reply.
> 
> Any suggestion to achieve something similar? I'm trying with btrfs
> subvolumes but I don't get to make union of /usr from OS subvolume with
> /usr from runtime subvolume

btrfs subvolumes and snapshots don't permit you to merge arbitrary
directory trees. They only allow you to make a cheap copy of a
directory tree and then operate on that without affecting the original version.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd-nspawn overlay and rootfs

2016-08-19 Thread Juanjo Presa
Ok, thanks for your reply.

Any suggestion to achieve something similar? I'm trying with btrfs
subvolumes but I don't get to make union of /usr from OS subvolume with
/usr from runtime subvolume

Nowadays I'm workarouding with:

systemd-nspawn
--overlay=/var/lib/machines/os/usr:/var/lib/machines/runtime/usr:/usr -D
/var/lib/machines/os --machine=foo -b -x

On Fri, Aug 19, 2016 at 1:02 PM, Lennart Poettering 
wrote:

> On Tue, 16.08.16 15:43, Juanjo Presa (juan...@gmail.com) wrote:
>
> > Hi, I'm trying to compose a container with several layers and join
> together
> > with overlay option but seems that is not supported.
> >
> > I want to get something like:
> > systemd-nspawn --overlay=/foo/ubuntu-base:/foo/app-runtime:/foo/app:/ -D
> > /foo/bar --boot
> >
> > Maybe I'm misunderstanding the overlay option.
> >
> > So, what do you suggest to accomplish a similar model. Maybe just mount
> the
> > desired overlay sideways in /foo/bar and dismiss systemd-nspawn overlay
> > option? Something similar with btrfs subvolumes?
> >
> > Thanks in advance.
>
> Yeah, we currently do not support overlayfs as root dir, see
>
> https://github.com/systemd/systemd/issues/3847
>
> We should probably make that work. But do note that overlayfs
> introduces as many new problems as it solves IRL... Because of that
> there's no first level support for it in place right now (i.e. no
> support for using it as backing for --ephemeral or so).
>
> Lennart
>
> --
> Lennart Poettering, Red Hat
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd-nspawn overlay and rootfs

2016-08-19 Thread Lennart Poettering
On Tue, 16.08.16 15:43, Juanjo Presa (juan...@gmail.com) wrote:

> Hi, I'm trying to compose a container with several layers and join together
> with overlay option but seems that is not supported.
> 
> I want to get something like:
> systemd-nspawn --overlay=/foo/ubuntu-base:/foo/app-runtime:/foo/app:/ -D
> /foo/bar --boot
> 
> Maybe I'm misunderstanding the overlay option.
> 
> So, what do you suggest to accomplish a similar model. Maybe just mount the
> desired overlay sideways in /foo/bar and dismiss systemd-nspawn overlay
> option? Something similar with btrfs subvolumes?
> 
> Thanks in advance.

Yeah, we currently do not support overlayfs as root dir, see

https://github.com/systemd/systemd/issues/3847

We should probably make that work. But do note that overlayfs
introduces as many new problems as it solves IRL... Because of that
there's no first level support for it in place right now (i.e. no
support for using it as backing for --ephemeral or so).

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel