From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NuutA-0000lT-UZ for qemu-devel@nongnu.org; Thu, 25 Mar 2010 17:46:52 -0400 Received: from [140.186.70.92] (port=39945 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nuut9-0000kf-Gw for qemu-devel@nongnu.org; Thu, 25 Mar 2010 17:46:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nuut7-0006PN-Dp for qemu-devel@nongnu.org; Thu, 25 Mar 2010 17:46:51 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]:39363) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nuut7-0006PD-1k for qemu-devel@nongnu.org; Thu, 25 Mar 2010 17:46:49 -0400 Message-ID: <4BABD9C3.9010309@web.de> Date: Thu, 25 Mar 2010 22:46:43 +0100 From: Jan Kiszka MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] qemu-img: add FUSE-based image access References: <4BABA2FB.8050505@web.de> <4BABCE82.7000105@codemonkey.ws> In-Reply-To: <4BABCE82.7000105@codemonkey.ws> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigF1EF23AC5515386DB3344052" Sender: jan.kiszka@web.de List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF1EF23AC5515386DB3344052 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Anthony Liguori wrote: > On 03/25/2010 12:52 PM, Jan Kiszka wrote: >> This adds the "map" subcommand to qemu-img. It is able to expose the r= aw >> content of a disk image via a FUSE filesystem. Both the whole disk can= >> be accessed, e.g. to run partitioning tools against it, as well as >> individual partitions. This allows to create new filesystems in the >> image or loop-back mount exiting ones. Using the great mountlo tool >> from the FUSE collection [1][2], the latter can even be done by non-ro= ot >> users (the former anyway). >> >> There are some dependency to fulfill to gain all features: Partition >> scanning is done via recent libblkid (I used version 2.17.1). If this >> library is not available, only the disk file is provide. Fortunately, >> mountlo can do partition scanning as well ("-p n") to work around this= =2E >> >> Moreover, libfuse>=3D 2.8 and a host kernel>=3D 2.6.29 is required for= >> seamless disk access via fdisk. Otherwise, the BLKGETSIZE64 IOCTL cann= ot >> be provided, and the number of cylinders has to set explicitly (e.g. v= ia >> "-C n"). >> >> This work was inspired by Ashley Saulsbury's qemu-diskp [3]. >> >> [1] >> http://sourceforge.net/apps/mediawiki/fuse/index.php?title=3DFileSyste= ms#Mountlo >> >> [2] http://sourceforge.net/projects/fuse/files/mountlo/ >> [3] http://www.saulsbury.org/software/virtualization.html >> >> Signed-off-by: Jan Kiszka >> =20 >=20 > This has been proposed quite a few times. >=20 > In fact, I wrote something like this prior to implementing qemu-nbd. >=20 > The problem with fuse is that as default configured, you can't actually= > enter into a fuse filesystem as root and since you need to be root to > loopback mount it, it pretty nasty from a usability perspective. You don't, see mountlo. >=20 > So why did you go the fuse route instead of using qemu-nbd? Mostly usability. It's really straightforward to stack mountlo on top of the mapped image. And you can run (almost) all the filesystem and partitioning tools. Moreover, blkid_partlist provides a more complete partition parser than rolling your own version - which I briefly considered and then quickly dropped after looking at some implementations. Jan --------------enigF1EF23AC5515386DB3344052 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkur2cYACgkQitSsb3rl5xRAJACg2uVjZ/vlILWmxpEwO4KtiaE/ /28An2hs6wEcSqvcxohyN0/jYajW8+Z5 =MgG9 -----END PGP SIGNATURE----- --------------enigF1EF23AC5515386DB3344052--