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] sles 10 lvm install clone/copy

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] sles 10 lvm install clone/copy
From: Jean-Francois Saucier <jfsaucier@xxxxxxx>
Date: Wed, 25 Apr 2007 15:19:32 -0400
Delivery-date: Thu, 26 Apr 2007 10:04:38 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Organization: Infoglobe
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Ulrich Windl wrote:
> On 21 Nov 2006 at 8:08, Tijl Van den Broeck wrote:
>
>   
>> Only if they are equally sized you can use "dd
>> if=/dev/mapper/lvmachine1 of=/dev/mapper/lvmachine2 bs=1M". If they
>>     
>
> Actually the reason why I did NOT do it that way was that some filesystems 
> assign 
> a UUID to the filesystem (which is essential for FS repair in reiserfs for 
> example). That way, both filesystems would have the same UUID. I preferred to 
> mount both systems (DomUs) in Dom0 and did a "cp -a". Then unmount and boot 
> DomUs.

I found something that might interest you. If you want to mount the domU
LVM image, you can do the following :

fdisk -l -u /dev/vg1/lv1


You will get something similar to this output :

Disk /dev/vg1/lv1: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders, total 8388608 sectors
Units = sectors of 1 * 512 = 512 bytes

        Device Boot      Start         End      Blocks   Id  System
/dev/vg1/lv1p1              63      899639      449788+  82  Linux
swap / Solaris
/dev/vg1/lv1p2   *      899640     8385929     3743145   83  Linux


So now, if you want to mount the second partition in the LVM, you must
take the start number (899640) and multiply it by 512. This will give
you the offset of the partition (460615680). After this, mount the
partition with this command :

mount -o loop,offset=460615680 /dev/vg1/lv1p2 /mnt


-- 
Jean-François Saucier
TC2L, http://tc2l.ca


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

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Xen-users] sles 10 lvm install clone/copy, Jean-Francois Saucier <=