HACMP5.4

HACMP5.4
HACMP5.4

HACMP 安装1.系统需求

硬件需求

IBM HACMP 支持所有IBM System p5 服务器。

软件需求

AIX 与RSCT 版本要求

AIX 5L Version RSCT

Version

RSCT Filesets

AIX 5L Version 5.3 TL1 2.4.2 ?https://www.360docs.net/doc/2113253755.html,pat.basic.hacmp 2.4.2.0

?https://www.360docs.net/doc/2113253755.html,pat.clients.hacmp 2.4.2.0

?rsct.core.sec 2.4.2.1

?rsct.core.rmc 2.4.2.1

AIX 5L Version 5.2 TL5 2.3.6 ?https://www.360docs.net/doc/2113253755.html,pat.basic.hacmp 2.3.6.0

?https://www.360docs.net/doc/2113253755.html,pat.clients.hacmp 2.3.6.0

?rsct.core.sec 2.3.6.1

?rsct.core.rmc 2.3.6.1

AIX BOS 软件要求

AIX 5L BOS Component AIX 5L V5.2 TL5 或更新

版本AIX 5L V5.3 TL1 或更新版本

bos.adt.lib 5.3.0.10 5.2.0.10 bos.adt.libm 5.3.0.10 5.2.0.13 bos.adt.syscalls 5.3.0.10 5.2.0.11 https://www.360docs.net/doc/2113253755.html,.tcp.client 5.3.0.10 5.2.0.14 https://www.360docs.net/doc/2113253755.html,.tcp.server 5.3.0.10 5.2.0.14 bos.rte.SRC 5.3.0.10 5.2.0.10 bos.rte.libc 5.3.0.10 5.2.0.14 bos.rte.libcfg 5.3.0.10

bos.rte.libcur 5.3.0.10 5.2.0.10

bos.rte.libptdreads 5.3.0.10 5.2.0.12

bos.rte.odm 5.3.0.10 5.2.0.11

5.3.0.10 5.2.0.10

bos.data (require for

cluster.man.en_US.es)

bos.clvm.enh (require for CLVM)

bos.rte.lvm.rte (require for CLVM)

2.安装前的准备工作

本安装指南所提及的node1 和node2 分别表示安装HACMP 的两台p5 服务器,本例中采用IP 别名方式做心跳,oracle 应用做为上层应用。安装HACMP 前需完成以下工作:

配置集群网络

HACMP 集群的IP地址分为三大类:Boot ip( 也叫base ip)、Service ip 和Heartbeat ip( 使用IP做心跳时需要)。这三种IP 最好都在不同网段。下面是本文中采用的IP 分配:

集群网络配置

节点IP 类别IP 地址IP 标签网络接口

node1 Boot ip 192.168.25.23/16 ha1_bt1 en0

node1 Boot ip 10.0.25.23/16 ha1_bt2 en1

node2 Boot ip 192.168.25.24/16 ha2_bt1 en0

node2 Boot ip 10.0.25.24/16 ha2_bt2 en1

node1,node2 Service ip 10.1.25.1/16 ha_svc1

node1,node2 Hearbeat ip offset 10.2.25.1/16 ha1_bt1

上例子中有IP标签的IP地址都需加入/etc/hosts 文件。/etc/hosts 文件内容如下:127.0.0.1 loopback localhost

192.168.25.23 ha1_bt1

192.168.25.24 ha2_bt1

10.0.25.23 ha1_bt2

10.0.25.24 ha2_bt2

10.1.25.1 ha_svc1

因为Hearbeat ip offset 是一个地址段,10.2.25.1/16 只是一个起始地址,所以不需要加入到/etc/hosts 中。为保证主机名解析正确无误,修改AIX 解析顺序:

# echo “hosts = local, bind” >/etc/netsvc.conf

配置集群共享磁盘

在node1 上在创建共享磁盘卷组。使用smitty _mkovg 创建一个Original VG。在VOLUME GROUP name 处输入卷组的名称,并在PHYSICAL VOLUME names 处选择共享磁盘中的pv,将Activate volume group AUTOMA TICALLY at system restart 选项由yes 改为no。

Add an Original V olume Group

[Entry Fields]

VOLUME GROUP name [datavg]

Physical partition SIZE in megabytes +

* PHYSICAL VOLUME names [hdisk3] +

FORCE the creation of volume group? no +

Activate volume group AUTOMA TICALLY no +

at system restart?

V olume group MAJOR NUMBER [] +#

Create VG Concurrent Capable? no +

注意:

需要将卷组设置为系统开机时不自动激活,即将“Activate volume group AUTOMATICALLY at system restart?”的值设为NO。

如果采用磁盘心跳,需将磁盘心跳所在的磁盘的卷组设为concurrent 模式的VG

在node1 的共享磁盘卷组上创建逻辑卷及文件系统。根据应用的要求创建相应大小的逻辑卷及文件系统。

在node1 上使用以下命令反激活卷组。

# varyoffvg

添加tty 设备( 串口心跳)

在node1 和node2 上安装串口扩展卡,并用串口线将两个节点相连。

添加串口设备,将波特率设为9600。使用smitty maktty 命令添加串口设备,首先选择rs232 作为终端类型,然后选择相应的异步适配器,最后回车出现以下界面。

Add a TTY

[TOP] [Entry Fields]

TTY type tty

TTY interface rs232

Description Asynchronous Terminal

Parent adapter sa0

* PORT number [0] +

Enable LOGIN disable +

BAUD rate [9600] +

PARITY [none] +

BITS per character [8] +

Number of STOP BITS [1] +

TIME before advancing to next port setting [0] +#

TERMINAL type [dumb]

FLOW CONTROL to be used [xon] +

[MORE...29]

在PORT number 处选择端口号,在BAUD rate 处选择波特率为9600,应保证两节点之间的串口端口的波特率相同。

测试串口是否工作正常。在node1 节点上进行以下操作:

node1# cat /etc/hosts >/dev/tty0

在node2 节点上进行以下操作:

node2# cat < /dev/tty0

如果在node2 上看到文字输入,表示串口工作正常

建立应用启动和停止脚本

分别在两个节点在创建应用启动和停止脚本,并让这两个脚本有执行权限。两个节点的脚本的路径必须一致。

# touch /usr/sbin/start_oracle /usr/sbin/stop_oracle

# chmod +x /usr/sbin/start_oracle /usr/sbin/stop_oracle

3.安装步骤

安装HACMP 软件及相应的补丁。本安装指南讲述HACMP/ES 的安装过程,如果需要使用HACMP/XD,请参考IBM 相关资料进行正确安装。将HACMP V5.4 光盘放入光驱后,请安装以下软件包:

HACMP 软件列表

HACMP Fileset Description

cluster.es HACMP/ES Basic software

cluster.es.cfs HACMP/ES Cluster File System Support

Cluster.es.cspoc HACMP/ES CSPOC

Cluster.es.plugins HACMP/ES plug-in software

Cluster.license HACMP Electronic License

cluster.man.en_US.es HACMP/ES english man pages

建立集群

通过以下路径进入添加集群界面,然后输入集群名称。

smitty hacmp->Extended Configuration->Extended Topology Configuration ->Configure an HACMP Cluster->Add/Change/Show an HACMP Cluster

Add/Change/Show an HACMP Cluster

[Entry Fields]

* Cluster Name [ha_cluster]

添加节点

通过以下路径进入添加集群节点界面,输入节点名和此节点的通信接口( 这里使用上面提到的Boot ip)

smitty hacmp->Extended Configuration->Extended Topology Configuration->Configure HACMP Nodes->Add a Node to the HACMP Cluster

添加节点 1

Add a Node to the HACMP Cluster

[Entry Fields]

* Node Name [node1]

Communication Path to Node [ha1_bt1]

以相同方法添加第二个节点。如果有多个节点,以此类推。

添加节点 2

Add a Node to the HACMP Cluster

[Entry Fields]

* Node Name [node2]

Communication Path to Node [ha2_bt1]

在两节点上收集HACMP 相关信息( 可选):通过以下路径进行集群信息收集。

smitty hacmp->Extended Configuration->Discover HACMP-related Information from Configured Nodes

Extended Configuration

Discover HACMP-related Information from Configured Nodes

Extended Topology Configuration

Extended Resource Configuration

Extended Cluster Service Settings

Extended Event Configuration

Extended Performance Tuning Parameters Configuration

Security and Users Configuration

Snapshot Configuration

Export Definition File for Online Planning Worksheets

Extended V erification and Synchronization

HACMP Cluster Test Tool

添加网络

HACMP 的网络分为Discovered network 和Pre-defined network 两种,如果之前有收集HACMP 的相关信息,可选Discovered network;否则,选择Pre-defined network。此处可以根据此集群采用的心跳方式选择相应的网络,包括ether network、diskhb network 和rs232 network。本例中我们采用IP别名方式做心跳。

smitty hacmp->Extended Configuration->Extended Topology Configuration->Configure HACMP Networks->Add a Network to the HACMP Cluster

我们采用IP网络做为心跳网络,在“IP Address Offset for Heartbeating over IP Aliases”处填写心跳起始地址。本例中每个节点有两个网口并且采用IP 别名方式做心跳,所以心跳IP 地址会采用10.2.25.1,10.2.25.2,10.3.25.1,10.3.25.2 这四个IP 地址。

Add an IP-Based Network to the HACMP Cluster

[Entry Fields]

* Network Name [net_ether_01]

* Network Type ether

* Netmask [255.255.0.0] +

* Enable IP Address Takeover via IP Aliases [Y es] +

IP Address Offset for Heartbeating over IP Aliases [10.2.25.1]

添加通信接口

smitty hacmp->Extended Configuration->Extended Topology Configuration->Configure HACMP Communication Interfaces/Devices->Add Communication Interfaces/Devices->Add Discovered Communication Interface and Devices->Communication Interfaces->ALL

Select Point-to-Point Pair of Discovered Communication Devices to Add

Move cursor to desired item and press F7.

ONE OR MORE items can be selected.

Press Enter AFTER making all selections.

[MORE…4]

en0 ha1_bt1 192.168.25.23

# net_ether_01 / node1

en1 ha1_bt2 10.0.25.23

# net_ether_01 / node2

en0 ha2_bt1 192.168.25.24

en1 ha2_bt2 10.0.25.24

[BOTTOM]

选择四个网口(boot ip) 做为通信接口,然后回车。

添加通信设备(用于串口心跳和磁盘心跳),如果采用IP 网络做心跳可跳过此步骤:此步骤的样例是采用磁盘心跳的方式,如果采用串口心跳的话,选择串口设备即可。

smitty hacmp->Extended Configuration->Extended Topology Configuration->Configure HACMP Communication Interfaces/Devices->Add Communication Interfaces/Devices->Add Discovered Communication Interface and Devices->Communication Devices

Select Point-to-Point Pair of Discovered Communication Devices to Add

Move cursor to desired item and press F7.

ONE OR MORE items can be selected.

Press Enter AFTER making all selections.

# Node Device Pvid

node2 hdisk3 000d3adaf6804f40

node1 hdisk3 000d3adaf6804f40

node1 tmscsi0

node2 tmscsi0

node1 tmscsi1

选择node1 和node2 上的hdisk3,然后回车即可。

添加应用服务器

在Server Name 处输入应用的名称,在Start Script 和Stop Script 处输入应用的启动和停止脚本的路径。

smitty hacmp->Extended Configuration->Extended Resource Configuration->HACMP Extended Resources Configuration->Configure HACMP Applications Servers->Configure HACMP Application Servers->Add an Application Server

Add Application Server

[Entry Fields]

* Server Name [oracle]

* Start Script [/usr/sbin/start_oracl>

* Stop Script [/usr/sbin/stop_oracle]

Application Monitor Name(s) +

此应用服务的启动和停止脚本就是之前在做准备工作时创建的那两个脚本。

添加服务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

Add a Service IP Label/Address configurable on Multiple Nodes (extended)

[Entry Fields]

* IP Label/Address ha_svc1 +

* Network Name net_ether_01

Alternate Hardware Address to accompany IP Label/A []

Ddress

首先选择此服务IP 在哪个网络上,我们这里选择net_ether_01 后,将会出现以上界面。在IP Label/Address 处选择相应的服务IP的Label。

添加资源组

smitty hacmp->Extended Configuration->Extended Resource Configuration->HACMP Extended Resource Group Configuration->Add a Resource Group

Add a Resource Group (extended)

* Resource Group Name [oracle_resg]

* Participating Nodes (Default Node Priority) [node1 node2] +

Startup Policy Online On Home Node O>+

Fallover Policy Fallover To Next Prio>+

Fallback Policy Fallback To Higher Pr>+

在Resource Group Name 处输入资源组的名称,在Participating Nodes (Default Node Priority) 处选择参与的节点。

更改资源组属性

smitty hacmp->Extended Configuration->Extended Resource Configuration->HACMP Extended Resource Group Configuration->Change/Show Resources and Attributes for a Resource Group

Change/Show All Resources and Attributes for a Resource Group

[TOP] [Entry Fields]

Resource Group Name oracle_resg

Participating Nodes (Default Node Priority) node1 node2

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 [ha_svc1] +

Application Servers [oracle] +

V olume Groups [datavg ] +

Use forced varyon of volume groups, if necessary false +

[MORE...20]

选择刚刚创建的资源组后,将会出现以上界面。在Service IP Labels/Addresses 处选择刚创建的服务IP,在Application Servers 处选择刚创建的应用服务,在V olume Groups 处选择共享VG。

验证配置并与集群中的其它节点进行同步:必须保证同步的结果是正确,如果有错误出现,请按照错误提示进行相应调试

smitty hacmp->Extended Configuration->Extended V erification and Synchronization

HACMP V erification and Synchronization

* V erify, Synchronize or Both [Both] +

* Automatically correct errors found during [No] +

verification?

* Force synchronization if verification fails? [No] +

* V erify changes only? [No] +

* Logging [Standard] +

按照默认值即可,无须更改。

测试HACMP 是否正常工作(可选):

smitty hacmp->Extended Configuration->HACMP Cluster Test Tool->Execute Automated Test Procedure

Execute Automated Test Procedure (extended)

[Entry Fields]

V erbose Logging [Y es] +

Cycle Log File [Y es] +

Abort On Error [No] +

按照默认值即可,无须更改。

启动HACMP:启动HACMP 可以选择是在两个节点同时启动HACMP 服务或只有某一节点上启动HACMP 服务。可将“Startup Cluster Information Daemon”的值设为true,这样在启动HACMP 服务的同时会启动集群信息进程。

smitty hacmp->System Management (C-SPOC)->Manage HACMP Services->Start Cluster Services

Start Cluster Services

[Entry Fields]

* Start now, on system restart or both now +

Start Cluster Services on these nodes [node1, node2] +

* Manage Resource Groups Automatically +

BROADCAST message at startup? true +

Startup Cluster Information Daemon? true +

Ignore verification errors? false +

Automatically correct errors found during Interactively +

cluster start?

在Start Cluster Services on these nodes 处选择要在哪些节点上启动HACMP Cluster。

查看HACMP 状态:

smitty hacmp->System Management (C-SPOC)->Manage HACMP Services->Show Cluster Services

Manage HACMP Services

Move cursor to desired item and press Enter.

Start Cluster Services

Stop Cluster Services

Show Cluster Services

选择Show Cluster Services,然后回车查看HACMP 当前状态

停止HACMP:

smitty hacmp->System Management (C-SPOC)->Manage HACMP Services->Stop Cluster Services

Stop Cluster Services

[Entry Fields]

* Stop now, on system restart or both now +

Stop Cluster Services on these nodes [node1,node2] +

BROADCAST cluster shutdown? true +

* Select an Action on Resource Groups Bring Resource Groups>+

在Stop Cluster Services on these nodes 处选择要停止HACMP 服务的节点。

4.安装后的任务以及常见问题

安装后的任务

修改PA TH 环境变量:将/usr/es/sbin/cluster 和/usr/es/sbin/cluster/utilities 加入PA TH 环境变量中,这样可以在命令行中使用HACMP 自带的工具。

使用以下命令追踪HACMP 实时运行状态:

# tail –f /tmp/hacmp.out

常用命令:clstat,clinfo,clRGinfo,cldisp

常见问题

如果采用磁盘心跳需将共享磁盘所在的卷组设为concurrent 模式。

当集群中的一个节点重新加入集群时,所有的资源和服务不会自动切换,需在恢复的节点上手动启动HACMP。

相关主题
相关文档
最新文档