On Sun, Jan 29, 2017 at 4:04 AM, Frans Meulenbroeks < fransmeulenbro...@gmail.com> wrote:
> Hi, > > I'm working on migrating from LXC 1.x to LXC 2. > While doing so I bumped upon the following issue: > > My containers are short-lived (say an hour or so). > In LXC 1 we used an overlay filesystem in order to speed up the lxc create. > However I understood LXC 2 does not have this capability. > Where did you read that? > Any idea how to create containers quickly and efficiently in LXC 2 > > Complication is that at some times we have a fair amount of containers > alive (say around 50), so creating all containers and reverting to a > snapshot is probably not efficient > Why is it not efficient? > (apart from the space taken up by the 50 rootfs-es). > > Thanks in advance for any suggestions how to tacke this! > I'm pretty sure you can still use overlayfs with lxc-2. My suggestion though, is go with lxd and zfs instead. You can have a "golden" container, keep it stopped, and simply create your other containers with "lxc copy". With zfs, the "copy" process will be instaneus, and the "clone" will be its own filesystem (no lower/base directory restriction like in aufs/overlayfs). If you need to modify the "golden" container (which will affect all NEW containers copied from it), simply start it and perform-your-changes like on a normal container (don't forget to stop it afterwards). Note that this is different from aufs/overlayfs, where generally you shouldn't touch the lower/base directory. -- Fajar
_______________________________________________ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users