[SOLVED] Only run single node in cluster

ecotechie

Member
Nov 11, 2023
40
1
8
Hi,

I have a two node cluster configured, home setup. I have a primary node with all the needed services running. The secondary node is actually empty at the moment and not really needed. I plan on building it up, maybe, and have it available to migrate things as needed.

For the time being, I'd like to be able to power on the primary node and go about my day. There is no HA (clearly, since there is no third node) and I'd like to conserve energy.

Currently, I am powering everything off at night... I have managed to have a "working" solution by powering both machines on and then powering off the secondary node, but would like to just not power it on at all if not needed. I do realize this is an unconventional approach, but I think it's possible by editing the /etc/pve/corosync.conf file.

This is what I have so far to make this "work":
Code:
quorum {
  provider: corosync_votequorum
  two_node: 1
  auto_tie_breaker: 1
  last_man_standing: 1
}

Thanks for any input you may have here.
 
Got it working! Guess all it needed was setting:
two_node: 1
wait_for_all: 0


This makes it so we can have a two node cluster, but not wait for the other node.

Given my configuration this should not cause any issues, but I would guess anything using HA or more complex setups may have issues...

Code:
root@pod:~# cat /etc/pve/corosync.conf
logging {
  debug: off
  to_syslog: yes
}

nodelist {
  node {
    name: node2
    nodeid: 1
    quorum_votes: 1
    ring0_addr: 192.168.1.11
  }
  node {
    name: node1
    nodeid: 2
    quorum_votes: 1
    ring0_addr: 192.168.1.10
  }
}

quorum {
  provider: corosync_votequorum
  two_node: 1
  wait_for_all: 0
}

totem {
  cluster_name: cluster
  config_version: 8
  interface {
    linknumber: 0
  }
  ip_version: ipv4-6
  link_mode: passive
  secauth: on
  version: 2
}