[Lxc-users] Ephemeral disk space redux: adding --overlaydir option to lxc-start-ephemeral?

Dan Kegel dank at kegel.com
Wed Sep 5 22:25:52 UTC 2012


I see Florian asked this a few weeks ago:
http://sourceforge.net/mailarchive/forum.php?thread_name=500ECF6C.5020709%40ubuntu.com&forum_name=lxc-users

I just hit the same problem.  I had been hoping to install a bunch of
packages inside the ephemeral container, and of course now I'm
running out of disk space.

So that's one more requirement discovered: I need lxc-start-ephemeral
to support nontrivial amounts of disk storage, more than will
fit in tmpfs.

Maybe I'll add an argument "--overlaydir PATH" for where to store the files;
if that's set, setup_container() will use that rather than doing
    OVERLAY_DIR=`mktemp -d /tmp/lxc-lp-XXXXXXX`
    sudo mount -t tmpfs none $OVERLAY_DIR

For safety, I would create a subdirectory inside the specified directory,
and use that for $OVERLAY_DIR.  That would let me clean up
that directory before and after runs without worrying about
accidentally destroying the host system if the user makes a typo.




More information about the lxc-users mailing list