Sample Header Ad - 728x90

qcow2 actual size

9 votes
1 answer
13272 views
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?
Asked by dePablo (133 rep)
Apr 4, 2018, 12:12 PM
Last activity: Apr 14, 2022, 06:52 PM