From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Daniel P. Berrange" Subject: Re: [Qemu-devel] Re: [RFC][PATCH] Modify loop device to be able to manage partitions of the image disk Date: Tue, 15 Jan 2008 23:54:38 +0000 Message-ID: <20080115235438.GB30528@redhat.com> References: <120042137328-git-send-email-Laurent.Vivier@bull.net> <20080115182745.GY17783@redhat.com> <1200440406.4602.16.camel@frecb07144> Reply-To: "Daniel P. Berrange" Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, qemu-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org To: Laurent Vivier Return-path: Content-Disposition: inline In-Reply-To: <1200440406.4602.16.camel@frecb07144> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.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 = > > > disk image, (and as I need a break in my bug hunting) I've = > > > modified the loop driver to mount raw disk image. > > > = > > > To not break original loop device, as we have to change minor = > > > numbers to manage partitions, a new parameter is added to the module: > > = > > 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. > = > There are two reasons: > = > 1- I didn't know kpartx (thank you for the tip) > = > 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 = 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 project had some working code providing a device mapper target calling out to a = 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. -- = |=3D- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496= -=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 9505 = -=3D| = ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/