• slider image 168
:::
條列式新聞
新聞載入中,請稍後...

8-1-5 把原來刪除的 node 再重新加回來

https://pve.proxmox.com/wiki/Proxmox_VE_4.x_Cluster#Re-installing_a_cluster_node

Re-installing a cluster node
重新安裝 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 方式傳送至其它主機上存放(或直接以隨身隨儲存) 
檔案列表如下:

  • /root/pve-cluster-backup.tar.gz
  • /root/ssh-backup.tar.gz
  • /root/corosync-backup.tar.gz
  • /root/hosts
  • /root/interfaces

 

重新安裝節點(node)主機 

  • 將這一部主機關機
  • 如果你有使用 severals eth interfaces 和 LACP 或 some kind of load balancing you should configure the first port of the switch to single mode (no LACP) to allow the standard network config in proxmox to connect to the network.
  • 重新安裝 Proxmox VE , 並確認主機名稱(hostname)和原來的是一樣的.
  • 如果有授權的話,請重新啟用授權.
  • 執行系統更新, 以確保本機與其他主機上的套件是一致的.


還原 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

 

Working with the Proxmox VE Cluster

Now you can start creating virtual machines on your cluster nodes by using the Central Web-based Management on any node.


:::
展開 | 闔起

文章類別

書籍目錄

展開 | 闔起

線上使用者

5人線上 (3人在瀏覽線上書籍)

會員: 0

訪客: 5

更多…