IBM System p5 服务器 HACMP 安装指南
?
一. 系統需求
1.1 硬件需求
?????? IBM HACMP 支持所有 IBM System p5 服務器。
?
1.2 軟件需求
?
1.2.1 AIX 與 RSCT 版本要求
| AIX 5L Version | RSCT Version | RSCT Filesets |
| AIX 5L Version 5.3 TL1 | 2.4.2 | rsct.compat.basic.hacmp 2.4.2.0 rsct.compat.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 | rsct.compat.basic.hacmp 2.3.6.0 rsct.compat.clients.hacmp 2.3.6.0 rsct.core.sec 2.3.6.1 rsct.core.rmc 2.3.6.1 |
?
1.2.2? 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 |
| bos.net.tcp.client | 5.3.0.10 | 5.2.0.14 |
| bos.net.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 |
| bos.data (require for cluster.man.en_US.es) | 5.3.0.10 | 5.2.0.10 |
| bos.clvm.enh (require for CLVM) | ||
| bos.rte.lvm.rte (require for CLVM) |
?
?
二. 安裝前的準備工作
?????? 本安裝指南所提及的 node1 和 node2 分別表示安裝 HACMP 的兩臺 p5 服務器,本例中采用 IP 別名方式做心跳,oracle 應用做為上層應用。安裝 HACMP 前需完成以下工作 :
?
2.1? 配置集群網絡
?????? 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
?
2.2? 配置集群共享磁盤
?????? 如果采用 EXP24 作為共享存儲,需更改 SCSI ID;如果采用 DS4000 系列存儲,可跳過此步。EXP24 作共享磁盤需更改服務器端的 SCSI 通道 ID,以免 SCSI ID 沖突。默認 SCSI ID 為 7,可將其中一臺服務器的 SCSI ID 改為 6 或者 8。SCSI ID 的值越大,優先級越高,SCSI ID 的范圍是 1-15。SCSI ID 的更改可在 SMS 菜單中進行,也可使用以下命令進行更改:
# chdev -a id=6 -l scsi2 -P
?
其中 scsi2 是服務器與 EXP24 連接的 SCSI 通道。
?
?????? 在 node1 上在創建共享磁盤卷組。使用 smitty _mkovg 創建一個 Original VG。在 VOLUME GROUP name 處輸入卷組的名稱,并在 PHYSICAL VOLUME names 處選擇共享磁盤中的 pv,將 Activate volume group AUTOMATICALLY at system restart 選項由 yes 改為 no。
?
Add an Original Volume 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 AUTOMATICALLY no +
at system restart?
Volume group MAJOR NUMBER [] +#
Create VG Concurrent Capable? no +
?
注意:
(1)需要將卷組設置為系統開機時不自動激活,即將“Activate volume group AUTOMATICALLY at system restart?”的值設為 NO。
(2)如果采用磁盤心跳,需將磁盤心跳所在的磁盤的卷組設為 concurrent 模式的 VG
?
???? 在 node1 的共享磁盤卷組上創建邏輯卷及文件系統。根據應用的要求創建相應大小的邏輯卷及文件系統。
在 node1 上使用以下命令反激活卷組。
# varyoffvg
?
2.3? 添加 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 上看到文字輸入,表示串口工作正常
?
2.4 建立應用啟動和停止腳本
?????? 分別在兩個節點在創建應用啟動和停止腳本,并讓這兩個腳本有執行權限。兩個節點的腳本的路徑必須一致。
# touch /usr/sbin/start_oracle /usr/sbin/stop_oracle
# chmod +x /usr/sbin/start_oracle /usr/sbin/stop_oracle
?
三. 安裝步驟
?
3.1 安裝 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 |
?
3.2 建立集群:通過以下路徑進入添加集群界面,然后輸入集群名稱。
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]
?
3.3 添加節點:通過以下路徑進入添加集群節點界面,輸入節點名和此節點的通信接口 ( 這里使用上面提到的 Boot ip)。
smitty hacmp->Extended Configuration->Extended Topology Configuration->Configure HACMP Nodes->Add a Node to the HACMP Cluster
?
3.3.1 添加節點 1
?
Add a Node to the HACMP Cluster
?[Entry Fields]
* Node Name [node1]
Communication Path to Node [ha1_bt1]
?
以相同方法添加第二個節點。如果有多個節點,以此類推。
?
3.3.2? 添加節點 2
Add a Node to the HACMP Cluster
?
?[Entry Fields]
* Node Name [node2]
Communication Path to Node [ha2_bt1]
?
3.4 在兩節點上收集 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 Verification and Synchronization
?HACMP Cluster Test Tool
?
3.5 添加網絡:
?????? 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 [Yes] +
IP Address Offset for Heartbeating over IP Aliases [10.2.25.1]
?
3.6 添加通信接口:
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) 做為通信接口,然后回車。
?
3.7 添加通信設備(用于串口心跳和磁盤心跳)
?????? 如果采用 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,然后回車即可。
?
3.8 添加應用服務器:在 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) +
?
此應用服務的啟動和停止腳本就是之前在做準備工作時創建的那兩個腳本。
3.9? 添加服務 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。
3.10? 添加資源組:
smitty hacmp->Extended Configuration->Extended Resource Configuration->HACMP Extended Resource Group Configuration->Add a Resource Group
Add a Resource Group (extended)
?
?[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>+
?
?????? 在 Resource Group Name 處輸入資源組的名稱,在 Participating Nodes (Default Node Priority) 處選擇參與的節點。
?
3.11? 更改資源組屬性:
將服務 IP、應用服務器和卷組都加入到此資源組中
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] +
?
Volume Groups [datavg ] +
Use forced varyon of volume groups, if necessary false +
[MORE...20]
?
?????? 選擇剛剛創建的資源組后,將會出現以上界面。在 Service IP Labels/Addresses 處選擇剛創建的服務 IP,在 Application Servers 處選擇剛創建的應用服務,在 Volume Groups 處選擇共享 VG。
?
3.12 驗證配置并與集群中的其它節點進行同步:
?????? 必須保證同步的結果是正確,如果有錯誤出現,請按照錯誤提示進行相應調試.
smitty hacmp->Extended Configuration->Extended Verification and Synchronization
?
HACMP Verification and Synchronization
?
?[Entry Fields]
* Verify, Synchronize or Both [Both] +
* Automatically correct errors found during [No] +
verification?
?
* Force synchronization if verification fails? [No] +
* Verify changes only? [No] +
* Logging [Standard] +
?
按照默認值即可,無須更改。
3.13? 測試 HACMP 是否正常工作(可選):
smitty hacmp->Extended Configuration->HACMP Cluster Test Tool->Execute Automated Test Procedure
?
Execute Automated Test Procedure (extended)
?
[Entry Fields]
Verbose Logging [Yes] +
Cycle Log File [Yes] +
Abort On Error [No] +
?
按照默認值即可,無須更改。
?
3.14? 啟動 HACMP:
?????? 啟動 HACMP 可以選擇是在兩個節點同時啟動 HACMP 服務或只有某一節點上啟動 HACMP 服務??蓪ⅰ?/span>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。
?
3.15? 查看 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 當前狀態
?
3.16 停止 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.1 安裝后的任務
(1)修改 PATH 環境變量:將 /usr/es/sbin/cluster 和 /usr/es/sbin/cluster/utilities 加入 PATH 環境變量中,這樣可以在命令行中使用 HACMP 自帶的工具。
(2)使用以下命令追蹤 HACMP 實時運行狀態:
# tail –f /tmp/hacmp.out
(3)常用命令:clstat,clinfo,clRGinfo,cldisp
??????
4.2 常見問題
(1)如果采用磁盤心跳需將共享磁盤所在的卷組設為 concurrent 模式。
(2)當集群中的一個節點重新加入集群時,所有的資源和服務不會自動切換,需在恢復的節點上手動啟動 HACMP。
?
?
?
From:
http://www.ibm.com/developerworks/cn/edu/au-dw-au-hacmpinst-i.html
?
?
?
?
?
------------------------------------------------------------------------------
Blog: http://blog.csdn.net/tianlesoftware
網上資源: http://tianlesoftware.download.csdn.net
相關視頻:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx
DBA1 群:62697716(滿); DBA2 群:62697977(滿)
DBA3 群:62697850?? DBA 超級群:63306533;????
聊天 群:40132017
--加群需要在備注說明Oracle表空間和數據文件的關系,否則拒絕申請
轉載于:https://www.cnblogs.com/tianlesoftware/archive/2011/01/19/3609840.html
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的IBM System p5 服务器 HACMP 安装指南的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 地下城与勇士魔战护肩配合手搓光剑怎么样?
- 下一篇: 10款精选的用于构建良好易用性网站的jQ