[Lxc-users] Container Filesystem in a file (loopback mount)

C Anthony Risinger anthony at extof.me
Thu Sep 30 19:21:23 UTC 2010


On Thu, Sep 30, 2010 at 8:05 AM, Gordon Henderson <gordon at drogon.net> wrote:
> On Thu, 30 Sep 2010, Daniel Lezcano wrote:
>
>> On 09/30/2010 11:04 AM, Gordon Henderson wrote:
>>>
>>> Looking to put "hard" limits on a containers filesystem size by creating a
>>> fixed-length file, putting a filesystem in it, loopback mounting it, then
>>> using that as the containers root ...
>>>
>>> I've not tried it yet, but wondering if anyone has done anything like
>>> this? Any pitfalls? (Other than maybe performance)
>>
>> Yep, I tried, no problem.
>
> Great.
>
>> In a near future, we will be able to specify directly the image in
>> lxc.rootfs. The code doing that is ready but there are some problems with the
>> consoles I have to fix before.
>
> Sounds good, thanks!

in the past i used a btrfs filesystem, and put each system in a
subvolume; this let me create templates that were instantly cloneable,
and able to run within seconds.

IIRC, you can't do this right now, but soon you will be able to place
quotas on the subvolumes.  also, you can snapshot them the make a
backup instantly.  just a suggestion, it worked extremely well.

C Anthony




More information about the lxc-users mailing list