[lxc-users] LXD/LXC 2.12 - LVM Backed Storage - Grow Pools/Volumes
Reto Gantenbein
reto.gantenbein at linuxmonk.ch
Fri May 19 15:50:21 UTC 2017
Hi Neil
As far as I understood, the volume.size doesn't modify the actual pool
size but only tells LXD how large new container volumes will be
created. Not sure if you can actually resize the LVM pool volume
through LXD at all.
To do it via plain LVM commands first check the name of your pool LV.
This can be done via:
lxc storage get lxc-vg lvm.thinpool_name
I'm not sure if this will output anything in case you created the pool
through `lxc` with the default naming. Otherwise find the LV via `lvs`
command. Once you know the pool LV name, resize it with:
lvresize -L40G lxc-vg/THIN-POOL-LV
For resizing the container LV, run:
lvresize -L20G -r lxc-vg/containers_minecraft
Cheers, Reto
On Fri, 2017-03-31 at 16:48 -0500, Neil Bowers wrote:
> I'm having some trouble growing my LVM-backed storage after the
> defaults were set.
>
> I do think I've managed to increase the total size of the pool using:
>
> lxc storage set lxc-vg volume.size 40GB
>
> as lxc storage get lxc-vg volume.size now reports 40GB instead of
> 20GB.
>
> So if I'm understanding the documentation correctly, this should
> expand the total storage of the lxc-vg pool to 40GB (side note: if
> that's what 'volume.size' does, shouldn't it really be 'pool.size' as
> it's a pool level property, not a volume level one?), and now I want
> to resize the pool of my container.
>
> But when I attempt to do so with:
>
> lxc storage volume set lxc-vg container/minecraft size 20GB
>
> I get "error: The properties "[size]" cannot be changed."
>
> Does changing the size require the container to be stopped? It's in
> production, so I haven't stopped it to test.
>
> If not, then how do I increase the available storage to the
> container?
>
> _______________________________________________
> 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