HACMP5.2安装手册
二零零五年. 11月
1.1.1 检查显示器、键盘、鼠标是否与主机正确连接... 3
1.1.2 把安装介质(操作系统第一张盘)插入驱动器... 3
1.2.1 系统加电后,敲击键盘<F5>键,RS/6000将从安装介质上引导... 3
1.2.2 显示器显示如下信息,要求用户选择主控台... 3
3.1.5 配置IP地址和/etc/hosts文件... 8
3.1.6 修改/usr/es/sbin/cluster/etc/rhosts文件(两台服务器配置相同)... 8
3.2.2 配置cluster中的service ip资源... 11
3.2.3 配置cluster中的应用程序服务器资源... 12
1 主机系统安装
1.1 准备工作
1.1.1 检查显示器、键盘、鼠标是否与主机正确连接
1.1.2 把安装介质(操作系统第一张盘)插入驱动器
1.1.3 打开外设及主机电源(先外设后主机)
1.2 BOS安装
1.2.1 系统加电后,敲击键盘<F5>键,RS/6000将从安装介质上引导
1.2.2 显示器显示如下信息,要求用户选择主控台
☆☆☆☆Please define the system console☆☆☆☆
Type F1 and press to use this terminal as the system console.
Type een 1 druk op enter om deze terminal als de systememconsole
Skrive tallet 1 og trykk paa enter for aa bruke denne terminalatrion
Pour definir ce terminal comme console systeme
键入<F1>并回车,定义当前设备为主控台。
1.2.3 语言环境
屏幕上将不断显示一些信息,几分钟后出现画面,要求用户选择安装语言环境
>>>1 Type 1 and press enter to have english during install
2 Type 2 en druk op enter om tijdens het installern het Nederlands te krijgen
3 Entrez 3 pour effectuer 1 installation en francais
4. Fr Installation in deutscher sprache 4 eingeben und die eingabetaste drcken.
……
88 Help?
>>> Choice[ 1 ]:
键入”[ 1 ]”后回车,选择语言环境为English
1.2.4 此后屏幕出现
Welcome to Base Operating System
Installation and Maintenance
Type the number of your choice and press enter. Choice is indicated by>>>
>>>1 Start install now with default settings
2 Change/show installation settings and install
3 Start Maintenance Mode for system Recovery
88 Help?
99 Previous Menu
>>> Choice ( ):
这是系统安装和维护的主菜单。我们需要改变一些设置选项再进行基本操作系统的安装;
1.2.5 改变安装设置:
在上面菜单中,键入”[ 2 ]”,屏幕出现”Install and Setting”画面:
Installation and a Settings
Either type 0 and press enter to install with current settings, or type the number of the setting you want to change and press enter
1 system setting:
Method of installation …………… Preserve install
Disk where you want to install…… hdisk0
2 Primary Language Environment setting (AFTER Install):
Cultural Convention………. English(United States)
Language………………….. English(United States)
Keyboard………………….. English(United States)
Keyboard Type …………… Default
3 Install Trusted Computing Base… No
>>>0 Install AIX with the current settings listed above
88 Help?
99 Previous Menu
>>>Choice [ ]:
这是系统安装的默认设置,用户应根据需要进行修改。
与此同时,在屏幕的右下角会出现如下的警告信息:
WARNING:Base Operating System installation will destroy
Or impair recovery of ALL data on the destination disk hdisk0
以上是提醒用户安装系统的后果将破坏用户原有的硬盘上的数据。
因为我们是第一次安装所以应选择:完全覆盖安装(New and complete overwrite),所以键入[ 1 ]:(进入菜单更改安装方式)
1.2.6 安装方式的更改
Change Method of Installation
Type the number of your choice and press Enter
1 New and Complete Overwrite
Overwrites EVERYTHING on the disk selected for installation
Warning: Only use this method if the disk is totally empty
Or there is nothing on the disk you want to preserve
2 Preservation Install
Preserve SOME of the existing data on the disk selected for Installation
Warning: This method overwrites the user(/user), variable(/var), temporary(/tmp), and root (/) file systems.
Other product (application) files and configuration data will be destroyed.
3 Migration Install
Upgrades and Base Operating System to current release
Other product (application) files and configuration data will be spared.
88 Help?
99 Previous Menu
>>>Choice [ 2 ]:1
如图所示:键入[ 1 ]将安装方式改为New and complete overwrite
1.2.7 选择安装操作系统的目的硬盘
Change Disks Where You Want to Install
Type one or more numbers for the disk(s) to be used for installation and press Enter. To cancel a choice, type the corresponding number and press Enter. At least one bootable disk must be selected. The current choice is indicated by>>>.
Size VG
Name Location Code (GB) Status Bootable
1 hdisk0 00-01-00-0.0 18.2 rootvg yes
2 hdisk1 00-01-00-1.0 18.2 no
>>> 0 Continue with choices indicated above
66 Disks not known to Base Operating System Installation
88 Help?
99 Previous Menu
>>> Choice[ 0 ]:1
键入[ 1 ],安装到hdisk0
Change Disks Where You Want to Install
Type one or more numbers for the disk(s) to be used for installation and press Enter. To cancel a choice, type the corresponding number and press Enter. At least one bootable disk must be selected. The current choice is indicated by>>>
Size VG
Name Location Code (GB) Status Bootable
>>> 1 hdisk0 00-01-00-0.0 18.2 rootvg yes
2 hdisk1 00-01-00-1.0 18.2 no
>>> 0 Continue with choices indicated above
66 Disks not known to Base Operating System Installation
88 Help?
99 Previous Menu
>>> Choice [ 0 ]:
此时会在hdisk0前出现 >>> 来表明系统将安装至该硬盘。
选好后选择:[ 0 ]继续。
1.2.8 选择完毕后应显示如下
Installation Settings
Either type 0 or press Enter to install with current setting, or type the number of the setting you want to change and press Enter
1 System Settings
Method of installation………….. New and Complete Overwrite
Disk where you want to Install …. Hdisk0
2 Primary Language Environment Settings (AFTER install)
Cultural Convention………. English(United States)
Language………………….. English(United States)
Keyboard………………….. English(United States)
3 Install Trusted Computing Base ….. no
0 Install with the settings listed above
88 Help?
99 Choice [ 1 ]:0
1.2.9 开始安装
设置完毕选择0 安装即开始,屏幕将为断显示安装的进行情况。此时,只需耐心等待。当BOS安装完毕,系统将自动重启。
Installing Base Operating System
Please wait
Approximate Elapsed time
%task completed (in minutes)
16 1
系统安装完成后,会自动重新启动,并自动进入”安装辅助菜单”。
2 系统配置
BOS安装完成后,进行系统设置,有两种方法:使用Installation Assistant或使用SMIT菜单。
l 使用Installation Assistant进行系统配置
基本系统安装完后,第一次启动时会自动进入Installation Assistant(安装帮助)菜单,以便用户进行系统设置;将来用户想使用Installation Assistant菜单对系统进行设置的话需键入# install_assist命令。
此这些工作均可不做,可统一使用下面的SMIT完成。
需注意的一点是:此时不能用F3或F10键退出,而应该选菜单最后一项,以通知操作系统设置任务已完成;否则,在下次启机时仍会自动进入系统设置画面。
l 使用smit进行系统配置
使用root用户登录
3 安装HACMP5.2主备模式
3.1 准备操作系统
3.1.1 安装需要包
安装完BOS后,需要将第一张安装盘放入光驱内,通过smitty install安装如下的包:
ü bos
ü tk.*
ü tcl.*
ü rpm.*
ü xlC.*
ü perl.*
ü rsct.*
ü bos.rte
ü bos.adt
ü bos.net
ü expect.*
ü bos.clvm
ü bos.data
ü bos.perf
ü bos.sysmgt
ü perfagent.*
ü bos.content_list
3.1.2 安装HACMP5.2
放入HACMP5.2的安装光盘,除去以下列出的包外,通过smitty install选择所有的包进行安装:
ü cluster.hativoli
ü cluster.haview
3.1.3 安装AIX5.3的补丁
根据AIX安装手册中的步骤升级AIX5.3操作系统到03的维护级别,通过如下命令进行确认。
#oslevel –r
5300-03
3.1.4 安装HACMP5.2的补丁
上传HACMP5.2最新的补丁包到服务器上后,通过smitty update_all进行升级。
3.1.5 配置IP地址和/etc/hosts文件
ü WGDB1服务器IP地址配置
En0 – 1.1.1.1
En1 – 2.2.2.1
ü WGDB2服务器IP地址配置
En2 – 1.1.1.2
En3 – 2.2.2.2
ü WGDB1服务器/etc/hosts文件配置
10.94.2.112 wgdb1_svc(Oracle服务IP)
1.1.1.1 wgdb1_boot1
2.2.2.1 wgdb1_boot2
10.94.2.114 wgdb1_gate
ü WGDB2服务器/etc/hosts文件配置
10.94.2.113 wgdb2_svc(空闲服务IP)
1.1.1.2 wgdb2_boot1
2.2.2.2 wgdb2_boot2
10.94.2.115 wgdb2_gate
3.1.6 修改/usr/es/sbin/cluster/etc/rhosts文件(两台服务器配置相同)
wgdb1_svc
wgdb2_svc
wgdb1_boot1
wgdb2_boot1
wgdb1_boot2
wgdb2_boot2
wgdb1_gate
wgdb2_gate
执行:#chmod 600 /usr/es/sbin/cluster/etc/rhosts
3.1.7 编写应用程序脚本
在wgdb1和wgdb2分别创建如下相同的脚本
/ha52/start
/ha52/stop
start
############################################################## ## start oracle server echo "`hostname`:The ORACLE Server is starting,Please Waiting." sleep 5 su - oracle -c ". /usr/es/script/oracle_start" >>/usr/es/script/oracle_start.log sleep 5 echo "`hostname`:The ORACLE Server is started." ############################################################## |
stop
############################################################## ## stop oracle server echo "`hostname`:The ORACLE Server is stopping,Please Waiting." su - oracle -c ". /usr/es/script/oracle_stop" >>/usr/es/script/oracle_stop.log sleep 5 echo "`hostname`:The ORACLE Server is stoped." ############################################################## |
oracle_start
echo "Start Oracle DataBase Begin" sqlplus /nolog <<EOF connect sys/change_on_install as sysdba; startup; show sga; exit; EOF sleep 5 lsnrctl start echo "Start Oracle DataBase End" |
oracle_stop
echo "Stop Oracle DataBase Begin" lsnrctl stop sleep 5 sqlplus /nolog <<EOF connect sys/change_on_install as sysdba show sga; shutdown immediate; exit; EOF echo "Stop Oracle DataBase End" |
#chmod 755 /ha52/start
#chmod 755 /ha52/stop
注意:在两台机器上分别修改下列文件的属性:
3.2 配置HACMP5.2主备模式
3.2.1 创建cluster
通过smitty hacmp进入HA配置界面,,选择第一项,如下图:
进入后,选择第一项创建cluster,如下图:
进入后,输入cluster的名称为“wgdbcluster”,节点通过F4键选择wgdb1_boot1和wgdb2_boot1,回车即可,这时HA会自动发现节点配置信息,完成后如下图:
3.2.2 配置cluster中的service ip资源
通过smitty hacmp进入HA配置界面,,选择第一项,如下图:
进入后,选择第二项创建资源,如下图:
进入后,选择第一项,开始配置service ip资源,如下图:
进入后,选择第一项增加service ip资源,如下图:
分别增加两个service ip资源,网络名称通过F4键,会自动选择内容,如下两图:
3.2.3 配置cluster中的应用程序服务器资源
在配置资源项中继续选择第二项开始配置应用程序服务器资源,如下图:
输入应用程序服务器名称等信息,如下图:
3.2.4 配置cluster中的并行卷组资源
在配置资源项中继续选择最后一项开始配置并行卷组资源,如下图:
进入后,选择第一项,如下图:
继续选择第二项,如下图:
在弹出窗口中通过F7键选中两个节点,如下图:
继续弹出窗口,选择相应的物理卷,如下图:
回车继续后,输入卷组名称“datavg”,并通过tab键修改pps的大小为128MB,如下图:
3.2.5 配置cluster资源组
选择第三项开始配置cluster资源组,如下图:
进入后,选择第一项增加资源组,如下图:
在弹出窗口中,选择资源组的类型,res1和rest2资源组选择“Cascading”,orares资源组选择“Concurrent”,如下图:
输入资源组的名称和资源组包含的节点,res1的节点只选择db1,res2的节点只选择db2,创建完后,res1和res2的效果如下两图:
创建完后orares的效果如下图:
然后需要分别修改这三个资源组的内容,res1资源组中的service ip输入“db1_svc”,应用程序服务器输入“dbapp1”;res2资源组中的service ip输入“db2_svc”,应用程序服务器输入“dbapp1”;orares资源组中的并行卷组输入“oraclevg”,应用程序服务器输入“dbapp1”,如下图:
在完成以上操作后,可选择校验和显示HA配置,如下图:
3.2.6 配置串口心跳
进入如下项,如下图:
继续进入第二项,如下图:
进入配置HA网络项,如下图:
选择向HA cluster增加网络,如下图:
选择网络名称“net_rs232_01”,选择类型“rs232”,如下图:
再进入配置HA通讯接口和设备项,如下图:
选择增加一个通讯接口和设备,如下图:
在弹出窗口中选择第二项,如下图:
在弹出窗口中选择第二项,如下图:
在弹出窗口中选择“net_rs232_01”,如下图:
分别创建两个设备“heartbeat1”和“heartbeat2”,具体设置如下两图:
3.2.7 校验并同步HA配置到每个节点
选择最后一项,进行校验和同步配置,如下图:
3.2.8 启动HA
分别在db1和db2上执行如下命令启动HA:
#smitty clstart
具体启动选项设置参考下图:
3.2.9 停止HA
分别在db1和db2上执行如下命令停止HA:
#smitty clstop
具体停止选项设置参考下图:
3.2.10 校验HA正确启动
在db1通过如下命令,输出结果同下,说明启动正常:
#netstat –in
j
#ps –ef|grep cluster
在db2通过如下命令,输出结果同下,说明启动正常:
#netstat –in
#ps –ef|grep cluster
也可参考/tmp/hacmp.out日志文件。
如有问题可参考如下HA的配置信息
Resource Group Name res1
Node Relationship cascading
Site Relationship ignore
Participating Node Name(s) db1
Dynamic Node Priority
Service IP Label db1_svc
Filesystems
Filesystems Consistency Check fsck
Filesystems Recovery Method sequential
Filesystems/Directories to be exported
Filesystems to be NFS mounted
Network For NFS Mount
Volume Groups
Concurrent Volume Groups
Use forced varyon for volume groups, if necessaryfalse
Disks
GMD Replicated Resources
PPRC Replicated Resources
Connections Services
Fast Connect Services
Shared Tape Resources
Application Servers dbapp1
Highly Available Communication Links
Primary Workload Manager Class
Secondary Workload Manager Class
Delayed Fallback Timer
Miscellaneous Data
Automatically Import Volume Groups false
Inactive Takeover false
Cascading Without Fallback false
SSA Disk Fencing false
Filesystems mounted before IP configured false
Run Time Parameters:
Node Name db1
Debug Level high
Format for hacmp.out Standard
Resource Group Name res2
Node Relationship cascading
Site Relationship ignore
Participating Node Name(s) db2
Dynamic Node Priority
Service IP Label db2_svc
Filesystems
Filesystems Consistency Check fsck
Filesystems Recovery Method sequential
Filesystems/Directories to be exported
Filesystems to be NFS mounted
Network For NFS Mount
Volume Groups
Concurrent Volume Groups
Use forced varyon for volume groups, if necessaryfalse
Disks
GMD Replicated Resources
PPRC Replicated Resources
Connections Services
Fast Connect Services
Shared Tape Resources
Application Servers dbapp1
Highly Available Communication Links
Primary Workload Manager Class
Secondary Workload Manager Class
Delayed Fallback Timer
Miscellaneous Data
Automatically Import Volume Groups false
Inactive Takeover false
Cascading Without Fallback false
SSA Disk Fencing false
Filesystems mounted before IP configured false
Run Time Parameters:
Node Name db2
Debug Level high
Format for hacmp.out Standard
Resource Group Name orares
Node Relationship concurrent
Site Relationship ignore
Participating Node Name(s) db1 db2
Dynamic Node Priority
Service IP Label
Filesystems ALL
Filesystems Consistency Check fsck
Filesystems Recovery Method sequential
Filesystems/Directories to be exported
Filesystems to be NFS mounted
Network For NFS Mount
Volume Groups
Concurrent Volume Groups oraclevg
Use forced varyon for volume groups, if necessaryfalse
Disks
GMD Replicated Resources
PPRC Replicated Resources
Connections Services
Fast Connect Services
Shared Tape Resources
Application Servers dbapp1
Highly Available Communication Links
Primary Workload Manager Class
Secondary Workload Manager Class
Delayed Fallback Timer
Miscellaneous Data
Automatically Import Volume Groups false
Inactive Takeover false
Cascading Without Fallback false
SSA Disk Fencing false
Filesystems mounted before IP configured false
Run Time Parameters:
Node Name db1
Debug Level high
Format for hacmp.out Standard
Node Name db2
Debug Level high
Format for hacmp.out Standard
另注:本地硬盘镜像注意事项:
等待镜像结束后,执行
# bootlist –m normal –o
# bosboot –ad hdisk1
# bootlist –m normal hdisk0 hdisk1
# bootlist –m normal –o确认是否将启动顺序修改过来
4 附录
在Extended Configuration中我们还可以配置 tty 心跳 网络 , hdisk 心跳网络,Persistent Node IP ,application monitor 等等。
下面我们先介绍一下配置hdisk 心跳网络,这也是hacmp5.2 里的一个新的功能。
首先我们要一个 Enhanced concurrent VG , 这个vg 不需要一定是放在concurrent 资源组里的vg , 当然也可以用concurrent 资源组里的硬盘来做
心跳网络。这个concurrent vg 可以通过传统方法建立。
1. Mkvg –c convg
2. 在一个节点上varyoffvg , 另一个节点上importvg
现在我们介绍用hacmp 来创建concurrent vg .
Initialization and Standard Configuration
Extended Configuration
System Management (C-SPOC)
Problem Determination Tools
Add Nodes to an HACMP Cluster
Configure Resources to Make Highly Available
Configure HACMP Resource Groups
Verify and Synchronize HACMP Configuration
Display HACMP Configuration
Configure Service IP Labels/Addresses
Configure Application Servers
Configure Volume Groups, Logical Volumes and Filesystems
Configure Concurrent Volume Groups and Logical Volumes
Concurrent Volume Groups
Concurrent Logical Volumes
Synchronize Concurrent LVM Mirrors
List All Concurrent Volume Groups
Create a Concurrent Volume Group
Create a Concurrent Volume Group with Data Path Devices
Set Characteristics of a Concurrent Volume Group
Import a Concurrent Volume Group
Mirror a Concurrent Volume Group
Unmirror a Concurrent Volume Group
选中test1 and test2
选中共享硬盘
Node Names test1,test2
PVID 000438323d0e4487
VOLUME GROUP name convg
PhysicalpartitionSIZEinmegabytes 4 Volume group MAJOR NUMBER [49] Enhanced Concurrent Mode true
下面看一下两个节点的硬盘状况:
test1:
hdisk0 0004383268b07574 rootvg active
hdisk3 000438325e22bca7 test1vg
hdisk4 00043832125e5aa8 test2vg
hdisk5 000438323d0e4487 convg
test2 :
hdisk0 000d29574085126d rootvg active
hdisk5 000438325e22bca7 test1vg
hdisk6 00043832125e5aa8 test2vg
hdisk7 000438323d0e4487 convg
现在检查hdisk 网络的状况,在一个节点上向hdisk 写数据,从另一个节点
上读数据,很像 我们在配置tty 网络之前,检查一下tty 是否连通。
1. Add /usr/sbin/rsct/bin/ to /etc/environment 里的path 中
2. 重新login test1 和test2 使path 生效
3. 在test1 上运行:dhb_read -p hdisk5 –r
4. 在test2 上运行:dhb_read -p hdisk7 –t
在test1 上:test1:/>dhb_read -p hdisk5 -r
Receive Mode:
Waiting for response . . .
Link operating normally
在test2上:
test2:/usr/sbin/rsct/bin>dhb_read -p hdisk7 -t
Transmit Mode:
Detected remote utility in receive mode. Waiting for response . . .
Link operating normally
证明通讯正常。
添加hdisk heart beat 网络和设备
Initialization and Standard Configuration
Extended Configuration
System Management (C-SPOC)
Problem Determination Tools
Discover HACMP-related Information from Configured Nodes
Extended Topology Configuration
Extended Resource Configuration
Extended Event Configuration
Extended Performance Tuning Parameters Configuration
Security and Users Configuration
Snapshot Configuration
Extended Verification and Synchronization
Configure an HACMP Cluster
Configure HACMP Nodes
Configure HACMP Sites
Configure HACMP Networks
Configure HACMP Communication Interfaces/Devices
Configure HACMP Persistent Node IP Label/Addresses
Configure HACMP Global Networks
Configure HACMP Network Modules
Configure Topology Services and Group Services
Show HACMP Topology
Add a Network to the HACMP Cluster
Change/Show a Network in the HACMP Cluster
Remove a Network from the HACMP Cluster
# Pre-defined Serial Device Types
diskhb
rs232
tmscsi
tmssa
* Network Name[m [net_diskhb_01]
* Network Type diskhb
添加设备:
Extended Configuration〉〉Extended Topology Configuration〉〉Configure HACMP Communication Interfaces/Devices〉〉 Add Communication Interfaces/Devices 〉〉 Add Pre-defined Communication Interfaces and Devices 〉〉 Communication Devices 〉〉 net_diskhb_01 〉〉
* Device Name [heartbeatdisk5]
* Network Type diskhb
* Network Name net_diskhb_01
* Device Path [/dev/hdisk5]
* Node Name [test1]
* Device Name [heartbeatdisk7]
* Network Type diskhb
* Network Name net_diskhb_01
* Device Path [/dev/hdisk7]
* Node Name [test2]
Extended Configuration〉〉Extended Topology Configuration〉〉 Show HACMP Topology
Cluster Description of Cluster: ha51tsc
Cluster Security Level: Standard
NODE test1:
Network net_diskhb_01
heartbeatdisk5 /dev/hdisk5
Network net_ether_02
test1_svc 10.1.0.1
test2_svc 10.1.0.2
test1_boot2 192.168.0.1
test1_boot1 100.1.0.1
NODE test2:
Network net_diskhb_01
heartbeatdisk7 /dev/hdisk7
Network net_ether_02
test1_svc 10.1.0.1
test2_svc 10.1.0.2
test2_boot1 100.1.0.2
test2_boot2 192.168.0.2
配置永久的IP标识(persistent IP label)
一个永久的IP标识(persistent IP label)是一个IP别名,它可以被分配给一个群集网络中的指定的节点,并且会一直固定在分配的节点上。
2.永久的IP标识(persistent IP label)的特性:
(1)一直固定在被分配的节点上(节点绑定)
(2)作为别名被配置在启动网卡(boot adapter)上
(3)与已经被配置的服务IP标识(service IP label)或启动IP标识(boot IP label)共同存在
(4)不需要在节点上安装额外的物理网卡
(5)不属于任何资源组
(6)可以被用于在群集中访问指定的节点进行管理工作
(7)在节点启动后即可用,当HACMP服务停止后也始终保持可用
(8)在以太网、令牌环网、FDDI以及ATM LANE网络中都可被配置
(9)不能在SP交换机、ATM传统IP网和串行网络上进行配置
(10)和配置的服务IP标识(service IP label)和启动IP标识(boot IP label)使用同一块网卡
(11)如果节点失败,该IP标识不会迁移到群集中的其它节点
(12)如果网卡失败,它只会迁移到相同网络的同一个节点上的其它网卡
(13)每个网络的每个节点上只能配置一个永久的IP标识(persistent IP label)
3.子网的要求
(1)对于使用传统的IPAT的网络(不使用别名)
a.必须被配置为和网络中该节点上的所有standby IP标识在不同的子网
b.可以被配置为和网络中该节点上的service IP标识和boot IP标识在相同的子网或者是不同的子网
(2)对于使用别名的IPAT的网络
a.必须被配置为和网络中该节点上的所有boot IP标识在不同的子网
b.可以被配置为和网络中该节点上的作为boot网卡别名的service IP标识在相同的子网或者是不同的子网
Extended Configuration〉〉Extended Topology Configuration〉〉Configure HACMP Persistent Node IP Label/Addresses〉〉 Add a Persistent Node IP Label/Address
* Node Name test1
* Network Name net_ether_02
Node IP Label/Address test1_per
* Node Name test2
* Network Name net_ether_02
Node IP Label/Address test2_per
注意:永久ip 同步完后, ip 立即绑定到boot1 上。