互联网服务hacmp安装

我在单位安装实施的HACMP 5.4配置文档(AIX操作系统)

HACMP 5.4配置文档 1     软件环境... 21.1  AIX 6100-03-01-0921  (oslevel -s). 21.2  HAMCP 5.4. 22     硬件环境... 23     系统环境... 23.1     &nb...显示全部
HACMP 5.4配置文档





1     软件环境... 2

1.1  AIX 6100-03-01-0921  (oslevel -s). 2

1.2  HAMCP 5.4. 2

2     硬件环境... 2

3     系统环境... 2

3.1        /etc/hosts. 2

4     配置HACMP以下操作只需在一个节点上操作... 2

4.1        配置网络拓朴... 2

1.1.1   配置Cluster Name. 2

4.1.2  配置Cluster节点... 3

4.1.3  配置HACMP网络... 3

4.1.3.1  创建IP网络... 3

4.1.3.2  创建串口心跳网络... 3

4.1.4  添加网络到Cluster. 3

4.1.4.1  创建IP通信接口... 3

4.1.4.2  创建串口通信设备... 4

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  配置资源组... 5

4.2.2.1  创建资源组... 5

4.2.2.2  配置资源组属性... 6

5.  校验并同步HACMP配置... 7

6.  启动/停止HACMP. 7

6.1  启动HACMP(快速路径:#smitty clstart)... 7

6.2  停止HACMP(快速路径:#smitty clstop)... 7

7.  测试HACMP(这里仅为模拟测试)... 8

















1       软件环境

1.1  AIX 6100-03-01-0921  (oslevel -s)

1.2  HAMCP 5.4

2       硬件环境

P6 55A两台

DS4800存储一台(VG:DATAVG1)

串口线一根

3       系统环境

3.1    /etc/hosts

127.0.0.1       loopback    localhost

//Boot IP

172.116.2.11    wyservA_bt1

172.116.2.12    wyservB_bt1

//stbIP

192.178.100.11   wyservA_stb

192.178.100.12   wyservB_stb

//服务IP

172.116.2.10      wyserv_svc

4       配置HACMP以下操作只需在一个节点上操作

4.1    配置网络拓朴

1.1.1     配置Cluster Name



# smitty hacmpàExtended Configuration

  àExtended Topology Configuration

              àConfigure an HACMP Cluster

              àAdd/Change/Show an HACMP Cluster

* Cluster Name              [wy_cluster]



4.1.2  配置Cluster节点

# smitty hacmpàExtended Configuration

    àExtended Topology Configuration

      àConfigure HACMP Nodes

               àAdd a Node to the HACMP Cluste

                    *NodeName                         [wy_A]

                     Communication Path to Node       [wyservA_bt1] +

以同样方法将wy_B添加到Cluster中

                     *NodeName                        [wy_B]                 

                     Communication Path to Node       [wyservB_bt1] +

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

IP Address Offset for Heartbeating over IP Aliases []



      * Enable IP Address Takeover via IP Aliases  [Yo]  此选项决定了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.4  添加网络到Cluster

4.1.4.1  创建IP通信接口

# smitty hacmp

àExtended Configuration

àExtended Topology Configuration

àConfigure HACMP Communication Interfaces/Devices

àAdd Communication Interfaces/Device

àAdd Pre-defined Communication Interfaces and Devices

àCommunication Interfaces

* IP Label/Address       [wyservA_bt1] +

* Network Type           ether

* Network Name           net_ether_01

* Node Name              [wy_A]    +

Network Interface        []

      同样方法添加另一个通信接口到”net_ether_01”

* IP Label/Address       [wyservB_bt1] +

* Network Type          ether

* Network Name          net_ether_01

* Node Name             [wy_B]    +

Network Interface       []

      同样方法创建另一个通信接口

* IP Label/Address       [wyServA_bt2] +

* Network Type           ether

* Network Name           net_ether_01

* Node Name              [wy_A]    +

Network Interface        []



* IP Label/Address       [wyServB_bt2] +

* Network Type            ether

* Network Name            net_ether_01

* Node Name              [wy_B]    +

Network Interface        []





4.1.4.2  创建串口通信设备

# smitty hacmp

àExtended Configuration

àExtended Topology Configuration

àConfigure HACMP Communication Interfaces/Devices

àAdd Communication Interfaces/Device

àAdd Pre-defined Communication Interfaces and Devices

àCommunication Devices

* Device Name           [tty0_a]

* Network Type           rs232

* Network Name           net_rs232_01

* Device Path           [/dev/tty0]

* Node Name             [wy_A]    +

      以同样方法创建另一个串口通信设备

* Device Name           [tty0_b]

* Network Type           rs232

* Network Name           net_rs232_01

* Device Path           [/dev/tty0]

* Node Name             [wy_B]    +



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

àConfigure HACMP Applications Servers

àAdd an Application Server

* Server Name          [wy_app]

* Start Script         [/HA/wy_start.sh]

* Stop Script          [/HA/wy_stop.sh]

需要手动在两个节点上建立“/HA/wy_start.sh”、“/HA/wy_stop.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               wyserv_svc   +

* Network Name                   net_ether_01

      Network Name:“net_ether_01” 决定了与之对应的Service IP默认在哪个网卡上启动。   

4.2.2  配置资源组

4.2.2.1  创建资源组

# smitty hacmp

àExtended Configuration

àExtended Resource Configuration

àHACMP Extended Resources Group Configuration

àAdd a Resource Group

* Resource Group Name                        [wy_grp]

Participating Nodes (Default Node Priority)  [wy_a wy_b] +

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:

l        Online On Home Node Only: 只在主节点启动。在 “Participating Nodes”中写在第一位的节点启动。

l        Online On First Available Node:在第一个启动的节点启动。在“Participating Nodes”中所选择的所有节点中最先启动的节点上启动。

l        Online Using Distribution Policy:按照分布策略启动

l        Online On All Available Nodes:在所有启动的节点中启动。做并发群集时选择此项。如:Oracle RAC

Fallover Policy:

l        Fallover To Next Priority Node In The List:节点失败时资源组迁移到下一优先级节点

l        Fallover Using Dynamic Node Priority:节点失败时动态选择迁移节点

l        Bring Offline (On Error Node Only):将资源组下线

Fallback Policy:

l        Fallback To Higher Priority Node In The List:节点恢复时资源组返回优先级高的节点

l        Never Fallback:不进行资源组回迁

4.2.2.2  配置资源组属性

# smitty hacmp

àExtended Configuration

àExtended Resource Configuration

àHACMP Extended Resources Group Configuration

àChange/Show Resources and Attributes for a Resource Group



Resource Group Name                                wy_grp

Participating Nodes (Default Node Priority)        wy_A wy_B            

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

Application Servers                                [wy_App]           +

Volume Groups                                      [datavg]             +

Use forced varyon of volume groups, if necessary   false                +

Automatically Import Volume Groups                 false                +

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

*Emulate or Actual                                        [Actual]         +

* 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              [wy_A]

* 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?

若是双机互备,则Start Cluster Services on these nodes              [wy_A wy_B]



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

BROADCAST cluster shutdown?                       true+

* Select an Action on Resource Groups               Move Resource Groups+

若是双机互备,则Stop Cluster Services on these nodes              [wy_A wy_B]



                                                      

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的日志。



注:本文主要以介绍HACMP的配置为主,对于HACMP中所使用VG的配置及HACMP的安装方法由于网上有很多非常规范的文档,这里就不再做讲解,请自行查看资料。



由于本人能力有限,对于文档中遗漏和错误还请大家多多赐教。收起
参与25

查看其它 9 个回答love_jetty的回答

love_jettylove_jetty系统工程师金融
不错!谢谢了
银行 · 2011-12-18
浏览2347

回答者

love_jetty
系统工程师金融
擅长领域: 服务器AIXUnix

love_jetty 最近回答过的问题

回答状态

  • 发布时间:2011-12-18
  • 关注会员:4 人
  • 回答浏览:2347
  • X社区推广