I want to copy the LVM volume /dev/mapper/vg_avdvdfiler-lv_root on server A to LVM volume /dev/mapper/VolGroup00-LogVol00 on server B. Server A and server B are in the same IP segment. In the LVM volume on server A, there is all average 500M avi wmv mp4 etc.

I tried mounting /dev/mapper/vg_avdvdfiler-lv_root on server A to server B through NFS, then use cp to copy. It is clear I failed.

Because the LVM volume is too big, I do not have good idea why. I hope a good solution here.

If you want to copy the CONTENTS of the volume group I would suggest using tar or dump/restore piped over SSH (create an appropriate volgroup on Server B & restore the data) - see the man pages for those tools for more info.

If you want to copy the volume group itself (structure as well as contents), ask yourself why & insist on a good reason. If you come up with compelling reasons look into drbd or something similar

even if it dies, you can restart it and continue from there on
–
golemwashereAug 22 '12 at 17:46

+1 for ability to resume through use of rsync. You could also use rsync's options for compression which would help a bit. If you must maintain hard links across this transfer, you need to be careful of RAM usage when using -H option. Rsync also tries very hard to ensure the target file is same as source file if you use the checksum option - see notemagnet.blogspot.co.uk/2009/10/… - which is important given many TB of data. (Ideally you would have ZFS on both ends for end to end checksumming.)
–
RichVelOct 31 '12 at 16:16

You have to setup the lvm logical volume on the target machine first, with the same or more space.

Note, some people have suggested this with nc (netcat), however it won't work because netcat will close when it receives an EOF, of which there are many within a partition. Ssh doesn't have this problem.

I used bs=4096 instead of bs=512 because it was much faster. YMMV.

The reason pv is in there is that it shows you progress, which is pretty nice when sending large amounts of data so you get an idea of transfer rates and how long you expect to wait before it's finished.

From the netcat docs on the sourceforge project page, nc seems to do the opposite when an EOF is received: " This continues indefinitely, until the network side of the connection shuts down. Note that this behavior is different from most other applications which shut everything down and exit after an end-of-file on the standard input."
–
gravyfaceSep 30 '12 at 9:58