HACMP配置文档
紫光软件系统有限公司
通用产品事业部
HACMP 配置文档
版权声明
本文档版权归紫光软件系统有限公司所有,未经紫光软件系统有限公司书面许可,任何单位或个人不得以任何形式或任何手段复制或传播本文档的一部分或全部。
Copyright © UNIS Software System CO.,LTD. All Right Reserved
This document is proprietary to UNIS Software System CO.,LTD., which regards information contained herein as its intellectual property. Under the copyright laws, no part of this document may be copied, translated, or reduced to any electronic medium or machine readable form, in whole or in part, without prior written consent of UNIS Software System CO., LTD.
版本记录
序号 变更内容概要 编制人/日期 审核人/日期 批准人/日期
第2页/共9页
HACMP 配置文档
1、软件环境
AIX 5300-05 HAMCP 5.4
2、硬件环境
P630两台
DS4300存储一台 串口线一根
3. 系统环境
3.1 /etc/hosts
127.0.0.1 loopback localhost p630a(另一节点为p630b) 192.168.1.100 p630a_stb 192.168.1.200 p630b_stb 192.168.2.100 p630a_boot 192.168.2.200 p630b_boot 192.168.3.100 p630a_svc 192.168.3.200 p630b_svc 3.2 /.rhosts 192.168.1.100 192.168.1.200 192.168.2.100 192.168.2.200 192.168.3.100 192.168.3.200
3.3 clcomdES
/usr/bin/startsrc -s clcomdES
3.4 确认网卡之间相互连通 确认串口线的连通
smitty tty->Change / add a TTY->rs232->sa->port number : 0
确认:
host1: cat /etc/hosts>/dev/tty0 host2: cat在 host2 可看到 host1 上 /etc/hosts 的内容。 同样再做反向检测
4. 配置HACMP
(以下操作只需在一个节点上操作即可)
第3页/共9页
HACMP 配置文档
4.1 配置网络拓朴
4.1.1 配置Cluster Name
# smitty hacmp Extended Configuration
Extended Topology Configuration Configure an HACMP Cluster
Add/Change/Show an HACMP Cluster
* Cluster Name [testcluster]
4.1.2 配置Cluster节点
# smitty hacmp Extended Configuration
Extended Topology Configuration Configure HACMP Nodes
Add a Node to the HACMP Cluste
*NodeName [NodeA] Communication Path to Node [p630a_boot] +
以同样方法将NodeB添加到Cluster中
*NodeName [NodeB] Communication Path to Node [p630b_boot] +
4.1.3 配置HACMP网络 4.1.3.1 创建IP网络
# smitty hacmp Extended Configuration Extended Topology Configuration Configure HACMP Networks
Add a Network to the HACMP Cluster
* NetworkName [net_ether_01]
* NetworkType ether * Netmask [255.255.255.0] + * Enable IP Address Takeover via IP Aliases [Yes] +
IP Address Offset for Heartbeating over IP Aliases [] 使用同样的方法创建[net_ether_02]
* Enable IP Address Takeover via IP Aliases [Yes] 此选项决定了HACMP的IP切换方式,但值得一提的是只有“boot”、“standby”、“service”三个IP分别为三个不同网段时必须选用IP Aliases方式。如果“boot”、“standby”其中一个与“service”为同一个网段时必须选用IP Replace,则此选项应选“NO”。
4.1.3.2 创建串口心跳网络
# smitty hacmp Extended Configuration Extended Topology Configuration Configure HACMP Networks
Add a Network to the HACMP Cluster
* NetworkName [net_rs232_01]
* Network Type rs232 第4页/共9页
HACMP 配置文档
4.1.3.3 创建磁盘心跳网络
# smitty hacmp
Extended Configuration
Extended Topology Configuration
Configure HACMP Networks
Add a Network to the HACMP Cluster
* Network Name [net_diskhb_01] * Network Type diskhb
4.1.4 添加网络到Cluster 4.1.4.1 创建IP通信接口
# smitty hacmp Extended Configuration Extended Topology Configuration Configure HACMP Networks
Configure HACMP Communication Interfaces/Devices Add Communication Interfaces/Device
Add Pre-defined Communication Interfaces and Devices Communication Interfaces
* IP Label/Address [p630a_boot] +
* Network Type ether * Network Name net_ether_01 * Node Name [NodeA] +
Network Interface [] 同样方法添加另一个通信接口到”net_ether_01”
* IP Label/Address [p630b_boot] +
* Network Type ether * Network Name net_ether_01 * Node Name [NodeB] +
Network Interface [] 同样方法添加另一个通信接口到”net_ether_01”
* IP Label/Address [p630a_ stb] +
* Network Type ether * Network Name net_ether_01 * Node Name [NodeA] +
Network Interface []
* IP Label/Address [p630b_ stb] +
* Network Type ether * Network Name net_ether_01 * Node Name [NodeB] +
Network Interface []
4.1.4.2 创建串口通信设备 第5页/共9页
HACMP 配置文档
# smitty hacmp Extended Configuration Extended Topology Configuration Configure HACMP Networks
Configure HACMP Communication Interfaces/Devices Add Communication Interfaces/Device
Add Pre-defined Communication Interfaces and Devices Communication Devices
* Device Name [rs232_node_a]
* Network Type rs232 * Network Name net_rs232_01 * Device Path [/dev/tty0] * Node Name [NodeA] +
以同样方法创建另一个串口通信设备
* Device Name [rs232_node_b]
* Network Type rs232 * Network Name net_rs232_01 * Device Path [/dev/tty0] * Node Name [NodeB] +
4.2 配置HACMP资源 4.2.1 配置资源
4.2.1.1 创建Applications Servers
# smitty hacmp Extended Configuration
Extended Resource Configuration
HACMP Extended Resources Configuration Configure HACMP Applications Servers Add an Application Server
* Server Name [appserver]
* Start Script [/hascript/clstart.sh] * Stop Script [/hascript/clstop.sh]
需要手动在两个节点上建立“/hascript/clstart.sh”、“/hascript/clstop.sh”并保证其有执行权限。如果是双机互备的话需要建立两个App Server。方法相同。
4.2.1.2 创建Service IP
# smitty hacmp Extended Configuration
Extended Resource Configuration
HACMP Extended Resources Configuration
Configure HACMP Service IP Labels/Addresses
Add a Service IP Label/Address
Configurable on Multiple Nodes
* IP Label/Address p630a_svc +
* Network Name net_ether_01 第6页/共9页
HACMP 配置文档
同样方法配置第二个Service IP
* IP Label/Address p630b_svc +
* Network Name net_ether_01
4.2.2 配置资源组 4.2.2.1 创建资源组
# smitty hacmp Extended Configuration
Extended Resource Configuration Add a Resource Group
* Resource Group Name [rg_node_a]
Participating Nodes (Default Node Priority) [NodeA NodeB] +
Startup Policy Online On Home Node O> + Fallover Policy Fallover To Next Prio> + Fallback Policy Fallback To Higher Pr> + 如果是双机互备的话以同样方法建立另一个资源组
* Resource Group Name [rg_node_b]
Participating Nodes (Default Node Priority) [NodeB NodeA] +
“Participating Nodes”选项决定了资源组中节点的优先级,写在前面的节点其优先级高于后面的节点。
根据实际需求决定资源组的:“Startup Policy”、“Fallover Policy”、“Fallback Policy”。 Startup Policy:
Online On Home Node Only: 只在主节点启动。在 “Participating Nodes”中写在第一位的节点启动。
Online On First Available Node:在第一个启动的节点启动。在“Participating Nodes”中所选择的所有节点中最先启动的节点上启动。 Online Using Distribution Policy:按照分布策略启动 Online On All Available Nodes:在所有启动的节点中启动。做并发群集时选择此项。如:Oracle RAC
Fallover Policy:
Fallover To Next Priority Node In The List:节点失败时资源组迁移到下一优先级节点
Fallover Using Dynamic Node Priority:节点失败时动态选择迁移节点 Bring Offline (On Error Node Only):将资源组下线
Fallback Policy:
Fallback To Higher Priority Node In The List:节点恢复时资源组返回优先级高的节点
Never Fallback:不进行资源组回迁
4.2.2.2 配置资源组属性
# smitty hacmp Extended Configuration
Extended Resource Configuration
Change/Show Resources and Attributes for a Resource Group
Resource Group Name rg_node_a 第7页/共9页
HACMP 配置文档
Participating Nodes (Default Node Priority) NodeA NodeB
Startup Policy Online On Home Node O>
Fallover Policy Fallover To Next Prio> Fallback Policy Fallback To Higher Pr> Fallback Timer Policy (empty is immediate) []+
Service IP Labels/Addresses [p630a_svc] +
Application Servers [appserver] +
Volume Groups [datavg]+
Use forced varyon of volume groups, if necessary false+ Automatically Import Volume Groups ture+ Filesystems (empty is ALL for VGs specified) []+ Filesystems Consistency Check fsck+
Filesystems Recovery Method sequential+ Filesystems mounted before IP configured false+ Filesystems/Directories to Export []+
Filesystems/Directories to NFS Mount [] Network For NFS Mount []+ Tape Resources []+ Raw Disk PVIDs []+ Fast Connect Services []+ Communication Links []+ Primary Workload Manager Class []+ Secondary Workload Manager Class []+ 如果是双机互备以同样方法修改另一个资源组属性
5. 校验并同步HACMP配置
# smitty hacmp Extended Configuration
Extended Verification and Synchronization
* Verify, Synchronize or Both [Both] +
* Automatically correct errors found during [Interactively] +
verification?
* Force synchronization if verification fails? [No] + * Verify changes only? [No] +
* Logging [Standard] +
6. 启动/停止HACMP
6.1 启动HACMP(快速路径:#smitty clstart) # smitty hacmp
System Management (C-SPOC) Manage HACMP Services Start Cluster Services
* Start now, on system restart or both now 第8页/共9页
HACMP 配置文档
Start Cluster Services on these nodes [NodeA NodeB]
* Manage Resource Groups Automatically BROADCAST message at startup? true Startup Cluster Information Daemon? false
Ignore verification errors? falsbe Automatically correct errors found during Interactively cluster start?
6.2 停止HACMP(快速路径:#smitty clstop) # smitty hacmp
System Management (C-SPOC) Manage HACMP Services Stop Cluster Services
* Stop now, on system restart or both Stop Cluster Services on these nodes BROADCAST cluster shutdown? *Select an Action on Resource Groups 第9页/共9页
now+
[NodeA NodeB] + true+
Move Resource Groups+
因篇幅问题不能全部显示,请点此查看更多更全内容