Hi guysπ β Recently, I found that the disk size of qcow2 image get bigger(from 6.16G to 8G in my test) after blockcopy.π β I'm not sure whether this is normal or not. Please help to check. Thanks.π β
BR,π β Fangge Jinπ β Before blockcopy, check source image:π β # qemu-img info -U /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.qcow2π β image: /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.qcow2π β file format: qcow2π β virtual size: 10 GiB (10737418240 bytes)π β disk size: 6.16 GiBπ β cluster_size: 65536π β Format specific information:π β compat: 1.1π β compression type: zlibπ β lazy refcounts: falseπ β refcount bits: 16π β corrupt: falseπ β extended l2: falseπ β Child node '/file':π β filename: /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.qcow2 π β protocol type: fileπ β file length: 6.16 GiB (6614810624 bytes)π β disk size: 6.16 GiBπ β Format specific information:π β extent size hint: 1048576π β After blockcopy, check target image:π β # qemu-img info -U /var/lib/avocado/data/avocado-vt/images/copy.qcow2 π β image: /var/lib/avocado/data/avocado-vt/images/copy.qcow2π β file format: qcow2π β virtual size: 10 GiB (10737418240 bytes)π β disk size: 6.64 GiBπ β cluster_size: 65536π β Format specific information:π β compat: 1.1π β compression type: zlibπ β lazy refcounts: falseπ β refcount bits: 16π β corrupt: falseπ β extended l2: falseπ β Child node '/file':π β filename: /var/lib/avocado/data/avocado-vt/images/copy.qcow2π β protocol type: fileπ β file length: 6.64 GiB (7126974464 bytes)π β disk size: 6.64 GiBπ β Guest disk xml:π β <disk type='file' device='disk'>π β <driver name='qemu' type='qcow2'/>π β <source file='/var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.qcow2' index='2'/>π β <backingStore/>π β <target dev='vda' bus='virtio'/>π β <alias name='virtio-disk0'/>π β <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>π β </disk>π β Qemu command line:π β -blockdev '{"driver":"file","filename":"/var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.qcow2","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \π β -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2","file":"libvirt-1-storage","backing":null}' \π β -device '{"driver":"virtio-blk-pci","bus":"pci.4","addr":"0x0","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \π β Qemu monitor command grepped from libvirt log:π β {"execute":"blockdev-add","arguments":{"driver":"file","filename":"/var/lib/avocado/data/avocado-vt/images/copy.qcow2","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"},"id":"libvirt-429"} π β {"execute":"blockdev-create","arguments":{"job-id":"create-libvirt-2-format","options":{"driver":"qcow2","file":"libvirt-2-storage","size":10737418240,"cluster-size":65536}},"id":"libvirt-430"} π β {"execute":"job-dismiss","arguments":{"id":"create-libvirt-2-format"},"id":"libvirt-432"} π β {"execute":"blockdev-add","arguments":{"node-name":"libvirt-2-format","read-only":false,"driver":"qcow2","file":"libvirt-2-storage","backing":null},"id":"libvirt-433"} π β {"execute":"blockdev-mirror","arguments":{"job-id":"copy-vda-libvirt-1-format","device":"libvirt-1-format","target":"libvirt-2-format","sync":"full","auto-finalize":true,"auto-dismiss":false},"id":"libvirt-434"} π β {"execute":"transaction","arguments":{"actions":[{"type":"block-dirty-bitmap-add","data":{"node":"libvirt-2-format","name":"libvirt-tmp-activewrite","persistent":false,"disabled":false}}]},"id":"libvirt-443"} π β {"execute":"job-complete","arguments":{"id":"copy-vda-libvirt-1-format"},"id":"libvirt-444"} π β