Hi, i am trying to create an lxc container with lvm instead of dir. but i krep getting error; please advice.
sudo lxc-create -n test -t ubuntu --bdev lvm
Volume group "lxc" not found
Cannot process volume group lxc
lxc-create: storage/lvm.c: lvm_create: 421 Error creating new lvm blockdev /dev/lxc/test size 1073741824 bytes
lxc-create: lxccontainer.c: do_storage_create: 1172 Failed to create backing store type lvm
lxc-create: lxccontainer.c: do_lxcapi_create: 1649 Error creating backing store type lvm for test
lxc-create: tools/lxc_create.c: main: 326 Error creating container test
sudo lxc-create -n test -t ubuntu --bdev lvm --lvname test --vgname test --fstype ext4 --fssize 10G
Volume group "test" not found
Cannot process volume group test
lxc-create: storage/lvm.c: lvm_create: 421 Error creating new lvm blockdev /dev/test/test size 10737418240 bytes
lxc-create: lxccontainer.c: do_storage_create: 1172 Failed to create backing store type lvm
lxc-create: lxccontainer.c: do_lxcapi_create: 1649 Error creating backing store type lvm for test
lxc-create: tools/lxc_create.c: main: 326 Error creating container test
sudo lxc-create -n test -t ubuntu --bdev lvm --lvname test --vgname test --fstype ext4 --fssize 10G --logfile=logger --logpriority=DEBUG
Volume group "test" not found
Cannot process volume group test
lxc-create: storage/lvm.c: lvm_create: 421 Error creating new lvm blockdev /dev/test/test size 10737418240 bytes
lxc-create: lxccontainer.c: do_storage_create: 1172 Failed to create backing store type lvm
lxc-create: lxccontainer.c: do_lxcapi_create: 1649 Error creating backing store type lvm for test
lxc-create: tools/lxc_create.c: main: 326 Error creating container test
user:~> cat logger
lxc-create 20180730162419.133 INFO lvm - storage/lvm.c:do_lvm_create:108 - got 0 for thin pool at path: /dev/test/lxc
lxc-create 20180730162419.138 ERROR lvm - storage/lvm.c:lvm_create:421 - Error creating new lvm blockdev /dev/test/test size 10737418240 bytes
lxc-create 20180730162419.138 ERROR lxc_container - lxccontainer.c:do_storage_create:1172 - Failed to create backing store type lvm
lxc-create 20180730162419.138 ERROR lxc_container - lxccontainer.c:do_lxcapi_create:1649 - Error creating backing store type lvm for test
lxc-create 20180730162419.138 ERROR lxc_create_ui - tools/lxc_create.c:main:326 - Error creating container test
The volume group you’re specifying and in which the new logical volume is supposed to be created needs to exist. LXC will currently not create it itself.
bare with me, can you guide me how to make it happen?
what is the right way isolating the container files? is it lvm or qcow2 or its already isolated with dir?
if it happen you know how creating a container using qcow2, please example me?
Thanks.