Experimente assim ...
lvconvert -m1 /dev/volgroup/volume
Abaixo está o log de comando do meu teste. Eu fiz isso em dispositivos de loopback -
Crie 3 dispositivos de loopback
dd if=/dev/zero of=disk1 bs=1M count=100
dd if=/dev/zero of=disk2 bs=1M count=100
dd if=/dev/zero of=disk3 bs=1M count=200
[root@localhost ~]# losetup -f /root/disk1
[root@localhost ~]# losetup -f /root/disk2
[root@localhost ~]# losetup -f /root/disk3
[root@localhost ~]# losetup -a
/dev/loop0: [64768]:17900481 (/root/disk1)
/dev/loop1: [64768]:17900482 (/root/disk2)
/dev/loop2: [64768]:17900483 (/root/disk3)
Crie PVs
[root@localhost ~]# pvcreate /dev/loop0
Physical volume "/dev/loop0" successfully created
[root@localhost ~]# pvcreate /dev/loop1
Physical volume "/dev/loop1" successfully created
[root@localhost ~]# pvcreate /dev/loop2
Physical volume "/dev/loop2" successfully created
[root@localhost ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/loop0 lvm2 --- 100.00m 100.00m
/dev/loop1 lvm2 --- 100.00m 100.00m
/dev/loop2 lvm2 --- 200.00m 200.00m
/dev/sda2 centos lvm2 a-- 7.51g 40.00m
Crie VG e LV com 2 listras
vgcreate StripedVG /dev/loop0 /dev/loop1
lvcreate -l +100%FREE -i2 -n StripedLV StripedVG
Using default stripesize 64.00 KiB.
Logical volume "StripedLV" created.
Formataremontar
mkfs/dev/mapper/StripedVG-StripedLVmount/dev/mapper/StripedVG-StripedLV/mnt
Agoravamosadicionarnosso3ºPVaoVG
vgextendStripedVG/dev/loop2Volumegroup"StripedVG" successfully extended
E agora converta
[root@localhost ~]# lvconvert -m1 StripedVG/StripedLV
StripedVG/StripedLV: Converted: 0.0%
StripedVG/StripedLV: Converted: 83.3%
StripedVG/StripedLV: Converted: 100.0%
Remova a parte listrada do espelho
[root@localhost ~]# lvconvert -m0 StripedVG/StripedLV /dev/loop0 /dev/loop1
Logical volume StripedLV converted.
Eagoraselivredo/dev/loop0e/dev/loop1
[root@localhost~]#vgreduceStripedVG/dev/loop0Removed"/dev/loop0" from volume group "StripedVG"
[root@localhost ~]# vgreduce StripedVG /dev/loop1
Removed "/dev/loop1" from volume group "StripedVG"
[root@localhost ~]# pvremove /dev/loop0 /dev/loop1
Labels on physical volume "/dev/loop0" successfully wiped
Labels on physical volume "/dev/loop1" successfully wiped
Então o que temos finalmente é isso
Editar1:
OqueeudescreviacimafuncionanoCentOS6,masnãofuncionanoCentOS7.
AchoquenoCentOS7essaregraentraemação.
Desdelistrado!=Linear,elefalha.
Acabeiderecompilaropacotelvmrpmdafonte,masadicioneimaisdepuração
Eaquiestáasaída
[root@localhostx86_64]#lvconvert-m1StripedVG/StripedLV'--mirrors/-m'isnotcompatiblewithstripedarg_count=1seg_is_linear=0seg_is_mirrored=0
Então,basicamente,todasas3condiçõessãoavaliadascomoverdadeiraseinserimosoblocodetratamentodeerros.
arg_count=1!seg_is_linear=!(0)=1!seg_is_mirrored=!(0)=1
Editar2:
EuencontreiasoluçãoparaoCentOS7.EmvezdeRAID1-precisamosusar--typemirror
lvconvert--typemirror-m1StripedVG/StripedLV
EentãoconvertaparaLineareescolhaquaisPVsserãoremovidos
lvconvert-m0StripedVG/StripedLV/dev/loop0/dev/loop1