From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JEwAW-0001UP-CB for qemu-devel@nongnu.org; Tue, 15 Jan 2008 19:30:12 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JEwAU-0001Ri-Vb for qemu-devel@nongnu.org; Tue, 15 Jan 2008 19:30:11 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JEwAU-0001Re-LY for qemu-devel@nongnu.org; Tue, 15 Jan 2008 19:30:10 -0500 Received: from ecfrec.frec.bull.fr ([129.183.4.8]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JEwAU-000100-E4 for qemu-devel@nongnu.org; Tue, 15 Jan 2008 19:30:10 -0500 Subject: Re: [Qemu-devel] Re: [kvm-devel] [RFC][PATCH] Modify loop device to be able to manage partitions of the image disk From: Laurent Vivier In-Reply-To: <20080115235438.GB30528@redhat.com> References: <120042137328-git-send-email-Laurent.Vivier@bull.net> <20080115182745.GY17783@redhat.com> <1200440406.4602.16.camel@frecb07144> <20080115235438.GB30528@redhat.com> Date: Wed, 16 Jan 2008 01:30:43 +0100 Message-Id: <1200443443.4602.32.camel@frecb07144> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-pOLjfkNoad0xEdB0YIVW" Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: kvm-devel@lists.sourceforge.net --=-pOLjfkNoad0xEdB0YIVW Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Le mardi 15 janvier 2008 =C3=A0 23:54 +0000, Daniel P. Berrange a =C3=A9cri= t : > On Wed, Jan 16, 2008 at 12:40:06AM +0100, Laurent Vivier wrote: > > Le mardi 15 janvier 2008 =C3=A0 18:27 +0000, Daniel P. Berrange a =C3= =A9crit : > > > 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). >=20 > This is an argument for extending kpartx to cope with the other > partition tables :-) I have 50/50 split between VMs using files Good try... but IMHO, I think it is better to let the kernel decode the partition table... > 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. I think you're wrong (but you seem to know the subject better than me, so ...): you should be able to use the modified loop device on the logical volume to decode partition table. >=20 > > 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 ?) >=20 > 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: >=20 > http://wiki.xensource.com/xenwiki/DmUserspace It seems a very good idea, but what I don't like: - it seems very complex (like IBM guys like ;-) ) - it is one and a half year old To be honest, if something good already exists, I take it... Laurent --=20 ----------------- Laurent.Vivier@bull.net ------------------ "La perfection est atteinte non quand il ne reste rien =C3=A0 ajouter mais quand il ne reste rien =C3=A0 enlever." Saint Exup=C3=A9ry --=-pOLjfkNoad0xEdB0YIVW Content-Type: application/pgp-signature; name=signature.asc Content-Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?= -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBHjVAz9Kffa9pFVzwRAgQUAJwMITKjIZpQ3xc7rn3aaqM4etx+UQCfV8iP 5ya1C/J1nuTzZiinIXxZyrA= =bczC -----END PGP SIGNATURE----- --=-pOLjfkNoad0xEdB0YIVW--