You are hereLinux Administration / Virtualization
Virtualization
Articles about Xen, Virtualbox and friends
Copying a Virtual Machine lv or Partition Over SSH
Copying a Logical Volume or Partition over SSH
This should only be attempted on either a snapshot lvm volume, or an unmounted hard drive partition!
Using ssh and dd you can copy any LVM or (unmounted) hard drive partition over the internet to a new machine easily. You can do a "push" or "pull" copy. Here's a "push" copy:
dd if=/dev/vg0/partition-snapshot bs=1k |
ssh remotehost dd of=/dev/vg0/partition-destination bs=1k
Creating a LVM Mirror with LVM2's lvconvert tool.
Here’s one for the hall of fame of terrible error messages.
When trying to add a mirror to a LVM volume on a linux box, you get this message:
#lvconvert -m 1 disks/root /dev/sdb2
Not enough PVs with free space available for parallel allocation.
Consider --alloc anywhere if desperate.
This message is completely useless, we have TONS of free extents on both disks. So we check for help