GreatTurbo Cluster Server 10 目前只支持 GTES10/TDS10 操作系统平台。
GreatTurbo Cluster Server 10 暂不支持并行处理的应用。也就是说不支
持同一个应用在两个节点同时并发运行的应用。例如:Oracle 9i RAC。
GreatTurbo Cluster Server 10 配置的所有负载均衡(LB)服务都必须采用
同一种 ip 负载均衡技术。
GreatTurbo Cluster Server 10 配置的所有 LB 服务都必须运行在同一调度
节点,并且只能对全部服务进行统一操作,如 Enable、Disable、Relocate
等。
GreatTurbo Cluster Server 10 的稳定性需要 OS 提供支撑。如果当操作系
统宕机时,可能会出现因 OS 没有彻底释放资源而导致 GreatTurbo Cluster Server 10 系统丧失高可用功能。在这种情况下,除非有额外的硬件设备,
否则 GreatTurbo Cluster Server 10 并不能够完全保证能够自动恢复操作
系统。此时需要用户手工干预操作系统,对崩溃的操作系统进行复位操作。
也就是说,当 OS 宕机时(尽管这种可能性很小),如果用户没有以下硬件
作为保障,仍然有可能会出现用户业务中断的可能:
1)采用电子开关。
2)服务器节点采用支持硬件 watchdog 功能的主板。
配置 GreatTurbo Cluster Server 10 的两台计算机节点的心跳方式时,必
须保证至少一条心跳通道正常工作。如果两台节点之间的所有心跳通道都发
1
GREATTURBO CLUSTER SERVER 10 用户快速安装手册
生故障而不能正常连通,有可能会导致 GreatTurbo Cluster Server 10 发
生裂脑(split-brain),发生裂脑后,GreatTurbo Cluster Server 10 有
可能会导致用户的资源不一致。为了完全杜绝裂脑现象的发生,可以采取如
下方法:
1) 采用电子开关。
2) 使用第三方参考 IP,有关第三方参考 IP 的介绍将在第三章详述。
其中第一种办法是使用硬件的办法,由于电子开关是额外的电子硬件设
备,需要用户自行购买,所以实际中采用这种方式并不多;而第二种方式是
软件的方法,可以保证 GreatTurbo Cluster Server 10 发生裂脑时,用户
的资源不受损失。这需要用户提供一个能长期(永久性)正常工作的参考 IP
地址。
2.GreatTurbo Cluster Server 10 的相关术语
节点 : 指运行 GreatTurbo Cluster Server 10 程序的计算机。
服务 : 也叫做资源组,指用户应用相关的一组资源的集合, 包括用户应用的
进程资源,磁盘资源,网卡资源,浮动 IP 资源,drbd 镜像资源等。服务可以是其
中几种资源或者全部资源的组合。 服务也可以为空,即不包括任何资源。通常用户
的一个应用与 GreatTurbo Cluster Server 10 的一个服务对应。GreatTurbo Cluster Server 10 的服务分为两种:高可用服务(HA 服务)和负载均衡服务(LB
服务)。HA 服务针对高可用集群确保高可用的对象。LB 服务是负载均衡系统进行
调度的具体应用,例如 Oracle 服务。HA 服务也可以是具体商业应用。
负载调度器(load balancer):也成为调度节点,它是整个负载均衡集群对
外的前端机。负责将客户的请求发送到一组真实服务器上执行, 而客户认为服务是
来自一个 IP 地址(我们可称之为虚拟 IP 地址)上的。在 GreatTurbo Cluster Server 10 典型应用中,负载调度器需要 2 个或多个,GreatTurbo Cluster Server 10 的
高可用方案保证负载调度器能稳定、24×7 不间断的运行。
真实服务器 (real server)
:也叫服务器池(server pool),是负载均衡
集群中真正执行客户请求的服务器,执行的服务有 WEB、MAIL、FTP 和 DNS 等。用
户请求由调度节点分发给真实服务器,由真实服务器来处理用户请求。
例如:服务在 A 节点发生故障的时刻为 T(a),服务自动迁移到 B 节点并在 B
节点成功运行的时刻为 T(b),那么服务的迁移时间 T(relocate)=T(b)-T(a)。另一
方面, 从整个迁移的子过程来看, 服务迁移的时间 (近似等于)≈服务在 A 节点检
测到错误的时间+服务在 A 节点停止的时间+服务在 B 节点启动的时间。其中,服
务的启动/停止时间是由用户的应用来决定的,一般不能够进行调整,而服务检测
到错误的时间可以通过 GreatTurbo Cluster Server 10 的配置参数来进行调整。
服务检测到错误的时间 = 服务检查的间隔时间(check interval) * 服务
连续检查到错误的次数(check count)。Check interval 和 check count 参数可
以在配置服务的检测脚本时进行指定。这样,只有当 GreatTurbo Cluster Server 10 检测到连续出错次数达到指定的次数后,GreatTurbo Cluster Server 10 才认
为服务确实出错。服务确实出错后,会自动触发 GreatTurbo Cluster Server 10
进行服务的迁移。
裂脑(split-brain): 所谓裂脑,是指 GreatTurbo Cluster Server 10 的
高可用主备节点之间彼此失去了联系,但是单个节点的 GreatTurbo Cluster Server 10 仍然运行正常。发生裂脑的充要条件是:1. 系统的主备节点之间的所有心跳通
道都发生了故障,导致系统的两个节点失去了任何联系。2. 两个节点的 GreatTurbo Cluster Server 10 软件仍在正常运行。
其中 hb11、hb12、hb13 对应节点 A 的eth1、eth2、eth3 三个网卡;hb21、hb22、
hb23 对应节点 B 的eth1、eth2、eth3 三个网卡。
10
GREATTURBO CLUSTER SERVER 10 用户快速安装手册
第2章
安装 GreatTurbo Cluster Server 10
在做好了第一章中所列的各项准备工作之后,现在就可以安装 GreatTurbo Cluster Server 10 软件了。
安装过程如下:
1) 确认您所使用的 GreatTurbo Cluster Server 10 产品的功能级别
2) 安装 GreatTurbo Cluster Server 10
3) 注册 GreatTurbo Cluster Server 10
1.确认您所使用的 GreatTurbo Cluster Server 10 产品的类型
GreatTurbo Cluster Server 10 产品分为两个功能级别,请确认您购买的产
品属于哪一个级别。第一级别只能够满足第一章提到的 HA 应用的第一类和第二类
的用户应用,第二级别能够全部满足第一章提到的三类 HA 应用。也就是说,第一
级别不支持磁盘镜像设备(drbd)功能,第二级别支持 drbd 功能。
当然,具体选购何种级别功能的 GreatTurbo Cluster Server 10,完全取决于
您需要满足的应用类型。确认了 GreatTurbo Cluster Server 10 的功能级别之后,
就可以开始安装 GreatTurbo Cluster Server 10 了。
2.安装 GreatTurbo Cluster Server 10
请分别在节点 A 和节点 B 安装 GreatTurbo Cluster Server 10 软件。
1)如果您购买的是正版的 GreatTurbo Cluster Server 10 产品,GreatTurbo
Cluster Server 10 会附带软件的安装光盘。插入安装光盘到节点的光驱并 mount
后,光盘根目录中有一个安装文件 install_cluster,请运行如下命令进行安装。
根据您的操作系统版本并参照其提示完成 GreatTurbo Cluster Server 10 的安装。
如果您的 GreatTurbo Cluster Server 10 产品支持 drbd,请在“Do you want
to use drbd ?”时选择 yes,否则选择 no。
例如:
[root@test1 root]# mount /dev/cdrom /mnt/cdrom
[root@test1 root]# cd /mnt/cdrom
[root@test1 cdrom]# ./install_cluster
Following RPMs will be installed or upgraded to newer version if
necessary:
11
GREATTURBO CLUSTER SERVER 10 用户快速安装手册
*) pdksh
*) lsof
*) sg_utils
*) drbd
*) GreatTurbo Cluster Server
*) GreatTurbo Cluster Server Agents
Please select the operatating system version you are using:
0) GreatTurbo Enterprise Server 10 (x86_32)
1) GreatTurbo Enterprise Server 10 (x86_64)
2) GreatTurbo Enterprise Server 10 (OpenPower ppc64)
3) GreatTurbo Enterprise Server 10 (IA64)
4) cancel
Please select an OS version, then the installation procedure will begin.
Select 4 to abort [0/1/2/3/4]: 0
Do you want to use drbd? (y/n) [y]: y
Please select the network forwarding method you want to use:
0) direct routing
1) NAT
2) IP tunnel
Please select a network forwarding method [0/1/2]: 1
2)如果您是从拓林思公司下载的试用产品(使用有效期为 1 个月),您下载的
GreatTurbo Cluster Server 10 将是一个 ISO 文件和 md5 检验文件。ISO 文件的名称一般为 greatturbocluster-10.x-x.iso , md5文件的名称一般为
greatturbocluster-10.x-x.iso.md5。为了验证您下载的 iso 文件是否正确,可以
先对您的 iso 文件进行 md5sum 操作, 如果发现 md5sum 运行命令所得结果,和您下
载的 md5 文件的内容一致,则表明您下载的 ISO 文件正确无误。
证明您下载的 ISO 文件正确之后, 请先将 ISO 文件 mount 到某一个目录, 然后
运行这个目录下的 install_cluster 安装程序进行安装,接下来的过程同从光盘安
装时介绍的一样。
[root@test1 root]# mount –o loop ./ greatturbocluster-10.0-1.iso
/mnt/iso
[root@test1 root]# cd /mnt/iso
[root@test1 iso]# ./install_cluster
12
GREATTURBO CLUSTER SERVER 10 用户快速安装手册
3.注册 GreatTurbo Cluster Server 10 产品
安装完GreatTurbo Cluster Server 10 的软件之后,您需要注册GreatTurbo Cluster Server 10 产品,也就是说需要安装 GreatTurbo Cluster Server 10
的 license,以保证 GreatTurbo Cluster Server 10 正常运行。
-----------------------------------Cluster Member Configuration Utility
Version:10.0 Built: Fri Jun 9 16:51:41 CST 2006
This utility sets up the member systems of a 2-node GreatTurbo Cluster
Server 10 cluster,
or the 2-node director members of a Load Balancing cluster.
It prompts you for the following information:
o Hostname
o Number of heartbeat channels
16
GREATTURBO CLUSTER SERVER 10 用户快速安装手册
o Information about the type of channels and their names
o Power switch type and device name
o Information about the routers and network type of the Load Balancer
In addition, it performs checks to make sure that the information
entered is consistent with the hardware, the Ethernet ports, the raw
partitions and the character device files.
After the information is entered, it initializes the configure file
and saves the configuration information to the configure file
- Checking that cluster daemons are stopped: done
- Configuration file exists already.
Would you like to use those prior settings as defaults? (yes/no) [yes]:
---------------------------------------Setting information for cluster member 0
---------------------------------------Enter name of cluster member [test1]: test1
Looking for host test1 (may take a few seconds)...
Host test1 found
Cluster member name set to: test1
3)配置本地节点的heartbeat 选项:
GreatTurbo Cluster Server 10 的 heartbeat 通道有两类:网络(net)和串口
(serial)。 对于网络,您需要配置 heartbeat 使用的网络设备对应的别名;对于串
口,您需要配置 heartbeat 使用的串口的设备名,例如 /dev/ttyS0。
注意:为了获得更高的可用性,GreatTurbo Cluster Server 10 建议配置一
条串口通道以及至少两条直连网络心跳通道,并且必须将应用所在的网卡配置成通
17
GREATTURBO CLUSTER SERVER 10 用户快速安装手册
道,配置通道的顺序为:先配置所有的直连网线通道,再配置应用所在网卡的通道,
最后配置串口通道。
Enter number of heartbeat channels (minimum = 1) [1]: 4
You selected 4 channels
Information about channel 0:
Channel type: net or serial [net]:
Channel type set to: net
Enter hostname of cluster member test1 on heartbeat channel 0 [test1]:
hb11
Looking for host hb11 (may take a few seconds)...
Host hb11 found
Hostname corresponds to an interface on member 0
Channel name set to: hb11
Information about channel 1:
Channel type: net or serial [net]:
Channel type set to: net
Enter hostname of cluster member test1 on heartbeat channel 1: hb12
Looking for host hb12 (may take a few seconds)...
Host hb12 found
Hostname corresponds to an interface on member 0
Channel name set to: hb12
Information about channel 2:
Channel type: net or serial [net]:
Channel type set to: net
Enter hostname of cluster member test1 on heartbeat channel 2: test1
Looking for host test1 (may take a few seconds)...
Host test1 found
Hostname corresponds to an interface on member 0
Channel name set to: test1
Information about channel 3:
Channel type: net or serial [net]: serial
Channel type set to: serial
Enter device name: /dev/ttyS0
Device /dev/ttyS0 found and no getty running on it
Device name set to: /dev/ttyS0
4)配置本地节点的power switch 和 watchdog 选项:
如果没有硬件电子开关设备,请输入 NONE。如果有硬件电子开关,输入相应的
电子开关对应的类型,如:RSA、RPS10 或者是 APC。
软件级的 watchdog 可以用来保证 GreatTurbo Cluster Server 10 程序的健壮
Information about power switch connected to member 0
Specify one of the following switches (NONE/RSA/RPS10/APC) [NONE]: NONE
Power switch type set to NONE
Information about watchdog to member 0
Choose one of the following watchdog drivers: NONE/softdog/...) [NONE] :
softdog
5)配置对方节点信息
对方节点信息包括节点的机器名,heartbeat 的设置,watchdog driver 等。
设置方法和本地完全一样。
---------------------------------------Setting information for cluster member 1
---------------------------------------Enter name of cluster member: test2
Looking for host test2 (may take a few seconds)...
Host test2 found
Cluster member name set to: test2
You previously selected 4 channels
Information about channel 0:
Channel type selected as net
Enter hostname of cluster member test2 on heartbeat channel 0: hb21
Looking for host hb21 (may take a few seconds)...
Host hb21 found
Channel name set to: hb21
Information about channel 1:
Channel type selected as net
Enter hostname of cluster member test2 on heartbeat channel 1: hb22
Looking for host hb22 (may take a few seconds)...
Host hb22 found
Channel name set to: hb22
Information about channel 2:
Channel type selected as net
Enter hostname of cluster member test2 on heartbeat channel 2: test2
Looking for host test2 (may take a few seconds)...
Host test2 found
19
GREATTURBO CLUSTER SERVER 10 用户快速安装手册
Channel name set to: test2
Information about channel 3:
Channel type selected as serial
Enter device name [/dev/ttyS0]: /dev/ttyS0
Device name set to: /dev/ttyS0
Information about power switch connected to member 1
Specify one of the following switches (NONE/RSA/RPS10/APC) [NONE]: NONE
Power switch type set to NONE
Information about watchdog to member 1
Choose one of the following watchdog drivers(NONE/softdog/...) [NONE]:
softdog
6)配置磁盘心跳设备
利用共享 raw 磁盘分区作为心跳通道后,只要主备节点能够访问共享数据,就
不会发生裂脑, 从而有效的确保了共享数据的一致性。如果需要配置磁盘心跳,请
选择 yes 继续配置。如果条件实在不具备,输入 no,然后回车。
---------------------------Setting up raw disk heartbeat
----------------------------
Do you want add raw disk heartbeat device? (yes/no) [yes]:
The raw disk heartbeat device must be a raw disk device.
To enhance redundancy, need to configure two raw disk devices.
Enter the name of first raw disk heartbeat device [/dev/raw/raw1]:
/dev/raw/raw1
Enter the name of second raw disk heartbeat device [/dev/raw/raw2]:
/dev/raw/raw1
Now begin to initialize the raw disk heartbeat device, it will cause the
data in the devices lost.
Are you sure to initialize the raw devices which you input? (yes/no)
[yes]:yes
7)配置第三方IP 地址
您需要配置两个节点都可以连接的第三方 IP 地址 (要求能ping 通, 一般选择
网关作为第三方 IP)。第三方 IP 能配置多个,以进一步提高系统高可用性。如果
20
GREATTURBO CLUSTER SERVER 10 用户快速安装手册
要使配置的第三方 IP 生效,必须将两个节点的对外网络设置为备用心跳。如果条
件具备,建议您配置第三方 IP。
如果条件实在不具备,输入 no,然后回车。
------------------------------Setting up the third partner ip
-------------------------------
Do you want cluster to determine network status? (yes/no) [yes]:
The IP address of third computer is needed to determine network status.
The third computer should be up all the time, so it is recommend to use
gateway IP address here. Please use IP address instead of domain name.
If you want input multiple third part IP, please use comma to separate.
For example, 192.168.0.1,192.168.0.3,192.168.0,10
Enter the IP address of third computer [172.16.76.1]:
---------------------------------------Enter load balancer primary server IP [172.16.70.138]:
Looking for IP address 172.16.70.138 (may take a few seconds)...
IP address 172.16.70.138 found
IP address corresponds to an interface on member 0
Load balancer primary server IP set to: 172.16.70.138
Enter load balancer backup server IP [172.16.70.76]:
Looking for IP address 172.16.70.76 (may take a few seconds)...
IP address 172.16.70.76 found
Load balancer backup server IP set to: 172.16.70.76
Enter load balancer network forwarding type(direct/nat/tunnel)
[direct]: nat
Load balancer network forwarding type set to: nat
Enter NAT router IP address: 172.16.70.76
21
GREATTURBO CLUSTER SERVER 10 用户快速安装手册
NAT router IP address set to: 172.16.70.76
Enter NAT router netmask: 255.255.255.0
NAT router netmask set to: 255.255.255.0
Enter NAT router device(e.g. eth1:1): eth1:1
NAT router device set to: eth1:1
-----------------------------------The following choices will be saved:
----------------------------------- ……
9)保存配置
如果以上内容全部配置完毕,member_config 将会询问是否保存改动。如果
刚才的配置没有错误,请输入"yes"或直接回车;
然后程序还会询问是否运行"diskutil -I"来初始化配置文件,这里请选择
"yes"。
注意:当 GreatTurbo Cluster Server 10 的守护进程正在运行时,请不要
选择运行 diskutil -I 来初始化配置文件,以免造成不可预知的后果。
Save changes? yes/no [yes]:
Writing to output configuration file...done.
Changes have been saved to /etc/opt/cluster/cluster.conf.
---------------------------Setting up Configure File
---------------------------Run diskutil -I to set up the configure file now?
- Select 'yes' to clean up a previous install
- Select 'no' if you have just set them up on other member
and have not started the cluster services on that member
- Select 'no' if you are running it on other cluster member
Warning: Do not run 'diskutil -I' on a running cluster, because it would
have severe consequences. yes/no [no]: yes
Saving configuration information to configure file: done
---------------------------------------------------------------Setup on this member is complete. If errors have been reported,
correct them.
If you have not already set up the other cluster member, before
running member_config, invoke the following operation on the
22
GREATTURBO CLUSTER SERVER 10 用户快速安装手册
other cluster member:
copy /etc/opt/cluster/cluster_raw.conf to another node with the same path.
cluster daemons on each cluster member by invoking the cluster start
script located in the System V init directory. For example:
# /etc/rc.d/init.d/cluster start
LOG_EMERG=0 # system is unusable
LOG_ALERT=1 # action must be taken immediately
LOG_CRIT=2 # critical conditions
LOG_ERR=3 # error conditions
LOG_WARNING=4 # warning conditions
LOG_NOTICE=5 # normal but significant condition
# start your application, put actual start actions here
su - oracle -c "dbstart"
if [ $? -eq 0 ]; then
# should check application process here
pmon=`ps -ef | egrep ora_pmon_$ORACLE_SID | grep -v grep`
if [ "$pmon" = "" ];
then
clulog $LOG_ERR " oracle d atabase start failed, process not exist."
# must return 1 here
exit 1
fi
clulog $LOG_INFO " dbstart succeeded."
else
clulog $LOG_ERR " dbstart failed, ret=$?."
# must return 1 here
exit 1
fi
su - oracle -c "lsnrctl start"
if [ $? -eq 0 ]; then
clulog $LOG_INFO " lsnrctl start succeeded."
# must return 0 here
exit 0
else
clulog $LOG_ERR " lsnrctl start failed, ret=$?."
# must return 1 here
exit 1
fi
;;
stop)
#stop your application, put act ual stop actions here
su - oracle -c "lsnrctl stop"
if [ $? -eq 0 ]; then
clulog $LOG_INFO " lsnrctl stop succeeded."
else
clulog $LOG_ERR " lsnrctl stop failed, ret=$?."
26
Loading...
+ 121 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.