Raspberry Pi as third node: Difference between revisions
(Use a Rasberry Pi as third node in a cluster) |
m (clarify outdateness and underline QDevice as alternative) |
||
(10 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
[[Category: | [[Category:HOWTO]] | ||
<span style="color: red; font-size: 1.5em;">'''This article is outdated and can get you trouble fast if you ain't able or willing to troubleshoot Corosync. | |||
Never use it in a production environment! Simply use a QDevice as alternative!'''</span> | |||
'''For a current and better alternative, see:''' https://pve.proxmox.com/pve-docs/chapter-pvecm.html#_corosync_external_vote_support | |||
'''NOTE''': Ideally you install the Stretch version of Raspbian now, then you won't need to enable any backport repository. Further please take a look at corosync qdevice: https://www.mankier.com/8/corosync-qdevice it is much less resource hungry and less error prone, as with it the Raspberry Pi acts as quorum tie only, without running (parts of) Proxmox VE cluster stack. | |||
This short wiki will document how to prepare and configure a Rasberry Pi to use as third node (witness) in a Proxmox cluster. This how-to has been tested on a Rasberry Pi v3 but should also work on any other Rasberry Pi version where Raspbian is available. Raspbian version is Jessie. | |||
#Login as root on your Pi | |||
#Install Debian Jessie (Standard system utilities and SSH server) | |||
#echo "deb http://ftp.debian.org/debian jessie-backports main contrib" > /etc/apt/sources.list.d/jessie-backports.list | |||
#gpg --keyserver pgpkeys.mit.edu --recv-key 7638D0442B90D010 && gpg -a --export 7638D0442B90D010 | apt-key add - | |||
#gpg --keyserver pgpkeys.mit.edu --recv-key 8B48AD6246925553 && gpg -a --export 8B48AD6246925553 | apt-key add - | |||
#apt-get update | |||
#apt-get -t jessie-backports install corosync | |||
#sed -i 's/without-password/yes/' /etc/ssh/sshd_config && systemctl restart ssh | |||
#scp <ip of pve node>:/etc/corosync/* /etc/corosync | |||
#add new node under nodelist in /etc/corosync.conf (copy one of the current and adjust) | |||
#:<pre> | |||
#::for NODE in <ip of pve node 1> <ip of pve node 2>; do | |||
#:::scp /etc/corosync/corosync.conf $NODE:/etc/corosync | |||
#::done</pre> | |||
#ssh <ip of pve node 1> systemctl restart corosync | |||
#ssh <ip of pve node 2> systemctl restart corosync | |||
#systemctl start corosync | |||
#run corosync-quorumtool to check all three nodes are registered as online and that there is quorum: | |||
#:<pre> | |||
#::corosync-quorumtool | grep Quorate: | |||
#::Quorate: Yes</pre> | |||
'''WARNING''' | |||
*pve-manager is missing so don't add to /etc/pve/corosync.conf. | |||
*If new node is added pve-manager will overwrite /etc/corosync/corosync.conf | |||
*Use this at your own risk. |
Latest revision as of 15:32, 7 March 2020
This article is outdated and can get you trouble fast if you ain't able or willing to troubleshoot Corosync.
Never use it in a production environment! Simply use a QDevice as alternative!
For a current and better alternative, see: https://pve.proxmox.com/pve-docs/chapter-pvecm.html#_corosync_external_vote_support
NOTE: Ideally you install the Stretch version of Raspbian now, then you won't need to enable any backport repository. Further please take a look at corosync qdevice: https://www.mankier.com/8/corosync-qdevice it is much less resource hungry and less error prone, as with it the Raspberry Pi acts as quorum tie only, without running (parts of) Proxmox VE cluster stack.
This short wiki will document how to prepare and configure a Rasberry Pi to use as third node (witness) in a Proxmox cluster. This how-to has been tested on a Rasberry Pi v3 but should also work on any other Rasberry Pi version where Raspbian is available. Raspbian version is Jessie.
- Login as root on your Pi
- Install Debian Jessie (Standard system utilities and SSH server)
- echo "deb http://ftp.debian.org/debian jessie-backports main contrib" > /etc/apt/sources.list.d/jessie-backports.list
- gpg --keyserver pgpkeys.mit.edu --recv-key 7638D0442B90D010 && gpg -a --export 7638D0442B90D010 | apt-key add -
- gpg --keyserver pgpkeys.mit.edu --recv-key 8B48AD6246925553 && gpg -a --export 8B48AD6246925553 | apt-key add -
- apt-get update
- apt-get -t jessie-backports install corosync
- sed -i 's/without-password/yes/' /etc/ssh/sshd_config && systemctl restart ssh
- scp <ip of pve node>:/etc/corosync/* /etc/corosync
- add new node under nodelist in /etc/corosync.conf (copy one of the current and adjust)
- for NODE in <ip of pve node 1> <ip of pve node 2>; do
- scp /etc/corosync/corosync.conf $NODE:/etc/corosync
- done
- for NODE in <ip of pve node 1> <ip of pve node 2>; do
- ssh <ip of pve node 1> systemctl restart corosync
- ssh <ip of pve node 2> systemctl restart corosync
- systemctl start corosync
- run corosync-quorumtool to check all three nodes are registered as online and that there is quorum:
- corosync-quorumtool | grep Quorate:
- Quorate: Yes
WARNING
- pve-manager is missing so don't add to /etc/pve/corosync.conf.
- If new node is added pve-manager will overwrite /etc/corosync/corosync.conf
- Use this at your own risk.