Ok! Just to be sure, I did it again...
In the LVM-Thin I have an 100.00g vm disk. Note that only about 6% are filled up.
lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
data pve twi-aotz-- 18.87g 31.33 1.86
root pve -wi-ao---- 9.75g
swap pve -wi-ao---- 4.00g
vm-100-disk-0 pve Vwi-aotz-- 100.00g data 5.91
No tried to use move_disk
cmd: qm move_disk 100 scsi0 VMS --format qcow2
(VMS is the Directory Storage)
Using this command to check the qcow2 file
cmd: watch -n 1 qemu-img info vm-100-disk-0.qcow2
Every 1.0s: qemu-img info vm-100-disk-0.qcow2 proxmox01: Wed Sep 30 11:02:02 2020
image: vm-100-disk-0.qcow2
file format: qcow2
virtual size: 100 GiB (107374182400 bytes)
disk size: 21.2 GiB
cluster_size: 65536
Format specific information:
compat: 1.1
compression type: zlib
lazy refcounts: false
refcount bits: 16
corrupt: false
After a while, all space in /DATA, which is the Directory Storage are full.
df -h
Filesystem Size Used Avail Use% Mounted on
udev 1.9G 0 1.9G 0% /dev
tmpfs 394M 5.8M 388M 2% /run
/dev/mapper/pve-root 9.8G 2.5G 7.4G 25% /
tmpfs 2.0G 52M 1.9G 3% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
/dev/vdb1 40G 40G 316K 100% /DATA
/dev/fuse 30M 16K 30M 1% /etc/pve
tmpfs 394M 0 394M 0% /run/user/0
and the image has almost 40G filled....
qemu-img info vm-100-disk-0.qcow2
image: vm-100-disk-0.qcow2
file format: qcow2
virtual size: 100 GiB (107374182400 bytes)
disk size: 39.9 GiB
cluster_size: 65536
Format specific information:
compat: 1.1
compression type: zlib
lazy refcounts: false
refcount bits: 16
corrupt: false
And the command qm move_disk got error after a while:
qm move_disk 100 scsi0 VMS --format qcow2
create full clone of drive scsi0 (local-lvm:vm-100-disk-0)
Formatting '/DATA/images/100/vm-100-disk-0.qcow2', fmt=qcow2 cluster_size=65536 preallocation=metadata compression_type=zlib size=107374182400 lazy_refcounts=off refcount_bits=16
drive mirror is starting for drive-scsi0
drive-scsi0: transferred: 384827392 bytes remaining: 106989355008 bytes total: 107374182400 bytes progression: 0.36 % busy: 1 ready: 0
...
...
drive-scsi0: transferred: 42833281024 bytes remaining: 64541097984 bytes total: 107374379008 bytes progression: 39.89 % busy: 1 ready: 0
drive-scsi0: transferred: 42833281024 bytes remaining: 64541097984 bytes total: 107374379008 bytes progression: 39.89 % busy: 1 ready: 0
drive-scsi0: Cancelling block job
drive-scsi0: Done.
storage migration failed: mirroring error: drive-scsi0: mirroring has been cancelled
Then I tried to use qemu-img convert and everything works fine
qemu-img convert -O qcow2 /dev/pve/vm-100-disk-0 /DATA/images/100/vm-100-disk-0.qcow2
qemu-img info vm-100-disk-0.qcow2
image: vm-100-disk-0.qcow2
file format: qcow2
virtual size: 100 GiB (107374182400 bytes)
disk size: 6.01 GiB
cluster_size: 65536
Format specific information:
compat: 1.1
compression type: zlib
lazy refcounts: false
refcount bits: 16
corrupt: false