vSphere5 與 vSphere4 HA羣集工作方式的改變

我們先來看一下vSphere 4的羣集工作方式

在將主機添加到 VMware HA 羣集時,代理將上載到主機,並配置爲與羣集內的其他代理通信。添加到羣集的前五臺主機將指定爲首選主機,隨後的所有主機將指定爲輔助主機。首選主機維護和複製所有羣集狀況,並用
於啓動故障切換操作。如果從羣集內移除某臺首選主機,則 VMware HA 會將另一臺(輔助)主機提升爲首選
狀態。如果某臺首選主機將長時間處於脫機狀態,應從羣集中移除該主機,以便它可以被輔助主機替代。
加入羣集的任何主機必須與現有首選主機通信以完成其配置(當您正在將第一臺主機添加到羣集時除外)。必
須至少有一臺首選主機運行正常,以便 VMware HA 正確進行操作。如果所有首選主機均不可用(不響應),
則無法爲 VMware HA 成功配置任何主機。在規劃羣集的規模時,應考慮每個羣集五臺首選主機的限制。同樣,
如果羣集是在刀片服務器環境中實施的,則一個刀片機箱中最多隻能容納四臺首選主機。 如果所有五臺首選主
機位於同一機箱內,且該機箱出現了故障,則羣集將失去 VMware HA 保護

vSphere4 HA羣集這種情況雖然在服務器物理擺放設計上可以儘量避免同時5臺首選主機都宕機的情況,但是不免有時候會因爲agent的問題“鬧崩”。

vSphere 5改進了這個構架,採用了一種新的HA羣集工作方式,角色轉變爲Master和Slave,並且只有一臺master負責羣集的狀態監控,如果master宕機,羣集會馬上選舉新的Master主機,羣集工作方式有點像路由協議OSPF的DR選舉,不再是根據加入羣集的時間,詳見截取的官方文檔

Master and Slave Hosts
When you add a host to a vSphere HA cluster, an agent is uploaded to the host and configured to communicate with other agents in the cluster. Each host in the cluster functions as a master host or a slave host. When vSphere HA is enabled for a cluster, all active hosts (those not in standby or maintenance mode, or not disconnected) participate in an election to choose the cluster's master host. The host that mounts the greatest number of datastores has an advantage in the election. Only one master host exists per cluster and all other hosts are slave hosts. If the master host fails, is shut down, or is removed from the cluster a new election is held.
The master host in a cluster has a number of responsibilities:
1. Monitoring the state of slave hosts. If a slave host fails or becomes unreachable, the master host identifies
which virtual machines need to be restarted.
2. Monitoring the power state of all protected virtual machines. If one virtual machine fails, the master host ensures that it is restarted. Using a local placement engine, the master host also determines where the restart should be done.
3. Managing the lists of cluster hosts and protected virtual machines.
4. Acting as vCenter Server management interface to the cluster and reporting the cluster health state.
The slave hosts primarily contribute to the cluster by running virtual machines locally, monitoring their runtime states, and reporting state updates to the master host. A master host can also run and monitor virtual machines. Both slave hosts and master hosts implement the VM and Application Monitoring features.
One of the functions performed by the master host is virtual machine protection. When a virtual machine is protected, vSphere HA guarantees that it attempts to power it back on after a failure. A master host commits to protecting a virtual machine when it observes that the power state of the virtual machine changes from powered off to powered on in response to a user action. If a failover occurs, the master host must restart the virtual machines that are protected and for which it is responsible. This responsibility is assigned to the master host that has exclusively locked a system-defined file on the datastore that contains a virtual machine's configuration file.
vCenter Server reports whether a host is a master host or a slave host using a vSphere HA host state. This state is reported on the host's Summary tab in the vSphere Client and in the Host List view for a cluster or datacenter, if the HA State column has been enabled. An HA state of "Running (Master)" indicates the host is serving as a vSphere HA master host. A state of "Connected (Slave)" indicates the host is serving as a vSphere HA slave host. Several other states are provided to indicate when an election is underway or an error condition has occurred. The host's Summary tab provides a link next to the vSphere HA state of the host that explains the
current state. For more information about the error states see the vSphere Troubleshooting documentation .

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章