HA with two simple laptops

den

Member
Feb 19, 2015
64
1
6
Hey Guys

I want to create a HA environment using two physical laptops.
(Purpose is for a simple app that i want to test)

  • I have two physical laptops with the latest pve 4.x installed.
  • I have two nodes as a cluster in my datacenter.
  • I was hoping to create a simple directory under in /var/lib/vz/shared_dir
  • I was hoping anything on this "shared_dir" folder will be synced between the two nodes.
  • And if syncing is setup, then install the container's disk on this "shared_dir"
  • so if one node is offline, then the second node will continue to run the container..
please help.

thanks.
 
Hi udo,

You're right. Officially you need 3 nodes for PVE 4.x. In general, you only need STONITH when using DRBD.

Best,
LnxBil
 
does this only replicate an entire volume / drive?

what if I only wanted to sync a particular folder only? ie. /var/lib/vz/shared_dir ?

I was also looking at a win7 box that is visualized, running an application with a MS SQL database. Will DRBD be a suitable use for such a scenario?

Thanks..
 
Hi den,

You cannot share a directory as a filesystem over network without drawbacks (e.g. a third party storage server sharing the disk or asynchronous replication), you have to share a volume at block level. DRBD does exactly that. To have a "real" cluster with HA, you need a replicated storage backend with synchronous write, such that if one node fails, the other will be crash-consistent as the VM would be. In case of a database, you need that the redo logs will be on disk on ALL disks.

I strongly do NOT recommend this:
If you do not need a consistent replica, you can use PVE-zsync (https://pve.proxmox.com/wiki/PVE-zsync), glusterfs or else.

LnxBil
 
Thanks LnxBil for the recommendations. Very helpful.

Just wondering, when you create a cluster, the folder /etc/pve is synced between clusters (in real time?). What app/function does this?

Thanks..


I strongly do NOT recommend this:
If you do not need a consistent replica, you can use PVE-zsync (https://pve.proxmox.com/wiki/PVE-zsync), glusterfs or else.

LnxBil
 
Last edited:
LnxBil -

Thanks for the info. I was looking at PVE-zsync. So if I wanted to use PVE-zsync to backup a VM to the second node2, then if node1 ever goes down, I need to restore the VM on node1 and get it back up running correct?

And I assume PVE-zsync syncs only in one direction?

I guess its good to keep backups in sync between cluster nodes...


Hi den,

You cannot share a directory as a filesystem over network without drawbacks (e.g. a third party storage server sharing the disk or asynchronous replication), you have to share a volume at block level. DRBD does exactly that. To have a "real" cluster with HA, you need a replicated storage backend with synchronous write, such that if one node fails, the other will be crash-consistent as the VM would be. In case of a database, you need that the redo logs will be on disk on ALL disks.

I strongly do NOT recommend this:
If you do not need a consistent replica, you can use PVE-zsync (https://pve.proxmox.com/wiki/PVE-zsync), glusterfs or else.

LnxBil
 
ZFS snaphots in general are syncable in any direction if they do not diverge. It is not possible to sync if both are changed, you need to throw away one side.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!