<div dir="ltr"><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"></blockquote>Hi Fajar, all,<div><br></div><div>Thanks for your reply.</div><div><br><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">On Sun, Jan 29, 2017 at 4:04 AM, Frans Meulenbroeks <<br>fransmeulenbroeks at <a href="http://gmail.com">gmail.com</a>> wrote:<br>> Hi,<br>><br>> I'm working on migrating from LXC 1.x to LXC 2.<br>> While doing so I bumped upon the following issue:<br>><br>> My containers are short-lived (say an hour or so).<br>> In LXC 1 we used an overlay filesystem in order to speed up the lxc create.<br>> However I understood LXC 2 does not have this capability.<br>><br><br>Where did you read that?<br></blockquote>Here: <a href="https://github.com/lxc/lxd/issues/1878">https://github.com/lxc/lxd/issues/1878</a> see the response of Stephane. Of course this reply is almost 10 months old.<br><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><br>> Any idea how to create containers quickly and efficiently in LXC 2<br>><br>> Complication is that at some times we have a fair amount of containers<br>> alive (say around 50), so creating all containers and reverting to a<br>> snapshot is probably not efficient<br>><br>Why is it not efficient?<br></blockquote>I'm worried about disk storage and creation time, but I noticed your suggestion below.<br><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><br>> (apart from the space taken up by the 50 rootfs-es).<br>><br>> Thanks in advance for any suggestions how to tacke this!<br>><br><br>I'm pretty sure you can still use overlayfs with lxc-2.<br>My suggestion though, is go with lxd and zfs instead. You can have a<br>"golden" container, keep it stopped, and simply create your other<br>containers with "lxc copy". With zfs, the "copy" process will be instaneus,<br>and the "clone" will be its own filesystem (no lower/base directory<br>restriction like in aufs/overlayfs).<br></blockquote>Ah ok, currently we already have a golden container from which we derive new containers using aufs.</div><div><div>I've just tried the above and it works like a charm!</div></div><div><br></div><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">If you need to modify the "golden" container (which will affect all NEW<br>containers copied from it), simply start it and perform-your-changes like<br>on a normal container (don't forget to stop it afterwards). Note that this<br>is different from aufs/overlayfs, where generally you shouldn't touch the<br>lower/base directory.<br></blockquote>Yeah I am aware of the latter. We always have to take care in lxc-1 when updating the golden container that no instances were running.</div><div><br></div><div>This is great info! Thanks again!</div><div>Frans</div><div><br></div><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">--<br> Fajar</blockquote></div></div>