0

I have a logical volume that is mirrored, it has two copies of the data and also its log is mirrored. It was created using something like:

lvcreate -m 1 --mirrorlog

I am planning to move this data to 2 new disks. The end result should be the same as its original state but in new disks. I was planning on using lvconvert, breaking the initial mirror converting to a linear volume, creating a new one with two copies (-m 2) on the new disks and removing the old one. The last step is the one I am concern about, how should the lvconvert syntax be to eliminate the last old volume?

lvconvert -m 1 --mirrolog <old_volume>???

Thanks

0

I think you can do that in two steps,

lvconvert -m0 vgname/lvname /dev/device_to_remove_of_old_one

Now you converted your mirror to linear and it reside on one old disk, Now you can copy your data to the new one disk

lvconvert -m 1 --mirrolog mirrored vgname/lvname /dev/one_of_your_new_device

Now your mirror has one side in your old disk and other on new one, We can now remove the old one

lvconvent -m0 vgname/lvname /dev/the_old_last_one 

Now you can do the last step

lvconvert -m 1 --mirrolog mirrored vgname/lvname /dev/second_of_your_new_device

Now your mirror is on your new disks, I think you can reduce the number of steps, using pvmove, But I had many problems with that command in the pas.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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