Kompai Paskaitos Trumpi

LVM copy LV to LV

Cloning LV to mirror

lvconvert --type mirror --alloc anywhere -m1 /dev/VOL/LV-orig [/dev/vdc] && lvs -a -o +devices | egrep "LV|LV-orig"

Add /dev/vdc if you want to copy to a separate Physical device, yes you need to have it in your VG…

Split mirror

lvconvert --splitmirrors 1 --name LV-copy /dev/VOL/LV-orig

Split mirror to other PV

lvconvert --splitmirrors 1 --name LV-copy /dev/VOL/LV-orig /dev/vdc
lvs -a -o +devices | egrep "LV|LV-"
lvchange -an /dev/VOL/LV-copy
lvs -a -o +devices | egrep "LV|LV-"
vgsplit VOL NEW-VOL /dev/vdc
lvs -a -o +devices | egrep "LV|LV-"
vgchange -an NEW-VOL
vgexport NEW-VOL
root@localhost:~ #

External Links

By Ruslanas Gžibovskis

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.