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

Re: [Xen-users] Mounting an image with loopback that contains an LVM



On Thu, 6 Nov 2008, Ian Murray wrote:

I have Ubuntu 8.04 Dom0 and CentOS 5.2 DomU. I want to be able to mount the 
image file of the CentOS DomU in the Ubuntu Dom0 to copy some stuff onto it.

I figured I could do it this way...

Make sure DomU was destroyed.

losetup /dev/loop1 /xen/test/test.img


 now you can use kpartx tool
kpartx -a /dev/loop1
 it will create the following device nodes
/dev/mapper/loop1p1
/dev/mapper/loop1p2
 which you can now access as normal block devices
 once finished use
kpartx -d /dev/loop1

using 'p' in fdisk /dev/loop1 gives me what I would expect... two partitions....

/dev/loop1p1 .... Linux
/dev/loop1p2 .... Linux LVM

when I run pvscan, it returns the error "no matching physical volumes found".

When I run pvcan -vvv it appears to look at /dev/loop1 but simply states that 
no label is found.

Under LVM on both systems, I did a 'version' command:-

Ubuntu Dom0

LVM     2.02.26 2007-06-15
Lib        1.02.20 2007-06-15


CentOS DomU

LVM    2.02.32-RHEL5    2008-03-04
Lib       1.02.24                  2007-12-20

Am I doing something wrong or is the problem with the slight mis-match of 
versions?

Thanks in advance,

Ian.

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.