Ceph - Migrated drives grew in size, how can I reclaim space?

raulnor516

Active Member
Feb 7, 2018
6
0
41
31
I had to migrate a bunch of KVM machines from an external server into my Proxmox+Ceph cluster. When I migrated a few of the drives from the NFS storage to the Ceph RBD pool, the size of the disk image changed. In one case, a qemu drive that was 68GB became 1104GB after migration! When I try to resize the VM drives in the GUI, I can only increase them in size, not decrease. How can I go about recovering this "used" space since I know the VM drives do not have that much data in them?
 
drive-mirror remove sparse disk for some storage like ceph, (doing full copy of zero block).
you can use enable the discard feature on vm disk, then in linux guest launch "fstrim -a" command.
They are also an option, in vm options->qemu-agent-> to force an auto trim just after the migration.
 
Thanks for the help! Can you give me more info on the drive-mirror remove sparse disk stuff? I'm going through and enabling discard and trimming everything right now.
 

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!