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
|