Search This Blog

Showing posts with label lvm. Show all posts
Showing posts with label lvm. Show all posts

Thursday, February 14, 2013

Copy LVM volume over network to another LVM pool

We need to copy huge LVM volume from HOST_A to LVM on HOST_B. It can be virtual machine disk for example.
On HOST_B create LVM_HOST_B volume and after that dd over ssh with gzip. And do not use /dev/mapper

#> dd bs=1M if=LVM_HOST_A | gzip --fast -c | ssh HOST_B "gzip -d -c | dd bs=1M of=LVM_HOST_B"

Awesome!

pv utility can show progress bar for dd. pv - monitor the progress of data through a pipe.
pv -ptrb