[PVE-User] Moving a disk from Ceph to thin-lvm, troubles...
f.gruenbichler at proxmox.com
Fri Nov 18 14:28:47 CET 2016
On Fri, Nov 18, 2016 at 02:04:48PM +0100, Marco Gaiarin wrote:
> > What i'm missing?! Thanks.
> Sorry, probably i'm missing some background info on LVM. Trying to
> reset and restart from the ground.
> With LVM, you define a storage with a VG, and proxmox itself create a
> LV for every disk. Simple, clear.
> With Thin-LVM, insted, i've to creare a LV, define it as 'thin' with
> (taken from the wiki):
> lvcreate -L 100G -n data pve
> lvconvert --type thin-pool pve/data
you can simply create the thin pool LV in one go, e.g.:
lvcreate -L 100G -n mythinpoolname -T myvgname
will create a 100G thin pool (volume) called "mythinpoolname" on the
volume group "myvgname". optionally you can specify the pool metadata
size (with "--poolmetadatasize SIZE"), the default is 64b per chunk of
> and in definition of the storage, in proxmox interface, i've to specify
> the VG (clear) but also the LV.
> OK. But done that, where the disk image get created? Proxmox take care
> of formatting and mounting the LV, and create the disk image inside?
PVE will automatically create thinly provisioned LVs for the disks, and
instead of on the VG, they are created on the thin pool. A thin pool
cannot be mounted, only the thinly provisioned volumes on it can. If you
want to simplify it, a thin pool acts as both an LV (in relation to the
VG) and as VG (in relation to the thin volumes stored on it).
> Sorry, but i've not clear how works...
hope the explanation helped a bit?
> Also, seems that the trouble with Thin LVM came from the fact that i've
> exausted the 'metadata' space, and the default LVM configuration does
> not extend automatically the metadata space
> (thin_pool_autoextend_threshold = 100).
you can specify the metadata size on creation (see above) - maybe the
convert to thin operation does not allocate enough space for the
metadata? in our default setup, pool autoextension is not possible
(there are no free blocks in the VG to autoextend with)..
you can check "man lvmthin" for more examples and explanations for how
LVM thin provisioning works.
More information about the pve-user