Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm attempting to remove an old 300GB drive from my volume group and replace it with a shiny, new 1TB drive.

The pvmove operation ran until 99.9% and then aborted. I believe this is because I ran pvcreate on /dev/sdf directly instead of creating a partition. My problem is, it moved the physical extents to /dev/sdf but the original drive, /dev/sdc1 is still in the volume group, and they both have identical extent counts. It seems that my vg has a duplicate set of extents.

Every guide for removing a disk from a vg involves a pvmove and a vgreduce. Since the extents are duplicate, I don't want to move them; I need to remove them from the vg entirely. How should I do this without damaging the integrity of the existing volume group?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted
pvmove /dev/mydev

will try to migrate all extents away from /dev/mydev, but will only be able to do so if there is enough space on the other physical volumes to fit those extents

vgreduce volgroup /dev/mydev

will then remove /dev/mydev from volgroup, but only if it holds no more extents in volgroup

Did you get an error when pvmove aborted at 99.9%?

edit: ok, your error sounds like you have a mirrored logical volume. you can convert it to non-mirrored by

lvconvert -m0 volgroup/logvol

after which you should be able to

pvmove /dev/mydev
vgreduce volgroup /dev/mydev
share|improve this answer
    
It was lvm ABORTING: Can't find mirror LV... –  Adam Lassek Oct 26 '09 at 8:41
    
it sounds like you somehow ended up with a mirrored lvm –  James Cassell Oct 27 '09 at 2:11
add comment

Your Answer

 
discard

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.