Quoting Fajar A. Nugraha (l...@fajar.net): > On Thu, Oct 25, 2012 at 4:11 PM, 宣铭艺 <xuanmin...@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".
-B option to lxc-create specifies the backing store type. sudo lxc-create -t ubuntu -B lvm -n u1 will default to 500M rootfs with ext4, or sudo lxc-create -t ubuntu -B lvm -n u1 --fssize 2G --fstype xfs -serge ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users