How can I best add drives to my volume group and keep things mirrored?
My current setup has a volume group containing two drives, within the group I have two logical volumes, both of which are mirrored across the two drives.
Now I want to add 2 more drives to the volume group, so 4 drives in total, but I want to keep things synced across at least two devices. Does lvm handle this seamlessly? What's the best way to migrate or do this?
To further clarify, here's an example scenario:
physical volumes: drive 1, drive 2 (6TB each)
volume group: 12TB
logical volume 1: 6TB, mirrored across drive 1, drive 2
logical volume 2: 6TB, mirrored across drive 1, drive 2
Desired setup:
physical volumes: drive 1, drive 2, drive 3, drive 4
volume group: 24TB
logical volume 1: 12TB, mirrored with 100% redundancy
logical volume 2: 12TB, mirrored with 100% redundancy
I want to add physical volume drive 3, drive 4, then hopefully if possible, simply expand my logical volumes. If one drive breaks, the data should still be available on another. I don't know if this is possible when the logical volume spans drives.
My other option is to create a new volume group for drive 3, drive 4, then create a max size logical volume from it, transfer the data from my first volume group, then erase a logical volume from group 1 and expand the other one.
Additionally, I wonder how safe that is to do in place, because I don't have a third copy of the data, so if something goes wrong when expanding/adding data, I'm screwed.
Also one last note, none of my proposed solutions have to be used, a more experienced user might think of something entirely different and more appropriate, as long as it uses lvm I am happy with the answer.