Chinaunix首页 | 论坛 | 博客
  • 博客访问: 104574606
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类:

2008-03-27 11:35:05

  

1           系统需求

1.1          硬件需求

l         主机                                   2—4台服务器

l         CD-ROM

l         共享磁盘阵列

l         Ethernet网络卡           每台服务器至少2片网络卡,用于公网(public net)、心跳线(private net)建议使用具有故障恢复和MAC地址切换能力的Intel 网卡。

l         SCSI适配器                兼容硬件产品

l         RS232联接线                     Null-modem serial cables

l         硬盘空间                            /usr文件系统至少有10Mb以上空闲空间

l         内存                                   64Mb以上

1.2          软件需求

l         Reliant HA 安装软件(License 数同节点数)

l         UNIXWare7操作系统(License 数同节点数)

l         C++ UDK (至少一套)

 

2           安装ReliantHA

2.1          硬件安装

l         系统硬件安装。

l         RS232串口线安装、联接。

l         将两台服务器的网卡心跳线直连,公网线接到交换设备

 

2.2          软件安装

2.2.1     UNIXWare7系统安装

l         在集群中的每个节点安装完成UNIXWare7操作系统

l         安装配置共网(public net)网卡,并确认网络通

l         在共享硬盘划分数据库空间和应用程序存放的文件系统

l         输入ReliantHA License,使用scoadmin->License Manager

2.2.2     ReliantHA的安装(在两台服务器分别安装)

1.         root用户登入

2.         将带有ReliantHA的光盘(UW7 3of3),放入CD-ROM

3.         输入以下命令开始安装

#pkgadd –d cdrom1

4.         系统显示:

              The following sets are available:
                1  NSlive1       Netscape LiveWire 1.01 for SCO UnixWare 7
                               (i386) 1.01
                2  NSproxy25     Netscape Proxy Server 2.5 for SCO UnixWare 7
                                (i386) 2.5
                3  ReliantHA     ReliantHA Host Monitoring Software
                                   (IA32) 1.1.0
                4  TTA           Tarantella for SCO UnixWare 7
                                (i386) 1.0
                5  afps          SCO Advanced File and Print Server
                                (i386) 4.0.1
                6  arcserve      Data Management Services
                                (IA32) 7

 

            Select package(s) you wish to process (or 'all' to process

              all packages). (default: all) [?,??,quit]: 3

选择3,安装ReliantHA产品

5.         接下来,系统开始安装:

==============================================================
|                             RELIANT                        |
|                                                            |
|Welcome to the initialization script for the Reliant system |
|You must first answer some questions about this system      |
|The /etc/hosts and /etc/networks files will then be updated |
|and the files .hosts, hvhosts, and  hvenv.host will be      |
|created.                                                    |
==============================================================

At this point in the installation procedure, you are required to respond to various prompts as they appear on the screen. The following shows an example session when installing two nodes, with the software installing on SYSA:

Creating hvhosts file...Done

 

What is the size of the cluster? Enter number of nodes[ 2..4 / quit]? 2

 

What is the private network IP address number of SYSA [ 192.168.0.1 ]

 

What is the private network IP address number of SYSB [ 192.168.0.2 ]

SYSA's IP address is: 192.168.0.1

SYSB's IP address is: 192.168.0.2

Is this correct? [y/n/quit]? y

 

What is this system [SYSA / SYSB / SYSC / SYSD or quit]?:SYSA

 

What is the private network device name [e.g. /dev/msw_0]?:

 

Editing /usr/opt/reliant/etc/mswStart

Done................

 

Creating .hosts file for commd...Done.

 

Appending hvhosts to the /etc/hosts file...Done.

 

Appending hvnetworks to the /etc/networks file...Done.

 

Creating the rcvmHelp.out file for the rcvm GUI...Done.

 

Building the environment now...Done.

 

Modifying /etc/confnet.d/inet/interface to configure private network IP...Done.

 

initrc script completed.

Done.

Registering the SCOadmin Reliant object

Done registering the SCOadmin Reliant object

 

Installation of ReliantHA Host Monitoring Software (reliant) was

successful.

 

## Executing set postinstall script.

 

Processing of packages for set is completed.

 

6.         安装完成。

2.2.3     配置private network

l         使用netcfg命令,配置心跳线网卡-ReliantHA private network

2.2.4     配置MAC Switch Driver (MSW)

l         MSW的配置,使用mkmswtab命令

#/sbin/mkmswtab -i /dev/msw_0 /dev/net1 /dev/term/00t 

/dev/net1为心跳线网卡,/dev/term/00tIP心跳线

l         执行mkmswtab后系统将生成/etc/mswtab /etc/sdltab文件

#cat /etc/mswtab

 

#MSW tab - control file for msw device driver

#

#This file automatically generated by mkmswtab

#

/dev/msw_0 1 00:AA:00:BD:6F:AA

        /dev/net1    0       0

        /dev/sdl_0      0       1

        /dev/sdl_1      0       1

 
#cat /etc/sdltab

 

#SDL tab - control file for sdl device driver

#

#This file automatically generated by sdltab

#

/dev/sdl_0

        /dev/term/00t

 

l         重新启动主机。

2.2.5     测试MSW的安装

l         使用mswconfig命令

 #mswconfig -l

 

   Listing MAC Switch interface /dev/msw_0

      MAC Address 00:AA:00:BD:6F:AA, 1 Interface, Status OFFLINE

      Heartbeat ENABLED, Interval 560 msec, Misses 6

      Interface 0: /dev/net1 unit 0 ONLINE, max peers 3, current peers 1

            Peer MACs:

                    00:AA:00:A8:07:0D - ONLINE                   

            Bound SAP info:

                    muxid 0x15, SAP 0xf00d, dlpistate 0x3, Heartbeat

                    muxid 0x14, SAP 0x0000, dlpistate 0x0

                    muxid 0x13, SAP 0x0000, dlpistate 0x0

                    muxid 0x12, SAP 0x0000, dlpistate 0x0

     

      Interface 2: /dev/sdl_0 unit 0 (SLOW) ONLINE, max peers 1, current peers 1

            Peer MACs:

                    00:AA:00:A8:07:0D - ONLINE

            Bound SAP info:

                    muxid 0x15, SAP 0xf00d, dlpistate 0x3, Heartbeat

                    muxid 0x14, SAP 0x0000, dlpistate 0x0

                    muxid 0x13, SAP 0x0000, dlpistate 0x0

                    muxid 0x12, SAP 0x0000, dlpistate 0x0

     

2.2.6     设置Low Latency Transport (LLT)

l         echo "+" >> /etc/hosts.equiv
echo "+" >> /.rhosts

l         运行

#/sbin/mkcluster -i /dev/msw_0 test1 test2

test1test2为各节点的hostname

l         验证/etc/clustertab

#cat /etc/clustertab

The following example from the /etc/clustertab file shows a four-node cluster using the MAC switch driver:

#NodeID   NodeName  Device       Physical Address
1         test1    /dev/msw_0    00:AA:00:A5:7F:61
2         test2    /dev/msw_0    00:AA:00:A5:1E:9C

l         重新启动主机

l         检验LLT的安装

#lltstat -a

 

   LLT node information:

           max nodes: 8, max ports: 32, this node: 1

           MTU: 1500, SAP: 0xcafe

           Node  State

            * 1  NODE_OPEN

              2  NODE_IDEL             

   LLT port information:

           - No ports active

 

2.2.7     配置ReliantHA

1           修改系统核心参数

/etc/conf/bin/idtune -f MSGSSZ 524288

/etc/conf/bin/idtune -f MSGMNB 65536

/etc/conf/bin/idbuild -B –K

重新启动主机

2           设置环境变量

#cp /usr/opt/reliant/etc/hvenv /.profile

退出root用户,再重新登入

 

2.2.8     配置举例

l         IP别名

编辑/usr/opt/reliant/etc/hvipalias

                    test 01:AA:00:3F:19:DB /dev/net0 net0 168.33.114.100 
                    255.255.0.0 check1 check2
field 1: 虚拟主机名
field 2: 可切换的MAC地址
field 3: 网卡设备名
field 4: 网卡接口名
field 5: 虚拟IP地址
field 6: 子网掩码
field 7: 用于网络检测的主机IP,可设置为路由器
field 8: 第二个用于网络检测的主机IP
 

 

l         SCO提供的配置文件sybase.hl保存在/usr/opt/reliant/build目录下

内容为:

#include "defines.hl"

 

Cluster 

{

    { SYSA,SYSB }            // nodes

    { }                  // cluster attributes

        Application                     // under control of Reliant

        {

            App1

            { SYSA,SYSB }     // priority

            { AutoStartUp AutoSwitchOver } // application attributes

             Process(/home/syb)

    {

     Pdisk(/dev/dsk/c1b0t13d3s0)

     Ip ( test )

         {

             Nw(Nw_01, 01:AA:00:3F:19:DB)

         }

   }

}

}

                 

l         编译sybase.hl

#hvgen sybase

编译生成/usr/opt/reliant/conf/sybase文件

l         SCO提供的startdb,stopdb,syb以及应用监控脚本 (monitor, dealpro, derrpro, sendpro,recvpro,sealpro)复制到两台服务器的/home目录下

l         /usr/opt/reliant/conf/sybase文件复制到SYSB

#rcp /usr/opt/reliant/conf/sybase SYSB:/usr/opt/reliant/conf/.

 

2.2.9     启动Reliant

l         #hvstart sybase

l         #hvdisp –a 观察状态

l         启动/home下的应用监控程序

#/home/monitor

l         #hvshut –a将停止两台服务器上的双机软件,#hvshut –l则只关闭本机的双机软件。

阅读(497) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~