Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

April 14 2013

clone lvm via ssh

one just creates the targetlv in the same size as the srclv (8g in this case),
and when telling pv this size for the transfer it shows all the bells and
whistles it can .. even ETA :_)

dd if=/dev/srcvg/srclv | 
pv -p -e -t  -r -a -s 8G | 
ssh -i /home/user/.ssh/sshprivatekey -C -c arcfour -l root 172.x.y.z 'dd of=/dev/targetvg/targetlv'

February 21 2012

migrate lvm based xen dom0 to another machine ..

.. or even ignore that it is xen, basically this command moves the content of an logical volume to another server, reducing bandwidth using gzip compression.

prerequisites:

  • create lvm on target machine
  • install "pv" on src machine

run

root@src:# dd if=/dev/vg/disk bs=4096 | pv | gzip -1 | ssh -p2222 targethost.org "gzip -dc | dd of=/dev/vg/disk"

on your target machine you may want to:

  • resize2fs if the target lvm is larger
  • fsck.extX /dev/vg/disk on the target machine
  • edit the domU.cfg according to your target machine
  • mount /dev/vg/disk /mnt && chroot /mnt ** edit network, hostname, hosts
Older posts are this way If this message doesn't go away, click anywhere on the page to continue loading posts.
Could not load more posts
Maybe Soup is currently being updated? I'll try again automatically in a few seconds...
Just a second, loading more posts...
You've reached the end.

Don't be the product, buy the product!

Schweinderl