As title, if I have 2 LV(s) with the same content, can I merge them into one raid1 LV?
Basically, I want to convert a partition in an old disk to a LVM raid1. My origin plan is:
- Create a new LV and copy data in the old partition to it.
- Wipe the old partition, and add it into the VG as an empty PV.
- Convert LV to raid1 LV, and sync it to the empty PV.
However, I found a way to convert a partition to LV inplace after I finished the step 1.
If I do so, I will have 2 LVs with same content. Can I merge them into a raid1 LV? so I don't have to copy the whole filesystem again.
Maybe I can do so by manually create *_rmeta_[12] and *_rimage_[12]?
(but I don't know how to)
Edit 1
Nice, I know how to create mapping under /dev/mapper,
and I can create raid mapping too.
Just use the dmsetup table to inspect and mimic other
raid LV, and create them with dmsetup create.
But lvm does not recognize the created LVs! so the problem become: How can I create LV with dmsetup?