[SOLVED] Is it possible to make failover with 2 nodes and zfs

fxandrei

Member
Jan 10, 2013
54
1
8
So i have 2 servers, with proxmox 5.4 installed, with zfs disks, and configured in a cluster.
They are identical.
One very important thing is that i have no shared storage. So the vms run locally (as is, they have local disks.... so no live migration).

So i have some vms on node1.
From what i know i can replicate the disks from node1 on node2 (because of zfs) and if node1 fails i can manually restart them on node2.
Is there a way to have auto failover ?

So for me this scenario would work:
- have the disks replicated from node1 to node2
- if node1 fails the vms should start on node2 with the replicated disks (even if they are not the latest disks).
- manually revert back node1 when possible

Anyone ever had this scenario ?
 

Richard

Proxmox Staff Member
Staff member
Mar 6, 2015
719
25
28
Austria
So i have 2 servers, with proxmox 5.4 installed, with zfs disks, and configured in a cluster.
They are identical.
One very important thing is that i have no shared storage. So the vms run locally (as is, they have local disks.... so no live migration).

So i have some vms on node1.
From what i know i can replicate the disks from node1 on node2 (because of zfs) and if node1 fails i can manually restart them on node2.
Is there a way to have auto failover ?

So for me this scenario would work:
- have the disks replicated from node1 to node2
- if node1 fails the vms should start on node2 with the replicated disks (even if they are not the latest disks).
- manually revert back node1 when possible

Anyone ever had this scenario ?

That's possible, but not in a 2-node cluster. If in a 2-node cluster 1 one fails also the other is not operable (quorum missed). If you add a 3rd node the requested scenario will work - HA has to be configured.
 
Jul 28, 2017
36
1
8
So i have 2 servers, with proxmox 5.4 installed, with zfs disks, and configured in a cluster.
They are identical.
One very important thing is that i have no shared storage. So the vms run locally (as is, they have local disks.... so no live migration).

So i have some vms on node1.
From what i know i can replicate the disks from node1 on node2 (because of zfs) and if node1 fails i can manually restart them on node2.
Is there a way to have auto failover ?

So for me this scenario would work:
- have the disks replicated from node1 to node2
- if node1 fails the vms should start on node2 with the replicated disks (even if they are not the latest disks).
- manually revert back node1 when possible

Anyone ever had this scenario ?
I kept getting asked this, as we only have two machines, the short answer as above it no. You need to have odd voting, so in theory you could have a node with 2 votes and one with 1, but this will mean it will never really failover (unless you then edit the votes after the host goes down)

It's easier to have a small 3rd node (NUC or other small PC), just powerfull enough to run Proxmox, but not host any machines, that would give you the 3rd vote, and enable you to have failover.
 

fxandrei

Member
Jan 10, 2013
54
1
8
This will "fix" just the votes problem (maybe i can have a vm with proxmox on another server).
But what about the fact that i dont have a shared storage?
 

Richard

Proxmox Staff Member
Staff member
Mar 6, 2015
719
25
28
Austria

fxandrei

Member
Jan 10, 2013
54
1
8
Well this is not clear to me.
If i add another node to the cluster, i can then make a ha group consisting of the "real" nodes right ?!
Then i go and replicate the disks from node a to node b (the real nodes).
If nodeA fails, the will get restarted on nodeB ?
 

Richard

Proxmox Staff Member
Staff member
Mar 6, 2015
719
25
28
Austria

fxandrei

Member
Jan 10, 2013
54
1
8
So this seems to be working.
I made another vm on another server that was in the same network as the 2 real nodes.
I added this vm to the cluster, and the made a ha group consisting of the 2 real nodes.
The zfs replication was on for each vm

I then moved one vm on node2, and went ahead and force-reset it.
I saw that the vm that was on node2 migrated to node2 and started.

Another thing that i observed is the fact that if migrate a vm to one node, its replication setting changes so that it replicates to the node it came from.

This is pretty nice.
A HA cluster with 2 nodes and no shared storage.

One thing to mention is the fact that you cannot live migrate a vm from the GUI, and this quote from the proxmox wiki :
recovery works, but there may be some data loss between the last synced time and the time a node failed.
So if the vms used change a lot, well, you probably should try to use shared storage.


Other than that i think this setup is pretty solid.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE 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 your own in 60 seconds.

Buy now!