Project

General

Profile

Actions

Bug #1753

closed

ceph copy raw images from qemu incorrectly

Added by max mikheev over 12 years ago. Updated over 7 years ago.

Status:
Won't Fix
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
Severity:
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Hi,
Ceph cannot correctly handle raw images from qemu incorrectly:

oneadmin@s2-8core:~/OpenNebula/var/images/tmp$ date; qemu-img create f raw test.raw 3G; date; ls -la; date; cp -v test.raw test2.raw; date
Fri Nov 25 16:49:01 EST 2011
Formatting 'test.raw', fmt=raw size=3221225472
Fri Nov 25 16:49:01 EST 2011
total 3145728
drwxr-xr-x 1 oneadmin cloud 0 2011-11-25 16:49 .
drwxrws--T 1 oneadmin cloud 232742453458 2011-11-25 16:47 ..
-rw-r--r-
1 oneadmin cloud 3221225472 2011-11-25 16:49 test.raw
Fri Nov 25 16:49:02 EST 2011
`test.raw' -> `test2.raw'
Fri Nov 25 16:52:09 EST 2011

oneadmin@s2-8core:~/OpenNebula/var/images/tmp$ ls lsh
total 6.0G
3.0G -rw-r--r-
1 oneadmin cloud 3.0G 2011-11-25 16:52 test2.raw
3.0G rw-r--r- 1 oneadmin cloud 3.0G 2011-11-25 16:49 test.raw

As you can see an empty image on ceph has actual size 3G. Same operation on ext4:

root@s2-8core:~/tmp# qemu-img create test.raw 3G
Formatting 'test.raw', fmt=raw size=3221225472
root@s2-8core:~/tmp# ls lsh
total 0
0 -rw-r--r-
1 root root 3.0G 2011-11-25 17:02 test.raw
An actual size is 0.

oneadmin@s2-8core:~/OpenNebula/var/images/tmp$ ceph --version
ceph version 0.38 (commit:b600ec2ac7c0f2e508720f8e8bb87c3db15509b9)
oneadmin@s2-8core:~/OpenNebula/var/images/tmp$

In version 0.34 image it worked correctly, created image had size 0.
The expected results described here: http://balau82.wordpress.com/2011/05/08/qemu-raw-images-real-size/

Thanks

Actions

Also available in: Atom PDF