/var/lib/vz replication using drbd

Marc Ballat

Renowned Member
Dec 28, 2015
38
7
73
57
Hi,

I've been trying to setup replication between two cheap PCs (proxmox2 and proxmox3) using drbd :
Proxmox2
mounts resource data2 (/dev/drbd2) as primary at /var/lib/vz
has resource data3 (/dev/drbd3) as secondary​
Proxmox3
mounts resource data3 (/dev/drbd3) as primary at /var/lib/vz
has resource data2 (/dev/drbd2) as secondary​

/dev/drbd2 and /dev/drbd3 hold an ext4 filesystem and are on top of a logical volume. It looks like this :
sata hdd > volume group > logical volume > drbd resource > ext4fs

In the event that one of the machines dies, I can mount the secondary resource as primary on e.g. /mnt/data. But how do I go about migrating vm's and containers from the now dead proxmox server to the surviving one ?

Thanks in advance for your help.

Marc
 
Last edited: