Ticket #3849 (closed defect: duplicate)
copy qcow2 file as virtual size instead of disk size
Reported by: | ldelana | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | mc-core | Version: | master |
Keywords: | qcow2,copy | Cc: | |
Blocked By: | Blocking: | ||
Branch state: | no branch | Votes for changeset: |
Description
behavior:
copy a qcow2 file through mc causes copy of virtual size instead of disk size as expected if copying through cp command.
repro:
create an empty image of 20G
# qemu-img create -f qcow2 -o preallocation=metadata test.qcow2 20G
copy using cp ( test.qcow2 into test_cp.qcow2 )
# cp test.qcow2 test2.qcow2
copy using mc ( test.qcow2 into test_mc.qcow2 )
results:
# ls -la
qemu-img shows that test_mc.qcow2 allocates 20G on disk instead of 0G
# qemu-img info test.qcow2
image: test.qcow2
file format: qcow2
virtual size: 20G (21474836480 bytes)
disk size: 3.3M
cluster_size: 65536
Format specific information:
compat: 1.1
lazy refcounts: false
refcount bits: 16
corrupt: false
# qemu-img info test_cp.qcow2
image: test2.qcow2
file format: qcow2
virtual size: 20G (21474836480 bytes)
disk size: 3.3M
cluster_size: 65536
Format specific information:
compat: 1.1
lazy refcounts: false
refcount bits: 16
corrupt: false
# qemu-img info test_mc.qcow2
image: test3.qcow2
file format: qcow2
virtual size: 20G (21474836480 bytes)
disk size: 20G
cluster_size: 65536
Format specific information:
compat: 1.1
lazy refcounts: false
refcount bits: 16
corrupt: false
Closed as duplicate of #2715.