I am little bit confused with the real size of qcow2 files.
ls -alh VMs/ubuntu-mini.qcow2
-rw------- 1 root root 21G mar 31 23:15 VMs/ubuntu-mini.qcow2
du -h VMs/ubuntu-mini.qcow2
2,7G VMs/ubuntu-mini.qcow2
I wanted to copy that file to different partition (ext4). It looks this command copied actually 21G not only 2,7G I expected. And now in new location these both commands (du and ls) shows me the same size - 21G.
du -h /media/HDD0/VMs/ubuntu-mini.qcow2
21G /media/HDD0/VMs/ubuntu-mini.qcow2
ls -alh /media/HDD0/VMs/ubuntu-mini.qcow2
-rw------- 1 root root 21G mar 31 23:15 /media/HDD0/VMs/ubuntu-mini.qcow2
What's the proper way of copying qcow2 files? Is there are switch in "cp" command which makes it to copy only 2,7G?