Discussion:
[lxc-users] How to set default volume size using the "volume.size" property on the pool
Kees Bakker
2018-09-13 08:19:44 UTC
Permalink
Hey,

Forgive my ignorance, but how would you do that? I have a setup with LVM
and the default volume size is 10G. I wish to increase that default,
what would be the command syntax? Also I want to see the current
default settings, just so I know I'm on the right track.

My pool is called "local".

# lxc storage show local
config:
  lvm.thinpool_name: LXDThinPool
  lvm.vg_name: local
description: ""
name: local
driver: lvm
used_by:
- /1.0/containers/bionic01
- /1.0/containers/kanboard
- /1.0/containers/license4
- /1.0/containers/usrv1
- /1.0/containers/usrv1/snapshots/after-aptinstall-freeipa
- /1.0/images/7079d12b3253102b829d0fdd6f1f693a1654057ec054542e9e7506c7cf54fa2e
- /1.0/images/c395a7105278712478ec1dbfaab1865593fc11292f99afe01d5b94f1c34a9a3a
- /1.0/profiles/default
- /1.0/profiles/default_pub
- /1.0/profiles/testprof
status: Created
locations:
- maas

There is no volume.size. Should I just add it?
--
Kees
Kees Bakker
2018-09-24 06:56:30 UTC
Permalink
This is still unanswered.

How do I set the default volume size of the storage pool?
Post by Kees Bakker
Hey,
Forgive my ignorance, but how would you do that? I have a setup with LVM
and the default volume size is 10G. I wish to increase that default,
what would be the command syntax? Also I want to see the current
default settings, just so I know I'm on the right track.
My pool is called "local".
# lxc storage show local
  lvm.thinpool_name: LXDThinPool
  lvm.vg_name: local
description: ""
name: local
driver: lvm
- /1.0/containers/bionic01
- /1.0/containers/kanboard
- /1.0/containers/license4
- /1.0/containers/usrv1
- /1.0/containers/usrv1/snapshots/after-aptinstall-freeipa
- /1.0/images/7079d12b3253102b829d0fdd6f1f693a1654057ec054542e9e7506c7cf54fa2e
- /1.0/images/c395a7105278712478ec1dbfaab1865593fc11292f99afe01d5b94f1c34a9a3a
- /1.0/profiles/default
- /1.0/profiles/default_pub
- /1.0/profiles/testprof
status: Created
- maas
There is no volume.size. Should I just add it?
Kees Bakker
2018-09-25 14:11:05 UTC
Permalink
This is a follow up of https://github.com/lxc/lxd/issues/5069
(( Sorry for creating the issue, Stéphane. I thought that "issues"
were not just for bugs. ))

You said: "lxc profile set default root size 50GB should do the trick"

Alas, ...

***@maas:~# lxc profile set default root size 50GB
Description:
  Set profile configuration keys

Usage:
  lxc profile set [<remote>:]<profile> <key> <value> [flags]

Global Flags:
      --debug         Show all debug messages
      --force-local   Force using the local unix socket
  -h, --help          Print help
  -v, --verbose       Show all information messages
      --version       Print version number
Error: Invalid number of arguments

Furthermore.
Somewhere else I read your suggestion to set volume.size but
I was not able to get anything useful result. I did set the
volume,size of my storage pool, but new containers were still
created with the 10GB default.

And, perhaps related, if I have a container with a bigger volume than 10GB,
then it fails to copy that container. (Copying that container to another LXD
server with BTRFS, succeeds without problem.)

Notice that I'm using LVM storage, on Ubuntu 18.04 with LXD/LXC 3.0.1
-- Kees
Post by Kees Bakker
This is still unanswered.
How do I set the default volume size of the storage pool?
Post by Kees Bakker
Hey,
Forgive my ignorance, but how would you do that? I have a setup with LVM
and the default volume size is 10G. I wish to increase that default,
what would be the command syntax? Also I want to see the current
default settings, just so I know I'm on the right track.
My pool is called "local".
# lxc storage show local
  lvm.thinpool_name: LXDThinPool
  lvm.vg_name: local
description: ""
name: local
driver: lvm
- /1.0/containers/bionic01
- /1.0/containers/kanboard
- /1.0/containers/license4
- /1.0/containers/usrv1
- /1.0/containers/usrv1/snapshots/after-aptinstall-freeipa
- /1.0/images/7079d12b3253102b829d0fdd6f1f693a1654057ec054542e9e7506c7cf54fa2e
- /1.0/images/c395a7105278712478ec1dbfaab1865593fc11292f99afe01d5b94f1c34a9a3a
- /1.0/profiles/default
- /1.0/profiles/default_pub
- /1.0/profiles/testprof
status: Created
- maas
There is no volume.size. Should I just add it?
_______________________________________________
lxc-users mailing list
http://lists.linuxcontainers.org/listinfo/lxc-users
Stéphane Graber
2018-09-25 15:01:29 UTC
Permalink
No worries, we tend to prefer support requests to go here or to
https://discuss.linuxcontainers.org

The command should have actually been:

lxc profile device set default root size 50GB
Post by Kees Bakker
This is a follow up of https://github.com/lxc/lxd/issues/5069
(( Sorry for creating the issue, Stéphane. I thought that "issues"
were not just for bugs. ))
You said: "lxc profile set default root size 50GB should do the trick"
Alas, ...
  Set profile configuration keys
  lxc profile set [<remote>:]<profile> <key> <value> [flags]
      --debug         Show all debug messages
      --force-local   Force using the local unix socket
  -h, --help          Print help
  -v, --verbose       Show all information messages
      --version       Print version number
Error: Invalid number of arguments
Furthermore.
Somewhere else I read your suggestion to set volume.size but
I was not able to get anything useful result. I did set the
volume,size of my storage pool, but new containers were still
created with the 10GB default.
And, perhaps related, if I have a container with a bigger volume than 10GB,
then it fails to copy that container. (Copying that container to another LXD
server with BTRFS, succeeds without problem.)
Notice that I'm using LVM storage, on Ubuntu 18.04 with LXD/LXC 3.0.1
-- Kees
Post by Kees Bakker
This is still unanswered.
How do I set the default volume size of the storage pool?
Post by Kees Bakker
Hey,
Forgive my ignorance, but how would you do that? I have a setup with LVM
and the default volume size is 10G. I wish to increase that default,
what would be the command syntax? Also I want to see the current
default settings, just so I know I'm on the right track.
My pool is called "local".
# lxc storage show local
  lvm.thinpool_name: LXDThinPool
  lvm.vg_name: local
description: ""
name: local
driver: lvm
- /1.0/containers/bionic01
- /1.0/containers/kanboard
- /1.0/containers/license4
- /1.0/containers/usrv1
- /1.0/containers/usrv1/snapshots/after-aptinstall-freeipa
- /1.0/images/7079d12b3253102b829d0fdd6f1f693a1654057ec054542e9e7506c7cf54fa2e
- /1.0/images/c395a7105278712478ec1dbfaab1865593fc11292f99afe01d5b94f1c34a9a3a
- /1.0/profiles/default
- /1.0/profiles/default_pub
- /1.0/profiles/testprof
status: Created
- maas
There is no volume.size. Should I just add it?
_______________________________________________
lxc-users mailing list
http://lists.linuxcontainers.org/listinfo/lxc-users
_______________________________________________
lxc-users mailing list
http://lists.linuxcontainers.org/listinfo/lxc-users
--
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
Kees Bakker
2018-09-26 07:20:02 UTC
Permalink
Thanks, that works.

Next, how do I change the volume size of an existing container?
Post by Stéphane Graber
No worries, we tend to prefer support requests to go here or to
https://discuss.linuxcontainers.org
lxc profile device set default root size 50GB
Post by Kees Bakker
This is a follow up of https://github.com/lxc/lxd/issues/5069
(( Sorry for creating the issue, Stéphane. I thought that "issues"
were not just for bugs. ))
You said: "lxc profile set default root size 50GB should do the trick"
Alas, ...
  Set profile configuration keys
  lxc profile set [<remote>:]<profile> <key> <value> [flags]
      --debug         Show all debug messages
      --force-local   Force using the local unix socket
  -h, --help          Print help
  -v, --verbose       Show all information messages
      --version       Print version number
Error: Invalid number of arguments
Furthermore.
Somewhere else I read your suggestion to set volume.size but
I was not able to get anything useful result. I did set the
volume,size of my storage pool, but new containers were still
created with the 10GB default.
And, perhaps related, if I have a container with a bigger volume than 10GB,
then it fails to copy that container. (Copying that container to another LXD
server with BTRFS, succeeds without problem.)
Notice that I'm using LVM storage, on Ubuntu 18.04 with LXD/LXC 3.0.1
-- Kees
Post by Kees Bakker
This is still unanswered.
How do I set the default volume size of the storage pool?
Post by Kees Bakker
Hey,
Forgive my ignorance, but how would you do that? I have a setup with LVM
and the default volume size is 10G. I wish to increase that default,
what would be the command syntax? Also I want to see the current
default settings, just so I know I'm on the right track.
My pool is called "local".
# lxc storage show local
  lvm.thinpool_name: LXDThinPool
  lvm.vg_name: local
description: ""
name: local
driver: lvm
- /1.0/containers/bionic01
- /1.0/containers/kanboard
- /1.0/containers/license4
- /1.0/containers/usrv1
- /1.0/containers/usrv1/snapshots/after-aptinstall-freeipa
- /1.0/images/7079d12b3253102b829d0fdd6f1f693a1654057ec054542e9e7506c7cf54fa2e
- /1.0/images/c395a7105278712478ec1dbfaab1865593fc11292f99afe01d5b94f1c34a9a3a
- /1.0/profiles/default
- /1.0/profiles/default_pub
- /1.0/profiles/testprof
status: Created
- maas
There is no volume.size. Should I just add it?
_______________________________________________
lxc-users mailing list
http://lists.linuxcontainers.org/listinfo/lxc-users
_______________________________________________
lxc-users mailing list
http://lists.linuxcontainers.org/listinfo/lxc-users
_______________________________________________
lxc-users mailing list
http://lists.linuxcontainers.org/listinfo/lxc-users
Stéphane Graber
2018-09-26 12:10:16 UTC
Permalink
You set the size property on the root device of the container, then
restart the container, that should cause LXD to resize it on startup.
Post by Kees Bakker
Thanks, that works.
Next, how do I change the volume size of an existing container?
Post by Stéphane Graber
No worries, we tend to prefer support requests to go here or to
https://discuss.linuxcontainers.org
lxc profile device set default root size 50GB
Post by Kees Bakker
This is a follow up of https://github.com/lxc/lxd/issues/5069
(( Sorry for creating the issue, Stéphane. I thought that "issues"
were not just for bugs. ))
You said: "lxc profile set default root size 50GB should do the trick"
Alas, ...
  Set profile configuration keys
  lxc profile set [<remote>:]<profile> <key> <value> [flags]
      --debug         Show all debug messages
      --force-local   Force using the local unix socket
  -h, --help          Print help
  -v, --verbose       Show all information messages
      --version       Print version number
Error: Invalid number of arguments
Furthermore.
Somewhere else I read your suggestion to set volume.size but
I was not able to get anything useful result. I did set the
volume,size of my storage pool, but new containers were still
created with the 10GB default.
And, perhaps related, if I have a container with a bigger volume than 10GB,
then it fails to copy that container. (Copying that container to another LXD
server with BTRFS, succeeds without problem.)
Notice that I'm using LVM storage, on Ubuntu 18.04 with LXD/LXC 3.0.1
-- Kees
Post by Kees Bakker
This is still unanswered.
How do I set the default volume size of the storage pool?
Post by Kees Bakker
Hey,
Forgive my ignorance, but how would you do that? I have a setup with LVM
and the default volume size is 10G. I wish to increase that default,
what would be the command syntax? Also I want to see the current
default settings, just so I know I'm on the right track.
My pool is called "local".
# lxc storage show local
  lvm.thinpool_name: LXDThinPool
  lvm.vg_name: local
description: ""
name: local
driver: lvm
- /1.0/containers/bionic01
- /1.0/containers/kanboard
- /1.0/containers/license4
- /1.0/containers/usrv1
- /1.0/containers/usrv1/snapshots/after-aptinstall-freeipa
- /1.0/images/7079d12b3253102b829d0fdd6f1f693a1654057ec054542e9e7506c7cf54fa2e
- /1.0/images/c395a7105278712478ec1dbfaab1865593fc11292f99afe01d5b94f1c34a9a3a
- /1.0/profiles/default
- /1.0/profiles/default_pub
- /1.0/profiles/testprof
status: Created
- maas
There is no volume.size. Should I just add it?
_______________________________________________
lxc-users mailing list
http://lists.linuxcontainers.org/listinfo/lxc-users
_______________________________________________
lxc-users mailing list
http://lists.linuxcontainers.org/listinfo/lxc-users
_______________________________________________
lxc-users mailing list
http://lists.linuxcontainers.org/listinfo/lxc-users
_______________________________________________
lxc-users mailing list
http://lists.linuxcontainers.org/listinfo/lxc-users
--
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
Kees Bakker
2018-09-26 13:26:15 UTC
Permalink
Ah, OK. Thanks.

I just happened to do just that. I was a little surprised that
it changed all containers. I can't yet oversee all consequences.

For now I will create new profiles for containers that need larger
volumes. Luckily, lxd allows me to change a containers profile
and it will adjust their volumes accordingly. Great.

lxc profile copy default bigvol
lxc profile set bigvol root.size 500GB
lxc stop somecontainer
lxc config edit somecontainer  (change profile to "bigvol")
Post by Stéphane Graber
You set the size property on the root device of the container, then
restart the container, that should cause LXD to resize it on startup.
Post by Kees Bakker
Thanks, that works.
Next, how do I change the volume size of an existing container?
Post by Stéphane Graber
No worries, we tend to prefer support requests to go here or to
https://discuss.linuxcontainers.org
lxc profile device set default root size 50GB
Post by Kees Bakker
This is a follow up of https://github.com/lxc/lxd/issues/5069
(( Sorry for creating the issue, Stéphane. I thought that "issues"
were not just for bugs. ))
You said: "lxc profile set default root size 50GB should do the trick"
Alas, ...
  Set profile configuration keys
  lxc profile set [<remote>:]<profile> <key> <value> [flags]
      --debug         Show all debug messages
      --force-local   Force using the local unix socket
  -h, --help          Print help
  -v, --verbose       Show all information messages
      --version       Print version number
Error: Invalid number of arguments
Furthermore.
Somewhere else I read your suggestion to set volume.size but
I was not able to get anything useful result. I did set the
volume,size of my storage pool, but new containers were still
created with the 10GB default.
And, perhaps related, if I have a container with a bigger volume than 10GB,
then it fails to copy that container. (Copying that container to another LXD
server with BTRFS, succeeds without problem.)
Notice that I'm using LVM storage, on Ubuntu 18.04 with LXD/LXC 3.0.1
-- Kees
Post by Kees Bakker
This is still unanswered.
How do I set the default volume size of the storage pool?
Post by Kees Bakker
Hey,
Forgive my ignorance, but how would you do that? I have a setup with LVM
and the default volume size is 10G. I wish to increase that default,
what would be the command syntax? Also I want to see the current
default settings, just so I know I'm on the right track.
My pool is called "local".
# lxc storage show local
  lvm.thinpool_name: LXDThinPool
  lvm.vg_name: local
description: ""
name: local
driver: lvm
- /1.0/containers/bionic01
- /1.0/containers/kanboard
- /1.0/containers/license4
- /1.0/containers/usrv1
- /1.0/containers/usrv1/snapshots/after-aptinstall-freeipa
- /1.0/images/7079d12b3253102b829d0fdd6f1f693a1654057ec054542e9e7506c7cf54fa2e
- /1.0/images/c395a7105278712478ec1dbfaab1865593fc11292f99afe01d5b94f1c34a9a3a
- /1.0/profiles/default
- /1.0/profiles/default_pub
- /1.0/profiles/testprof
status: Created
- maas
There is no volume.size. Should I just add it?
_______________________________________________
lxc-users mailing list
http://lists.linuxcontainers.org/listinfo/lxc-users
_______________________________________________
lxc-users mailing list
http://lists.linuxcontainers.org/listinfo/lxc-users
_______________________________________________
lxc-users mailing list
http://lists.linuxcontainers.org/listinfo/lxc-users
_______________________________________________
lxc-users mailing list
http://lists.linuxcontainers.org/listinfo/lxc-users
_______________________________________________
lxc-users mailing list
http://lists.linuxcontainers.org/listinfo/lxc-users
Loading...