[lxc-users] LXD_LVM_LVSIZE envvar usage

Tycho Andersen tycho.andersen at canonical.com
Tue Mar 15 22:40:41 UTC 2016


On Mon, Mar 14, 2016 at 05:40:56PM +0100, Fabrizio Furnari wrote:
> I wrote in /etc/init/lxd.conf:
> 
> env LXD_LVM_LVSIZE="1GiB"
> 
> cat /proc/2343/environ
> UPSTART_INSTANCE=LXD_LVM_LVSIZE=1GiBUPSTART_JOB=lxdTERM=linuxPATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
> 
> So the envvar seems correctly set for the process.
> 
> Also the syntax "1GiB" should be ok, considering the test scripts from
> GH....

Sounds like it might be time to file a bug then. Can you file it with
steps to reproduce?

Thanks!

Tycho

> 
> 
> 
> On Mon, Mar 14, 2016 at 5:08 PM, Tycho Andersen <
> tycho.andersen at canonical.com> wrote:
> 
> > On Mon, Mar 14, 2016 at 04:55:21PM +0100, Fabrizio Furnari wrote:
> > > I've also tried to export it into the /etc/init.d/lxd script in the same
> > > way, but seems not to apply...Is it possible that applies only during the
> > > LV thinpool creation time (LXDPool)?
> >
> > Based on my read of the code it should be applied on every `lvcreate`.
> > You might check:
> >
> > strings /proc/`pidof lxd`/environ
> >
> > to make sure it actually got set, though.
> >
> > Tycho
> >
> > > On Mon, Mar 14, 2016 at 4:51 PM, Tycho Andersen <
> > > tycho.andersen at canonical.com> wrote:
> > >
> > > > On Mon, Mar 14, 2016 at 03:14:31PM +0100, Fabrizio Furnari wrote:
> > > > > Hi all,
> > > > > I've just seen that in the latest RC developers added the
> > possibility to
> > > > > specify the LV size when creating new containers.
> > > > > I've updated to 2.0.0~rc3-0ubuntu1~ubuntu14.04.1~ppa1 on my Ubuntu
> > box
> > > > but
> > > > > when I try for example:
> > > > >
> > > > > $ export LXD_LVM_LVSIZE="1GiB"
> > > > > $ lxc launch 0d07f11f3f2a testcontainer
> > > > > $ lvdisplay
> > > > >
> > > >
> > /dev/vg0/0d07f11f3f2a0804f501967d278d72a8122b1ec49f01aae4483a41fd9fb546f3 |
> > > > > grep Size
> > > > >
> > > > >   LV Size                10.00 GiB
> > > > >
> > > > > Still uses the default value. What I have to do to set it?
> > > >
> > > > It needs to be set in LXD's environment, not the client's.
> > > > _______________________________________________
> > > > lxc-users mailing list
> > > > lxc-users at lists.linuxcontainers.org
> > > > http://lists.linuxcontainers.org/listinfo/lxc-users
> >
> > > _______________________________________________
> > > lxc-users mailing list
> > > lxc-users at lists.linuxcontainers.org
> > > http://lists.linuxcontainers.org/listinfo/lxc-users
> >
> > _______________________________________________
> > lxc-users mailing list
> > lxc-users at lists.linuxcontainers.org
> > http://lists.linuxcontainers.org/listinfo/lxc-users
> >

> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users



More information about the lxc-users mailing list