How to shutdown unused node without quorum problems

yurtesen

Member
Nov 14, 2020
38
5
13
In a 2 node cluster, is it possible to shutdown one of the nodes to conserve energy without having quorum issues?
I have setup the nodes so that they can wake up with the WOL packet.

The problem is that when one node is off, the other does not accept changes anymore due to quorum.

I checked the qdevice but it does not sound like a great solution. Because one needs to remember to remove it while adding new nodes, and it has adverse effects if cluster node number becomes odd.

JSON:
nodelist {
  node {
    name: pve1
    nodeid: 1
    quorum_votes: 1
    ring0_addr: foobar1
  }
  node {
    name: pve2
    nodeid: 2
    quorum_votes: 1
    ring0_addr: foobar2
  }
}

I want to turn off pve2. Could a solution be setting quorum_votes of pve1 to 2?

In that case if pve2 goes off and expected is 2 then there would be quorum. But there would be no quorum if pve1 goes off? Is this how it would work?

What happens when pve2 comes up after long time? all config is copied from pve1 to pve2?

I can see that pvecm command can set votes for a node when adding the node. Is there a command to change the quorum_votes? or one needs to edit the conf file manually?

Thanks!
 
Last edited:
I checked the qdevice but it does not sound like a great solution. Because one needs to remember to remove it while adding new nodes, and it has adverse effects if cluster node number becomes odd.

I would ever recommend using a quorum device or another full node - messing around with 2 nodes will always be a hassle. Whats wrong about having the setup, its not that much of a deal to edit corosync.conf when your following the docs?

I want to turn off pve2. Could a solution be setting quorum_votes of pve1 to 2?

In that case if pve2 goes off and expected is 2 then there would be quorum. But there would be no quorum if pve1 goes off? Is this how it would work?
When pve2 is offline, while pve1 has 2 votes and pvecm expected is set to 2: the login works

1668069346704.png

When pve1 with 2 votes is offline no login possible via WEB-UI:

1668069213388.png

A solution for you to have always a working WEB-UI while either pve1 or pve2 are offline could be to give each node 2 votes. But with doing this, pve also sets expected votes to 4. I tried setting it to 2 but this doesnt work:

root@pve-virt-01:~# pvecm expected 2
Unable to set expected votes: CS_ERR_INVALID_PARAM

I guess it has its reason why this is not allowed - setting up a quorum device is the way to go.

1668069554271.png

What happens when pve2 comes up after long time? all config is copied from pve1 to pve2?

You should never edit corosync.conf while one node of your cluster is offline --> this will break the cluster and you have to manually fix it with a lot of commands. I needed in once: https://forum.proxmox.com/threads/made-mistake-in-corosync-conf-now-cannot-edit.77173/

So turn on your machine when your editing clusterwide-config files (I only know about corosync.conf) other files maybe not that relevant.

I can see that pvecm command can set votes for a node when adding the node. Is there a command to change the quorum_votes? or one needs to edit the conf file manually?

I didnt find a command, I edited corosync.conf and it worked.

Another solutions could be to set pve expected via SSH to 1 AFTER the shutdowned node is offline. This will allow you to login on pve1, when pve2 is down (both have still votes = 1).

Code:
root@pve-virt-01:~# pvecm expected 1
root@pve-virt-01:~# pvecm status
Cluster information
-------------------
Name:             pve-cluster
Config Version:   5
Transport:        knet
Secure auth:      on

Quorum information
------------------
Date:             Thu Nov 10 09:49:42 2022
Quorum provider:  corosync_votequorum
Nodes:            1
Node ID:          0x00000001
Ring ID:          1.31
Quorate:          Yes

Votequorum information
----------------------
Expected votes:   1
Highest expected: 1
Total votes:      1
Quorum:           1
Flags:            Quorate

Membership information
----------------------
    Nodeid      Votes Name
0x00000001          1 192.168.88.212 (local)

This will allow you to login via UI. Proxmox seems to magically set it to 2 again, after pve2 comes online again.

Heres a good guide for setting up a quorum device: https://florianmuller.com/setup-a-p...berrypi-as-a-third-quorum-vote-device-qdevice
 
Last edited:
  • Like
Reactions: yurtesen
Thanks, I have set votes of pve1 to 2. Things seem to be fine so far :)

If I can't login to pve2 when it is only node up, I can set expected to 1 manually with SSH.

I am still curious about what will happen when pve2 comes up after adding more VMs to pve1. I will assume that pve2 will get updated configuration automatically.

Thanks for heads up about not editing corosync.conf when some nodes are down :)
 

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!