lxc chroot on lvm thin pool?

ned

Renowned Member
Jan 26, 2015
113
2
83
Is this possible? If i try this I get an error

Code:
pct restore 105 /var/lib/vz/dump/vzdump-lxc-100-2016_05_17-14_58_39.tar.lzo --rootfs lvm_pve_thin:0
  --virtualsize may not be zero.
lvcreate 'vg_pve_thin/vm-105-disk-1' error:   Run `lvcreate --help' for more information.

This is possible on local storage with this command

Code:
pct restore 100 /var/lib/vz/dump/vzdump-lxc-100-2016_02_09-15_55_31.tar.lzo --rootfs local:0
 
You need to specify a size (0 is not valid), for example:

Code:
pct restore 105 /var/lib/vz/dump/vzdump-lxc-100-2016_05_17-14_58_39.tar.lzo --rootfs lvm_pve_thin:8
 
Dietmar,

Help me understand this setup. Is a lvm thin pool lxc container stored in a raw image or is it a directory like chroot? I want to have a lxc container not in a image as mysql is really slow but with snapshots. Is lx in thin pool more like openvz with simfs?
 
I created a LXC CT with thinpool storage named vm-104-disk-1 and can not find where it is mounted to.
 
Is LXC CT on a thin lvm volume is a directory container? As I can mount it like this

Code:
mount /dev/mapper/vg_pve_thin-vm--105--disk--1 /mnt/
 
Last edited:
Is LXC CT on a thin lvm volume is a directory container? As I can mount it like this

Code:
mount /dev/mapper/vg_pve_thin-vm--105--disk--1 /mnt/

just use "pct mount" if you want to access a container's filesystem (see "man pct").
 
So, there is no overhead with thin pool volumes as with image based containers? Right?
 
You don't have a filesystem in an image on a file system on whatever, but you have a filesystem on an LVM "block device " - if that is what you mean?