Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two volume groups on my server, from which I carve out 20-40G LVMs that I use for xen images:


I need to remove the xen3_images volume group, and I'd like to copy all the lvms from xen3_images to xen1_images (there is sufficient disk space).

I know I can do it one at a time by creating a logical volume on xen1_images, then

dd if=/dev/xen3_images/<lvname> of=/dev/xen1_images/<lvname>

but was wondering if there was another way of doing this in one step rather than piecemeal. There are about 20 lvms to move. Something akin to the way rsync works between directories would be perfect, but rsync does not work on lvms

share|improve this question
up vote 6 down vote accepted
  1. Merge the two volume groups: vgmerge xen1_images xen3_images
  2. Move all logical volumes off the physical volumes you want to reclaim: pvmove /dev/sdz42; pvmove /dev/sdz43; …
  3. Remove the PVs to reclaim from the VG: vgreduce xen1_images /dev/sdz42 /dev/sdz43 …
  4. (optional) Destroy the reclaimed PVs: pvremove /dev/sdz42 /dev/sdz43 …
share|improve this answer
That worked. Thank you – John P Apr 29 '11 at 0:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.