I'd like to report that I got the corosync-qdevice thing to work for my 2-node cluster.
Previously I was using the raspberry-pi-as-a-third-node approach which seemed like a hacky solution. The dummy node shows up in the proxmox cluster info as unusable nodes (because they are) and it blocks me from creating a new VM until I temporarily remove those dummy nodes from the corosync config and restart corosync. It wasn't really ideal.
Based on this
nugget of information from pve mail post, I did the following to make this work in my 2-node cluster environment.
For context this is my environment:
- host: proxmox (one of the nodes in my cluster)
- host: proxmox-b (the other node in my cluster)
- host: witness (the non-proxmox raspberry pi node that I use as a corosync 'witness' for quorum votes)
On all three hosts, I installed corosync-qdevice & corosync-qnetd (I think that qnetd is only needed on the non-proxmox host but not sure):
Code:
apt-get install corosync-qdevice
apt-get install corosync-qnetd
Next I made sure that
proxmox,
proxmox-b, and
witness could all ssh to each-other cleanly as root.
On
proxmox, ran the following (where the last three arguments):
Code:
corosync-qdevice-net-certutil -Q -n <cluster name> <ip address for witness> <ip address for proxmox> <ip address for proxmox-b>
(you can determine the cluster name by looking at the
cluster_name value in
/etc/corosync/corosync.conf
Edited
/etc/corosync/corosync.conf and added the following to the quorum section:
Code:
quorum {
provider: corosync_votequorum
device {
model: net
votes: 1
net {
tls: on
host: <ip address for witness>
algorithm: ffsplit
}
}
}
Then restarted corosync service and corosync-qdevice service:
Code:
service corosync restart
service corosync-qdevice start
Did the same steps of editing corosync.conf and restarting stuff on
proxmox-b
Afterwards,
corosync-quorumtool shows the following:
Code:
root@proxmox:/etc/corosync# corosync-quorumtool
Quorum information
------------------
Date: Sun May 27 00:54:41 2018
Quorum provider: corosync_votequorum
Nodes: 2
Node ID: 1
Ring ID: 1/4656
Quorate: Yes
Votequorum information
----------------------
Expected votes: 3
Highest expected: 3
Total votes: 3
Quorum: 2
Flags: Quorate Qdevice
Membership information
----------------------
Nodeid Votes Qdevice Name
1 1 A,V,NMW <ip address of proxmox> (local)
2 1 A,V,NMW <ip address of proxmox-b>
0 1 Qdevice
Tested this by rebooting
witness. Everything was fine. While
witness was rebooting, I observed that
corosync-quorumtool showed that
witness did not have any votes but the cluster was otherwise healthy.
Further tested this by rebooting
proxmox-b. While this was rebooting,
corosync-quorumtool showed that the node dropped off but still had 2 votes and quorum and was otherwise healthy.
This may or may not work for you, so beware if you start tinkering!