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] Move domU lvm based to another dom0

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Move domU lvm based to another dom0
From: Bartosz Lis <bartoszl@xxxxxxxxxxxxx>
Date: Tue, 10 Nov 2009 19:09:38 +0100
Delivery-date: Tue, 10 Nov 2009 10:11:27 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <EF6A625B2DE54F56A72943E8A8663247@L3ETT70>
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>
Organization: Politechnika Łódzka
References: <B1CA05A2562C47338DC630005FAA4611@L3ETT70> <7207d96f0911100022t71e0e099o5d67bf748906efe@xxxxxxxxxxxxxx> <EF6A625B2DE54F56A72943E8A8663247@L3ETT70>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.12.3 (Linux/2.6.28.10-3; KDE/4.3.3; x86_64; ; )
Dnia wtorek, 10 listopada 2009 o 12:19:15 Cristian Rojas napisał(a):
> Thanks Fajar, how do you normally copy the LVM storage to another dom0?
> 
> Chris
> 

Hi,

First you have to stop domU. Sorry for reminding obvious things, but the next 
steps will be disastrous if done while domU is running. 

You can mount each volume of your domU in some directory of your dom0. On the 
target host you have to create analogous volumes as on source host, format and 
mount them too. Now, from your workstation, you can do:

[you@workstation]$ ssh -A root@xxxxxxxxxxx
[root@source]# tar -jcC /source/mount/point . | \
ssh root@xxxxxxxxxxx 'tar --numeric-owner -jxpC /target/mount/point'

or

[root@source]# dump ... | gzip | ssh root@xxxxxxxxxxx 'gunzip | restore ...'

or similar things with rsync.

If your domU is not unix and you have created target volumes with exactly same 
size, do not mount volumes but run:
[root@source]# dd if=/dev/VG_source/LV_source | gzip | \
ssh root@xxxxxxxxxxx 'gunzip | dd of=/dev/VG_target/LV_target' 

If your workstation is not unix but windows learn about puttyagent.

Now, my favorite: If you have empty disk with USB or external SATA interface, 
you can connect it to the source host. Hardcore players hotplug common SATA 
disks to internal SATA connectors on the motherboard, but read the following 
warning. When lsscsi shows the connected disk do pvcreate on that disk, then 
vgextend, pvmove, vgsplit, vgexport, then move the disk to the target host and 
do vgimport, vgmerge, pvmove, vgreduce. Now you can run domU and disconnect 
the auxiliary disk, but remember to wipe -k that disk if your domU contains 
sensitive data (and usually root password and ssh server keys are such data). 
This way is a very risky way! Don't blame me if YOU LOOSE ALL YOUR DATA on 
your source or target hosts or even BURN SOME HARDWARE. In case your system 
crashes and boots only in single mode try to run pvmove wthout arguments. You 
are warned, but no risk, no fun.

If you have Fibre Channel or iSCSI, talk to your SAN administrator.

Regards,

-- 
Bartosz Lis

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