您的位置:首页 > 其它

Twitter创始人谈创业经验

2011-07-19 00:00 274 查看
HACMP 5.4配置文档

1. 软件环境 2
1.1 AIX 5300-05 2
1.2 HAMCP 5.4 2
2. 硬件环境 2
3. 系统环境 2
3.1 /etc/hosts 2
3.2 /.rhosts 2
4. 配置HACMP 以下操作只需在一个节点上操作即可 2
4.1 配置网络拓朴 2
4.1.1 配置Cluster Name 2
4.1.2 配置Cluster节点 2
4.1.3 配置HACMP网络 3
4.1.3.1 创建IP网络 3
4.1.3.2 创建串口心跳网络 3
4.1.3.3 创建磁盘心跳网络 3
4.1.4 添加网络到Cluster 3
4.1.4.1 创建IP通信接口 3
4.1.4.2 创建串口通信设备 4
4.1.4.3 创建磁盘通信设备 5
4.2 配置HACMP资源 5
4.2.1 配置资源 5
4.2.1.1 创建Applications Servers 5
4.2.1.2 创建Service IP 5
4.2.2 配置资源组 6
4.2.2.1 创建资源组 6
4.2.2.2 配置资源组属性 6
5. 校验并同步HACMP配置 7
6. 启动/停止HACMP 7
6.1 启动HACMP(快速路径:#smitty clstart) 7
6.2 停止HACMP(快速路径:#smitty clstop) 8
7. 测试HACMP(这里仅为模拟测试) 8

1. 软件环境
1.1 AIX 5300-05
1.2 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

4. 配置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.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 []
同样方法创建另一个通信接口
* IP Label/Address [p630a_ stb] +
* Network Type ether
* Network Name net_ether_02
* Node Name [NodeA] +
Network Interface []

* IP Label/Address [p630b_ stb] +
* Network Type ether
* Network Name net_ether_02
* Node Name [NodeB] +
Network Interface []

4.1.4.2 创建串口通信设备
# 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.1.4.3 创建磁盘通信设备
# 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 [diskhb_node_a]
* Network Type diskhb
* Network Name net_diskhb_01
* Device Path [/dev/hdisk1]
* Node Name [NodeA] +
同样方法创建另一个磁盘通信设备
* Device Name [diskhb_node_b]
* Network Type diskhb
* Network Name net_diskhb_01
* Device Path [/dev/hdisk1]
* Node Name [NodeA] +
做磁盘心跳的磁盘必须将VG创建为Concurrent模式

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
同样方法配置第二个Service IP
* IP Label/Address p630b_svc +
* Network Name net_ether_02
Network Name:“net_ether_01”、“ net_ether_02” 决定了与之对应的Service IP默认在哪个网卡上启动。
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
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
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 now+
Stop Cluster Services on these nodes [NodeA NodeB] +
BROADCAST cluster shutdown? true+
*Select an Action on Resource Groups Move Resource Groups+

7. 测试HACMP(这里仅为模拟测试)
# smitty hacmp
Extended Configuration
HACMP Cluster Test Tool
Execute Automated Test Procedure
Verbose Logging [Yes] +
Cycle Log File [Yes] +
Abort On Error [No] +
执行测试前先将Cluster停止,否则HACMP的启动测试将无法执行。
在执行测试过程中可以使用“tail -f /tmp/hacmp.out”来查看HACMP的日志。

from:http://www.cublog.cn/u3/105031/showart_2088620.html

#############################################################

#############################################################

AIX 6.1HACMP 5.4.1安装RAC 时CRS无法增加节点:

http://www.itpub.net/viewthread.php?tid=1085694
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: