I have one LV that is mirrored on 2 PV :
- /dev/mapper/mpatha
- /dev/mapper/mpathb
There is a 4mb LV on /dev/mapper/mpatha that holds the mirror log.
I am trying to migrate this LV on 2 new devices, with one of them holding the tiny log LV.
- /dev/mapper/mpaths
- /dev/mapper/mpatht
(sizes are identical between old and new devices)
Here is what I did so far :
pvcreate /dev/mapper/mpaths
pvcreate /dev/mapper/mpatht
vgextend vgdb2i1hom /dev/mapper/mpaths /dev/mapper/mpatht
lvconvert -m3 vgdb2i1hom/lvmnt0 /dev/mapper/mpaths /dev/mapper/mpatht
At this point I have 4 mirrors as expected. Now trying to remove one mirror holding the log LV :
lvconvert -m2 vgdb2i1hom/lvmnt0 /dev/mapper/mpatha
Mirror from mpatha was removed but log LV is still here
# lvs -a -o +devices vgdb2i1hom
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices
lvmnt0 vgdb2i1hom mwi-aom--- 49.99g [lvmnt0_mlog] 100.00 lvmnt0_mimage_2(0),lvmnt0_mimage_3(0),lvmnt0_mimage_4(0)
[lvmnt0_mimage_4] vgdb2i1hom iwi-aom--- 49.99g /dev/mapper/mpaths(0)
[lvmnt0_mimage_3] vgdb2i1hom iwi-aom--- 49.99g /dev/mapper/mpatht(0)
[lvmnt0_mimage_2] vgdb2i1hom iwi-aom--- 49.99g /dev/mapper/mpathb(0)
[lvmnt0_mlog] vgdb2i1hom lwi-aom--- 4.00m /dev/mapper/mpatha(2559)
How do I migrate this LV to new disk ?
Also :
[root@lblusd4t ~]# lvm version
LVM version: 2.02.143(2)-RHEL6 (2016-12-13)
Library version: 1.02.117-RHEL6 (2016-12-13)
Driver version: 4.33.1