https://pve.proxmox.com/wiki/Proxmox_VE_4.x_Cluster#Re-installing_a_cluster_node
節點(node)主機重新安裝前的準備
請先將在這一部節點(node)主機上所有的虛擬機預先遷移至其他節點(node)主機上,
或是將虛擬機及虛擬機的設定檔備份到外接硬碟或隨身碟上.
停用以下的服務:
systemctl stop pvestatd.service systemctl stop pvedaemon.service systemctl stop pve-cluster.service
備份節點(node)和 欉集(cluster)的設定
Backup /var/lib/pve-cluster/
tar -czf /root/pve-cluster-backup.tar.gz /var/lib/pve-cluster
備分 /root/.ssh/ ,
there are two symlinks here to the shared pve config authorized_keys and authorized_keys.orig, don't worry about these two yet as they're stored in /var/lib/pve-cluster/
tar -czf /root/ssh-backup.tar.gz /root/.ssh
備份 /etc/corosync/
tar -czf /root/corosync-backup.tar.gz /etc/corosync
備份 /etc/hosts/
cp /etc/hosts /root/
備份 /etc/network/interfaces
cp /etc/network/interfaces /root/
將下列檔案以 scp 方式傳送至其它主機上存放(或直接以隨身隨儲存)
檔案列表如下:
重新安裝節點(node)主機
還原 node and cluster 的設定
將原先備份的設定檔複製到 /root 目錄下.
還原 /etc/hosts/
cp /root/hosts /etc/hosts
還原 /etc/network/interfaces
cp /root/interfaces /etc/network/interfaces
重要注意事項
Make sure that you have the right switch configuration in case you're 有使用 vlans, specific port assignments or LACP!
If you are using OVS (OpenvSwitch) you have to install the package before reboot.
apt-get install openvswitch-switch
將這一台節點(node)重新開機
停用下列服務:
systemctl stop pvestatd.service systemctl stop pvedaemon.service systemctl stop pve-cluster.service
還原 /root/.ssh/ 下的檔案
cd / ; tar -xzf /root/ssh-backup.tar.gz
Replace /var/lib/pve-cluster/ with your backup copy
rm -rf /var/lib/pve-cluster cd / ; tar -xzf /root/pve-cluster-backup.tar.gz
Replace /etc/corosync/ with your backup copy
rm -rf /etc/corosync cd / ; tar -xzf /root/corosync-backup.tar.gz
重新啟動 pve-cluster
systemctl start pve-cluster.service
還原 這兩個連結:
ln -sf /etc/pve/priv/authorized_keys /root/.ssh/authorized_keys ln -sf /etc/pve/priv/authorized_keys /root/.ssh/authorized_keys.orig
Start the rest of the services:
systemctl start pvestatd.service systemctl start pvedaemon.service
Re-add the node to the cluster to update the keys and then update the certs
pvecm add xxx.xxx.xxx.xxx -force pvecm updatecerts
Accept ssh keys (again) from other nodes This may not be required, but may be required in some cases to make it work without erros!
Additionally you'll need to establish a ssh connection from every cluster other node to the re-installed node via ssh to accept the new host key.
If you have several subnets configured in your nodes make sure that you're accessing the correct ip via ssh.
ssh xxx.xxx.xxx.xxx ........ yes
Now you can start creating virtual machines on your cluster nodes by using the Central Web-based Management on any node.