[Lxc-users] how to limit disk space in lxc

Fajar A. Nugraha list at fajar.net
Thu Oct 25 09:19:47 UTC 2012


On Thu, Oct 25, 2012 at 4:11 PM, 宣铭艺 <xuanmingyi at gmail.com> wrote:
> Dear all:
> The problem is that,how can we limit the disk space in lxc.Now I use the
> default config.
> And the container can access all space in host.can we use lvm or other tools
> to limit it?
> And how :)

simplest solution: place the container rootfs in an LV.

You need to create and format the LV and move the rootfs MANUALLY
after the container is created though, as AFAIK no template has the
ability to "create a rootfs in an LV of this size".

-- 
Fajar




More information about the lxc-users mailing list