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

raulnor516

Active Member
Feb 7, 2018
6
0
41
32
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.