PowerHA 双机软件管理和检查
本文适用于 AIX 上的 PowerHA 双机集群,介绍如何用 smitty clstart / smitty clstop 启动和停止 HA,以及 HA 启动后如何检查集群进程、服务 IP 和数据卷组的状态。所有操作均在节点命令行下完成,文末附查看资源组状态与集群配置的常用命令。
HA 的启动和停止
启动 HA
在节点上执行以下命令,打开启动集群服务的菜单:
#smitty clstart菜单内容如下:
[Entry Fields]
* Start now, on system restart or both now +
Start Cluster Services on these nodes [sgapp1, sgapp2-> +
* Manage Resource Groups Automatically +
BROADCAST message at startup? false +
Startup Cluster Information Daemon? true +
Ignore verification errors? false +
Automatically correct errors found during Interactively +- 光标移动到
Start Cluster Services on these nodes,按 F4 可同时选择 2 个节点,让两个节点同时启动;如果只启动当前节点,这里保持默认。 - 光标移动到
Startup Cluster Information Daemon?,按 Tab 键改为true。 - 按回车执行 HA 的启动。
停止 HA
在节点上执行以下命令,打开停止集群服务的菜单:
#smitty clstop菜单内容如下:
[Entry Fields]
* Stop now, on system restart or both now +
Stop Cluster Services on these nodes [sgapp1 > +
BROADCAST cluster shutdown? false +
* Select an Action on Resource Groups Move Resource Group> +- 在
Stop Cluster Services on these nodes中选择要关闭的节点。 - 在
Select an Action on Resource Groups中选择资源组的处理方式:如果关闭 HA 后要把资源组(服务 IP、数据 VG、应用)切换到另一个节点,选择Move Resource Group;也可以选择另外两种方式Offline Resource Group或Unmanage Resource Group。
HA 状态检查
HA 启动后,依次检查集群进程、服务 IP 和数据卷组,确认资源组已在当前节点正常上线。
查看 HA 进程
检查目的:确认 HA 相关的集群子系统已经启动。
# lssrc -g cluster
Subsystem Group PID Status
clstrmgrES cluster 4522068 active
clevmgrdES cluster 5373968 active
clinfoES cluster 6226384 active判定标准:HA 启动后,cluster 组中的集群子系统应出现在列表中,且 Status 为 active。
查看服务 IP
检查目的:确认服务 IP 已经启动并绑定到网卡上。
# netstat -in
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
en4 1500 link#2 40.f2.e9.13.b0.22 18840 0 11731 3 0
en4 1500 10.12.253 10.12.253.22 18840 0 11731 3 0
en4 1500 10.12.2 10.12.2.22 18840 0 11731 3 0
en5 1500 link#3 40.f2.e9.13.b0.23 8500 0 2649 3 0
en5 1500 10.12.2 10.12.2.202 8500 0 2649 3 0
en5 1500 10.12.252 10.12.252.22 8500 0 2649 3 0判定标准:HA 启动后,服务 IP 应出现在 netstat -in 的输出中。服务 IP 的地址可以通过 cat /etc/hosts 查看。
查看卷组
检查目的:确认数据 VG 已经激活。
#lspv
hdisk0 00c70b97454be64f rootvg active
hdisk1 00c70b974a0a653d rootvg active
hdisk2 00c70b8764b3e67a caavg_private active
hdisk3 00c70b974f853429 appvg1 active判定标准:HA 启动后,数据 VG(示例中为 appvg1)对应磁盘的状态应为 active。
其他常用命令
- 查看 HA 的资源组状态(命令区分大小写):
/usr/es/sbin/cluster/utilities/clRGinfo - 查看 HA 的配置信息:
/usr/es/sbin/cluster/utilities/cltopinfo