#ifconfig en0 detach
en0 down 以后,可以看到 persistent IP 已经切换到 en1 上。
#ifconfig en1 deach
然后,在到 ats2 节点上查看 cluster 的 log: On ats2:
/var/hacmp/adm/cluster.log
日志会记录 ats3 网络 down 的信息,但是由于网卡的 detach 操作与真正的网络故障不同,因此没有造成资源组切换。
On ats2
#clmgr - Sca state,CURRENT_NODE q rg rg1 ONLINE:ats3
结论 1:节点网卡使用 detach 命令 down,并不会造成资源组切换。 此时,使用 HMC,将 ats3 shutdown,模拟节点意外宕机。 On ats2
#tail -f /var/hacmp/adm/cluster.log
从上图的日志可以看到 ats3 已经 down,资源组 rg1 发生了切换。 On ats2
#clmgr -Sca state,CURRENT_NODE q rg rg1 ONLINE:ats1
结论 2:资源组 rg1 由于 ats3 节点的宕机,自动切换到 ats1 节点上。 将 ats3 分区重启启动 On ats1
#clmgr -a state,name q node ats3 STATE=\
将 ats3 的 cluster 服务启动: On ats2
#clmgr on no ats3
On ats2
#clmgr -a state,name q node ats3
由于资源组 rg1 的 failback 是打开的,因此在 ats3 的 cluster 服务启动以后,rg1 会回切到 ats3:
#clmgr – Sca state,CURRENT_NODE q rg rg1
从 ats2 的 cluster 日志,可以看到 ats3 的启动以及资源组 rg1 的 failback 动作:
模拟 ats3 上 cluster service 故障
cthags(group service)负责 PowerHA 与 CAA 之间的通讯 , 它替代之前版本 powerHA 的 grpsvcs。
clcomd 是 cluster 通讯的 deamon,替代之前版本 PowerHA 的 clcomdES。本小节将会模拟这两个进程异常对 cluster 造成的影响。
图 1.PowerHA 7.1 结构示意图
目前,资源组 rg1 运行在 ats3 上。模拟 ats3 的 cluster service 出现异常,然后观察日志:
On ats3
先模拟 clcomd 服务异常: 在 ats3 上 kill 掉 clcomd 进程:
查看 cluster 日志:
观察 cluster.log, 日志中出现了 rsct 的报错,但是资源组未发生切换:
结论 3:节点 clcomd 服务异常中断不会造成资源组切换。 将 clcomd 启动,模拟 cthags 服务出现异常:
操作完成以后,发现 telnet session 已经中断,HMC 上显示分区为“未激活”.