7:查看初始化节点是否发出心跳通知
Grep -i totem /var/log/messages
[root@node2 corosync]# grep -i totem /var/log/messages
Oct 9 18:42:07 localhost corosync[16061]: [TOTEM ] Initializing transport (UDP/IP).
Oct 9 18:42:07 localhost corosync[16061]: [TOTEM ] Initializing transmit/receive security: libtomcrypt SOBER128/SA1HMAC (mode 0).
Oct 9 18:42:07 localhost corosync[16061]: [TOTEM ] The network interface [192.168.20.40] is now up. #监听端口已经起来
Oct 9 18:42:08 localhost corosync[16061]: [TOTEM ] A processor joined or left the membership and a new membershipwas formed.
8:检测混合日志中是否有错误:
因为我们没有使用stonish设备,所以没有stonish资源,stonish 设备有电源交换机,如果有一个节点失效,电源交换机将自动断开这个节点。
[root@node1 corosync]# grep -i error /var/log/messages
Oct 7 23:46:15 localhost : error getting update info: Cannot retrieve repository metadata (repomd.xml) for repository: rhel-server. Please verify its path and try again
Oct 8 00:46:46 localhost : error getting update info: Cannot retrieve repository metadata (repomd.xml) for repository: rhel-server. Please verify its path and try again
Oct 9 18:41:42 localhost pengine: [11598]: ERROR: unpack_resources: Resource start-up disabled since no STONITH resources have been defined
Oct 9 18:41:42 localhost pengine: [11598]: ERROR: unpack_resources: Either configure some or disable STONITH with the stonith-enabled option
9:查看pacemaker 的成员管理器是否启动
[root@node1 corosync]# grep -i pcmk_startup /var/log/messages
Oct 9 18:40:39 localhost corosync[11588]: [pcmk ] info: pcmk_startup: CRM: Initialized
Oct 9 18:40:39 localhost corosync[11588]: [pcmk ] Logging: Initialized pcmk_startup
Oct 9 18:40:39 localhost corosync[11588]: [pcmk ] info: pcmk_startup: Maximum core file size is: 4294967295
Oct 9 18:40:39 localhost corosync[11588]: [pcmk ] info: pcmk_startup: Service: 9
Oct 9 18:40:39 localhost corosync[11588]: [pcmk ] info: pcmk_startup: Local hostname: node1.a.com:
10:执行crm 进入资源管理器
在任何一个节点上 用资源管理器查看集群的成员状态
Configure 进入到资源管理的配置模式 show查看corosync的配置信息
Ra 进入到资源管理的资源代理模式
crm(live)ra# help
This level contains commands which show various information about
the installed resource agents. It is available both at the top
level and at the `configure` level.
Available commands:
classes list classes and providers #列出代理类型
list list RA for a class (and provider) # 列出 代理所控制的资源
meta show meta data for a RA #显示 资源代理的使用方法
providers show providers for a RA and a class
quit exit the program
help show help
end go back one level
crm(live)ra# list heartbeat
AudibleAlarm Delay Filesystem ICP IPaddr IPaddr2 IPsrcaddr IPv6addr LVM
LinuxSCSI MailTo OCF Raid1 SendArp ServeRAID WAS WinPopup Xinetd
apache db2 hto-mapfuncs ids portblock