QCOW2 to LVM-Thin Not Thin Provisioning

ewsclass66

New Member
Oct 24, 2023
3
0
1
Hi all,
I'm attempting to move from QCOW2 to LVM-Thin however when moving the disks, the resultant RAW files are thick provisioned instead of thin? Is there a way to migrate from qcow2 whilst retaining the thin provisioning?

Thanks in advance
 
Here is the qcow2 of the vm, as can be seen its only 3.7G.
1698221423421.png
However, after migrating storage via the GUI to the LVM-Thin storage, it converts the qcow to a raw disk file which then occupies the full 64GB of space on the disk:
1698221503602.png
1698221519755.png
When I make a new drive and don't migrate from anything, then the thin provisioning works as expected and no additional space is used on the storage.
Trimming from the OS stated it had reduced the disk by 54GB however none of this has been reflected in the actual disk utilisation.
Any suggestions to trim this migrated drive down to its actual storage usage?
 
Last edited:
I'm unsure if you see the actual usage in the GUI. All my volumes are shown with their configured size, not their actual size on disk.
Check with lvs or lvdisplay if the shown value matches the value on disk.
 
Ok I have managed to fix the issue by first converting the qcow2 back to qcow2 as it they were originally made from RAW thick provisioned disks. I ran the following command:
Code:
qemu-img convert -p -f raw original.qcow2 -O qcow2 new-disk.qcow2

I then could migrate the storage from the GUI and the thin provisioning worked as expected.
 

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!