[linux-lvm] Migrating LVM

Phillip Susi psusi at cfl.rr.com
Wed Apr 21 16:24:38 UTC 2010

On 4/21/2010 10:18 AM, Ray Morris wrote:
>    pvmove is good for when you have to keep the machine
> live during the copy.  dd is about 10 times as fast if you
> can be down during the copy.  This specific dd invocation
> is the fastest I've found for the purpose, running 2-3 times
> faster than a simple dd without arguments:
> dd if=/dev/old_vg/$1 bs=64M iflag=direct | dd of=/dev/new_vg/$1 bs=64M
> oflag=direct

What arguments are best depend on many factors.  These particular ones
should be rather good if the src and and dest volumes are on the same
physical disk.  It would not be very good if they are on different
disks, since while dd is reading from the source, the output disk is
idle, and vice versa.  If src and dest are different disks, then you
want to not use direct, and stick with a more reasonable block size, say

Also if the fs has much free space in it then dd will waste a lot of
time on that.  You probably would save a lot of time doing something
like dump | restore.  This also does not require that the source and
destination be the same size.

More information about the linux-lvm mailing list