Adding a mirror to an existing LVM volume (proxmox)
Adding a mirror to an existing LVM volume
Purpose
Mirror a LVM volume, e.g. add a mirror to proxmox's root/swap/data so that locally created VMs are protected from disk failure.
Prerequisities
2 physical disks.
Step by step
First, you'll need to add your second disk to the volume group containing the volumes you want to mirror:
pvcreate /dev/sdb1 # /dev/sdb1 is the physical disk to contain the mirrors
vgextend pve /dev/sdb1 # pve is volume group name you wish to extend
lvconvert -m 1 --corelog pve/data # -m 1 (how many mirrors to create) --corelog (keep the log in memory, requires a resync on reboot)