From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JEqWT-00058x-Qg for qemu-devel@nongnu.org; Tue, 15 Jan 2008 13:28:29 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JEqWS-00057t-9V for qemu-devel@nongnu.org; Tue, 15 Jan 2008 13:28:29 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JEqWS-00057q-6z for qemu-devel@nongnu.org; Tue, 15 Jan 2008 13:28:28 -0500 Received: from mx1.redhat.com ([66.187.233.31]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JEqWR-0004Hs-Sp for qemu-devel@nongnu.org; Tue, 15 Jan 2008 13:28:28 -0500 Date: Tue, 15 Jan 2008 18:27:45 +0000 From: "Daniel P. Berrange" Message-ID: <20080115182745.GY17783@redhat.com> References: <120042137328-git-send-email-Laurent.Vivier@bull.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <120042137328-git-send-email-Laurent.Vivier@bull.net> Subject: [Qemu-devel] Re: [kvm-devel] [RFC][PATCH] Modify loop device to be able to manage partitions of the image disk 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 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. # losetup -f /var/lib/xen/images/fc6pvi386.img # kpartx -l /dev/loop0 loop0p1 : 0 208782 /dev/loop0 63 loop0p2 : 0 10265535 /dev/loop0 208845 # kpartx -a /dev/loop0 # ls /dev/mapper/loop0p* /dev/mapper/loop0p1 /dev/mapper/loop0p2 # mount /dev/mapper/loop0p1 /mnt/ # ls /mnt/ config-2.6.18-20.el5xen lost+found vmlinuz-2.6.18-20.el5xen grub symvers-2.6.18-20.el5xen.gz xen.gz-2.6.18-20.el5 initrd-2.6.18-20.el5xen.img System.map-2.6.18-20.el5xen xen-syms-2.6.18-20.el5 Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|