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

Re: [Xen-users] sles 10 lvm install clone/copy

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



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