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

Stéphane Graber stgraber at ubuntu.com
Fri Sep 7 20:51:23 UTC 2012


On 12-09-05 07:02 PM, Dan Kegel wrote:
> On Wed, Sep 5, 2012 at 3:25 PM, Dan Kegel <dank at kegel.com> wrote:
>> I see Florian asked this a few weeks ago:
>> 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.
> 
> Kinda like the attached patch.  (It's a little dirty.  I'll try to
> send a clean one
> once I've actually used it in production for a while.)

Hi Dan,

Sorry for not replying to this e-mail earlier.

I have now pushed lxc-start-ephemeral to the github staging branch as a
python3 script using the new LXC API rather than as a shell script.

I'll add myself a todo item to port your change to the python version.

Looking at it, it shouldn't be too difficult to do, though I'm not sure
how that option should work when you have more than one overlayfs (when
you have bind mount entries in the source container's fstab).


-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 897 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20120907/27fbc876/attachment.pgp>


More information about the lxc-users mailing list