From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JEvcj-0002LN-Mx for qemu-devel@nongnu.org; Tue, 15 Jan 2008 18:55:17 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JEvci-0002L7-32 for qemu-devel@nongnu.org; Tue, 15 Jan 2008 18:55:17 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JEvch-0002L4-TL for qemu-devel@nongnu.org; Tue, 15 Jan 2008 18:55:15 -0500 Received: from mx1.redhat.com ([66.187.233.31]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JEvch-0000NT-Ku for qemu-devel@nongnu.org; Tue, 15 Jan 2008 18:55:15 -0500 Date: Tue, 15 Jan 2008 23:54:38 +0000 From: "Daniel P. Berrange" Subject: Re: [Qemu-devel] Re: [kvm-devel] [RFC][PATCH] Modify loop device to be able to manage partitions of the image disk Message-ID: <20080115235438.GB30528@redhat.com> References: <120042137328-git-send-email-Laurent.Vivier@bull.net> <20080115182745.GY17783@redhat.com> <1200440406.4602.16.camel@frecb07144> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1200440406.4602.16.camel@frecb07144> Content-Transfer-Encoding: quoted-printable Reply-To: "Daniel P. Berrange" , qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Vivier Cc: kvm-devel@lists.sourceforge.net, qemu-devel@nongnu.org On Wed, Jan 16, 2008 at 12:40:06AM +0100, Laurent Vivier wrote: > Le mardi 15 janvier 2008 =E0 18:27 +0000, Daniel P. Berrange a =E9crit = : > > On Tue, Jan 15, 2008 at 07:22:53PM +0100, Laurent Vivier wrote: > > > As it should be useful to be able to mount partition from a=20 > > > disk image, (and as I need a break in my bug hunting) I've=20 > > > modified the loop driver to mount raw disk image. > > >=20 > > > To not break original loop device, as we have to change minor=20 > > > numbers to manage partitions, a new parameter is added to the modul= e: > >=20 > > I don't see the point in modifying the loop device driver when you > > can already access the partitions with existing device mapper > > functionality & tools. >=20 > There are two reasons: >=20 > 1- I didn't know kpartx (thank you for the tip) >=20 > but using loop device, you will be able to use all partition tables > known by the kernel (acorn, atari, efi, karma, mac, osf, sun, > ultrix, amiga, ibm, ldm, msdos, sgi, sysv68), whereas kpartx can use > only partition tables it knows (bsd, dasd, dos, mac, sun, efi, sun, > unixware). This is an argument for extending kpartx to cope with the other partition tables :-) I have 50/50 split between VMs using files vs VMs using LVM volumes - the loop driver patches only help you access partitions within a file based image, whereas kpartx can access the partitions within any block device, so can support=20 files (via existing loop device) & LVM vols & nested partitions. > 2- I'd like to mount qcow2 or others disk image formats, so perhaps it'= s > easier to modify loop device driver (but perhaps you know another magic > tool ?) There has been some work in this area wrt to Xen - the DM-Userspace proje= ct had some working code providing a device mapper target calling out to a=20 userspace daemon to handle non-raw file formats like qcow. I don't know what the state of it is now wrt to upstream kernel / device-mapper, or even whether it is more than just 'proof of concept', but the project page is here with some info: http://wiki.xensource.com/xenwiki/DmUserspace Regards, Dan. --=20 |=3D- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 24= 96 -=3D| |=3D- Perl modules: http://search.cpan.org/~danberr/ = -=3D| |=3D- Projects: http://freshmeat.net/~danielpb/ = -=3D| |=3D- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 950= 5 -=3D|=20