Month: August 2023

Split Mirror in RHEL

Split Mirror in RHEL

To copy one LV to another VG using LV mirror method. This method can not be performed on-line because of vgsplit command.

Note: RHEL doesn't have cplv command.

Steps

vgcreate vg01 /dev/vdb
lvcreate -L 1G -n test1 vg01
vgextend vg01 /dev/vdc
lvconvert --type raid1 --mirrors 1 /dev/vg01/test1 /dev/vdc
lvdisplay -m vg01/test1
lvconvert --splitmirrors 1 --name test2 /dev/vg01/test1
lvdisplay -m vg01/test1
lvdisplay -m vg01/test2
vgchange -a n vg01
vgsplit -t -v /dev/vg01 /dev/vg02 /dev/vdc
vgsplit -v /dev/vg01 /dev/vg02 /dev/vdc
lvs
vgchange -a y vg01
vgchange -a y vg02

References

How to move / copy logical volume (lv) to another volume group (vg)?