Move LVM logical volume to other server

When using LVM, there will be sooner or later the time when you want to move an existing LVM volume to another server. I used this twice:

dd if=/dev/volumegroupname/logicalvolume bs=4096 | pv | gzip | \
ssh root@example.com 'gzip -d | dd of=/dev/volumegroupname/logicalvolume' bs=4096

Source: Serverfault: Moving a Logical Volume directly from one server to another over the network?

Please check that the required packages are installed, for Debian use this line:

apt-get install coreutils gzip openssh-client pv

For creating a logical volume you can reffer the LVM HOWTO for this or a nice German LVM reference.

Leave a Reply

Your email address will not be published. Required fields are marked *