Prima pagina Indietro Avanti Ultima pagina Panoramica Immagine

LVM e device mapper /4

Si può cambiare tipo di raid ad un singolo volume logico

Dai file ai blocchi del disco

root@linuxday2022:~# pvcreate /dev/vdd1 /dev/vde1

Physical volume "/dev/vdd1" successfully created.

Physical volume "/dev/vde1" successfully created.

root@linuxday2022:~# vgextend vg /dev/vdd1 /dev/vde1

Volume group "vg" successfully extended

oot@linuxday2022:~# lvconvert --type raid5 /dev/vg/lv2

Using default stripesize 64,00 KiB.

Replaced LV type raid5 (same as raid5_ls) with possible type raid1.

Repeat this command to convert to raid5 after an interim conversion has finished.

Are you sure you want to convert linear LV vg/lv2 to raid1 type? [y/n]: y

Logical volume vg/lv2 successfully converted.

root@linuxday2022:~# lvs

LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert

lv1 vg mwi-aom--- 7,00g [lv1_mlog] 100,00

lv2 vg rwi-a-r--- 5,00g 54,52

root@linuxday2022:~# lvconvert --type raid5 /dev/vg/lv2

Using default stripesize 64,00 KiB.

--stripes not allowed for LV vg/lv2 when converting from raid1 to raid5.

Are you sure you want to convert raid1 LV vg/lv2 to raid5 type? [y/n]: y

Logical volume vg/lv2 successfully converted.