qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [kvm-devel] [RFC][PATCH] Modify loop device to be able


From: Daniel P. Berrange
Subject: [Qemu-devel] Re: [kvm-devel] [RFC][PATCH] Modify loop device to be able to manage partitions of the image disk
Date: Tue, 15 Jan 2008 18:27:45 +0000
User-agent: Mutt/1.4.1i

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  -=| 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]