I have VMs with disk images either on ceph or on lvm.
When restoring from a backup to ceph, I benefit from:
space reduction due to 4K zero blocks
as unused / empty blocks will not be allocated on ceph.
So far so good.
Now, I wanted to move a disk image from lvm (NOT lvm-thin!) to ceph.
And in order to optimize this, I first zeroed out all empty space (about 40%) from within the VM.
The funny thing is that, if I move the disk, the whole disk image is copied / allocated.
If I first create a backup and restore it to the ceph backend, only used / non-zero blocks are allocated.
The problem being, that I can move without downtime, but not backup-restore without downtime.
Is there a away to enable this optimization (space reduction due to 4K zero blocks) also when moving disks?
Martin
When restoring from a backup to ceph, I benefit from:
space reduction due to 4K zero blocks
as unused / empty blocks will not be allocated on ceph.
So far so good.
Now, I wanted to move a disk image from lvm (NOT lvm-thin!) to ceph.
And in order to optimize this, I first zeroed out all empty space (about 40%) from within the VM.
The funny thing is that, if I move the disk, the whole disk image is copied / allocated.
If I first create a backup and restore it to the ceph backend, only used / non-zero blocks are allocated.
The problem being, that I can move without downtime, but not backup-restore without downtime.
Is there a away to enable this optimization (space reduction due to 4K zero blocks) also when moving disks?
Martin