This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


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

To: Ian Murray <murrayie@xxxxxxxxxxx>
Subject: Re: [Xen-users] Mounting an image with loopback that contains an LVM
From: Alexander Piavka <piavka@xxxxxxxxxxxx>
Date: Thu, 6 Nov 2008 20:38:32 +0200 (IST)
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 06 Nov 2008 10:39:12 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <11223.36655.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <7ECBFE60CB7F02478CDDDE40C985813A0DF21329@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <11223.36655.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
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
 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 

Thanks in advance,


Xen-users mailing list

<Prev in Thread] Current Thread [Next in Thread>