WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Mounting Xen LVM Guests

To: markwalkom@xxxxxxxxx
Subject: Re: [Xen-users] Mounting Xen LVM Guests
From: Fabian Zimmermann <xen-users@xxxxxxxxxxxxxxxxx>
Date: Wed, 07 Jan 2009 10:09:52 +0100
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 07 Jan 2009 01:10:36 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1915834324.411231316784019.JavaMail.root@web01>
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: <1915834324.411231316784019.JavaMail.root@web01>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla-Thunderbird 2.0.0.17 (X11/20081018)
Eredicator X schrieb:
> Thanks Fajar,
>
> ----- "Fajar A. Nugraha" <fajar@xxxxxxxxx> wrote:
>
>> I don't think that's true.
>> When using virt-install, the LV will be treated as a whole disk. Thus
>> it
>> may have partitions, or even PV/LV inside it.
>
> Yes it does and that is what I was using kpart for.

To mount it, you need to calc your offset, try something like:

# fdisk -l -u /dev/lvmpart

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x000c11fd

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1 * 63 39086144 19543041 fd Linux raid autodetect
/dev/sda2        39086145    41062139      987997+  82  Linux swap / Solaris
/dev/sda3 41062140 312576704 135757282+ fd Linux raid autodetect

To mount the first sda-Partition ( 512 bytes * 63 = 32256 )

# losetup -o 32256 /dev/loop0 /dev/lvmpart
# mount /dev/loop0 /target/

or

# mount -o loop,offset=32256 /dev/lvmpart /target/

Maybe it helps,

Fabian


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