Lvm thin get's fat after moving / cloning disks.

mailinglists

Renowned Member
Mar 14, 2012
641
69
93
As stated in the title, when one moves LVM thin it get's fat. And by fat I mean as fat as it can get (100%).
I think this is a bug. It happens only when disk of a _running_ VM is moved.

Here is an example using almost latest PM from public/free repos.
VM is created from KVM CentOS 7 template I prepared.

Code:
VM 103 created and is thin (12.29% usage):
# lvs | grep 103
  vm-103-disk-1 pve     Vwi-aotz-- 15.00g data            12.29

VM disk get's moved to external NFS storage to qcow2 format and get's fat:
# du -sh *
16G    vm-103-disk-1.qcow2

Moving it back keeps it fat:
# lvs | grep 103
  vm-103-disk-1 pve     Vwi-aotz-- 15.00g data            100.00 

And because we hate fatties, it get's killed. Then fresh thin one is created and _started_:
# lvs  | grep 102
  vm-102-disk-1 pve     Vwi-a-tz-- 15.00g data        12.29 

It get's moved to another LVM thin VG and becomes fat right away.
# lvs | grep 102
  vm-102-disk-1 pvesata Vwi-aotz-- 15.00g datasata        100.00

So basically thin LVM is not really thin when one uses disk migration in order to move VM's in order to do maintenance on host which is what every good admin should do. I'm reporting this as a bug.
 
To the developers: It would be nice to receive a warning that this size increase is going to happen before committing to the action. I now have a fat disk, ten times the previous thin size before moving, and I don't know how to shrink it.
 
You can reclaim disk space by rebooting the VM and then running trim operation from the guest.
And I completely agree with you, but no developer will read this. :-)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!