From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LCUhi-0001fw-4D for qemu-devel@nongnu.org; Tue, 16 Dec 2008 02:50:54 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LCUhg-0001fg-Ou for qemu-devel@nongnu.org; Tue, 16 Dec 2008 02:50:53 -0500 Received: from [199.232.76.173] (port=56217 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LCUhg-0001fb-JO for qemu-devel@nongnu.org; Tue, 16 Dec 2008 02:50:52 -0500 Received: from mx20.gnu.org ([199.232.41.8]:9190) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LCUhg-0007CT-12 for qemu-devel@nongnu.org; Tue, 16 Dec 2008 02:50:52 -0500 Received: from mx2.redhat.com ([66.187.237.31]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LCUhe-0005fX-Tr for qemu-devel@nongnu.org; Tue, 16 Dec 2008 02:50:51 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id mBG7onq6027668 for ; Tue, 16 Dec 2008 02:50:49 -0500 Received: from mail02.corp.redhat.com (zmail02.collab.prod.int.phx2.redhat.com [10.5.5.42]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id mBG7on69032689 for ; Tue, 16 Dec 2008 02:50:49 -0500 Date: Tue, 16 Dec 2008 02:50:49 -0500 (EST) From: Shahar Frank Message-ID: <246345442.373921229413849052.JavaMail.root@zmail02.collab.prod.int.phx2.redhat.com> In-Reply-To: <571317069.373331229413498662.JavaMail.root@zmail02.collab.prod.int.phx2.redhat.com> Subject: Re: [Qemu-devel][PATCH] Qemu image over raw devices MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org ----- "Kevin Wolf" wrote: > Shahar Frank schrieb: > > The following patch enables QEMU to create and use images with any > > format on top of a raw device. Note that -f is not enough > for > > bcking files support. > > When would I need to explicitly specify the type of a backing file? The patch doesn't allow you to specify a type (image format). It allows you to force probing. This is done to override the default block-device => raw semantics. > > > The patch includes the following: > > > > 1. The check for block devices is weaken so you can override it by > > specifying a protocol > > 2. If a protocol exists but not found in the protocols list, the > logic > > falls back to image type probing. This means use can write > > "probe:filename" or just ":filename" > > IIUC, on qemu side this is just another syntax for -drive format=xyz? > Wouldn't it be better to add a parameter to qemu-img then instead of > inventing new ways of specifying the format? The problem is with the backing file, this format does not apply to the backing file and this is the correct behavior - the backing file can be of a different format. Note that the new way is just forcing probing. > > > Note that if regular file/device path names are used, the previous > > behavior is kept. > > > > lvcreate -L 5G -n base store > > dd bs=32k if=win.qcow2 of=/dev/store/base > > ./qemu-img info :/dev/store/base > > lvcreate -L 2G -n l2 store > > ./qemu-img create -b :/dev/store/base -f qcow2 /dev/store/l2 > > ./x86_64-softmmu/qemu-system-x86_64 -hda :/dev/store/l2 -L pc-bios/ > > lvcreate -L 2G -n l3 store > > ./qemu-img create -b :/dev/store/l2 -f qcow2 /dev/store/l3 > > ./x86_64-softmmu/qemu-system-x86_64 -hda :/dev/store/l3 -L pc-bios/ > > Does it even make sense to store qcow2 images on raw block devices? > qcow2 are usually growing whereas devices tend to not change their > size. > The idea is to allow QCOW2 (or similar formats) capabilities in SAN only environment, where SAN-FS is not applicable (for example because it is too expensive or too complex). For the size issue, Logical volumes can be extended. In the near future some patches that allow monitoring the internal space usage and then extend the LV size are going to be posted to this list. Another issue that has to be handled is out of space (out of range) scenarios. > Kevin Shahar