[讨论]SUN CLUSTER 2.2安装调试[讨论]

发表于:2007-06-09来源:作者:点击数: 标签:
终于完成任务了,希望对“三少爷”和其他人有帮助,不过cluster2.2就要停产了。 希望有其他cluster经验的人也贴贴安装过程供大家学习。 SUNCLUSTER2.2SERVER端软件包安装过程 root@ha-host2#./scinstall Installing:SUNWscins 安装SUNWscins成功 Checkingoni

终于完成任务了,希望对“三少爷”和其他人有帮助,不过cluster2.2就要停产了。
希望有其他cluster经验的人也贴贴安装过程供大家学习。


SUN CLUSTER 2.2 SERVER 端软件包安装过程

root@ha-host2 # ./scinstall
Installing: SUNWscins

安装<SUNWscins>成功

        Checking on installed package state
................

None of the Sun Cluster software has been installed
 
        <<Press return to continue>> 


==== Install/Upgrade Software Selection Menu =======================
Upgrade to the latest Sun Cluster Server packages or select package
sets for installation. The list of package sets depends on the Sun
Cluster packages that are currently installed.

Choose one:
1) Upgrade            Upgrade to Sun Cluster 2.2 Server packages
2) Server             Install the Sun Cluster packages needed on a server
3) Client             Install the admin tools needed on an admin workstation
4) Server and Client  Install both Client and Server packages

5) Close              Exit this Menu
6) Quit               Quit the Program
 
Enter the number of the package set [6]:  2
 
What is the path to the CD-ROM image [/cdrom/cdrom0]:  

Installing Server packages

Installing the following packages: SUNWsclb SUNWsc SUNWclearcase/" target="_blank" >ccd SUNWcmm SUNWff SUNWmond SUNWpnm SUNWscman SUNWsccf SUNWscmgr SUNWffx SUNWsclbx SUNWmondx

            >>>> Warning <<<<
  The installation process will run several scripts as root.  In
  addition, it may install setUID programs.  If you choose automatic
  mode, the installation of the chosen packages will proceed without
  any user interaction.  If you wish to manually control the install
  process you must choose the manual installation option.

Choices:
   manual     Interactively install each package
   automatic  Install the selected packages with no user interaction.

In addition, the following commands are supported:
   list       Show a list of the packages to be installed
   help       Show this command summary
   close      Return to previous menu
   quit       Quit the program

 
Install mode [manual automatic] [automatic]:  


Package directory: /cdrom/cdrom0/Sun_Cluster_2_2/Sol_2.8/Packages

安装<SUNWsclb>成功

Package directory: /cdrom/cdrom0/Sun_Cluster_2_2/Sol_2.8/Packages
Modifying /etc/rpc

安装<SUNWsc>成功

Package directory: /cdrom/cdrom0/Sun_Cluster_2_2/Sol_2.8/Packages

安装<SUNWccd>成功

Package directory: /cdrom/cdrom0/Sun_Cluster_2_2/Sol_2.8/Packages

安装<SUNWcmm>成功

Package directory: /cdrom/cdrom0/Sun_Cluster_2_2/Sol_2.8/Packages
Modifying /etc/devlink.tab

安装<SUNWff>成功

Package directory: /cdrom/cdrom0/Sun_Cluster_2_2/Sol_2.8/Packages
Modifying /etc/inet/inetd.conf
Modifying /etc/inet/services

安装<SUNWmond>成功

Package directory: /cdrom/cdrom0/Sun_Cluster_2_2/Sol_2.8/Packages

安装<SUNWpnm>成功

Package directory: /cdrom/cdrom0/Sun_Cluster_2_2/Sol_2.8/Packages

安装<SUNWscman>成功

Package directory: /cdrom/cdrom0/Sun_Cluster_2_2/Sol_2.8/Packages

处理软件包范例<SUNWsccf>来自</cdrom/cdrom/Sun_Cluster_2_2/Sol_2.8/Packages>

Sun Cluster Configuration Database
(sparc) 2.2,REV=2000.03.14.18.21
Copyright 2000 Sun Microsystems, Inc. All rights reserved.
Copyright 2000 Sun Microsystems, Inc. Tous droits r閟erv閟.
使用</>作为包的基本目录
## 正在处理软件包信息.
## 正在处理系统信息.
   4软件包路径名已经正确地安装
## 检查软件包的从属性

安装Sun Cluster Configuration Database成为<SUNWsccf>

##正在安装1部分- 1.
/etc/init.d/rootreserve
/etc/opt/SUNWcluster/conf/TEMPLATE.cdb
/etc/opt/SUNWcluster/conf/ccd.TEMPLATE.init
/etc/opt/SUNWcluster/conf/cdb.filter
/etc/opt/SUNWcluster/conf/dataservices
/etc/opt/SUNWcluster/conf/ha.ccd
/opt/SUNWcluster/bin/dns_sync_wrapper
/opt/SUNWcluster/bin/nshttp_sync_wrapper
/opt/SUNWcluster/bin/nsmail_sync_wrapper
/opt/SUNWcluster/bin/nsnews_sync_wrapper
[ 确认类别<none> ]
/etc/rc0.d/K60rootreserve <链接的路径名>
/etc/rc2.d/S27rootreserve <链接的路径名>
Modifying /etc/group
[ 确认类别<sed> ]
## 执行预安装正文

安装<SUNWsccf>成功

Package directory: /cdrom/cdrom0/Sun_Cluster_2_2/Sol_2.8/Packages

安装<SUNWscmgr>成功

Package directory: /cdrom/cdrom0/Sun_Cluster_2_2/Sol_2.8/Packages

安装<SUNWffx>成功

Package directory: /cdrom/cdrom0/Sun_Cluster_2_2/Sol_2.8/Packages

安装<SUNWsclbx>成功

Package directory: /cdrom/cdrom0/Sun_Cluster_2_2/Sol_2.8/Packages

安装<SUNWmondx>成功

        Checking on installed package state
................

Volume Manager Selection

Please choose the Volume Manager that will be used
on this node:

1) Cluster Volume Manager (CVM)
2) Sun StorEdge Volume Manager (SSVM)
3) Solstice DiskSuite (SDS)
Choose the Volume Manager: 2

     ---------WARNING---------
The Sun StorEdge Volume Manager (SSVM) will need to be
installed before the cluster can be started.

 
        <<Press return to continue>> 


What is the name of the cluster? sc-TEST

How many potential nodes will sc-TEST have [4]? 2

How many of the initially configured nodes will be active [2]? 2

What type of network interface will be used for this configuration (ether|SCI)
[SCI]? ether

What is the hostname of node 0 [node0]? ha-host1

What is ha-host1's first private network interface [hme0]? hme0

What is ha-host1's second private network interface [hme1]? hme1

You will now be prompted for ethernet addresses of
the host. There is only one ethernet address for each host
regardless of the number of interfaces a host has. You can get
this information in one of several ways:

1. use the 'banner' command at the ok prompt,
2. use the 'ifconfig -a' command (need to be root),
3. use ping, arp and grep commands. ('ping exxon; arp -a | grep exxon')

Ethernet addresses are given as six hexadecimal bytes separated
by colons. (ie, 01:23:45:67:89:ab)


What is ha-host1's ethernet address? 8:0:20:**:**:**

What is the hostname of node 1 [node1]? ha-host2

What is ha-host2's first private network interface [hme0]? hme0

What is ha-host2's second private network interface [hme1]? hme1

You will now be prompted for ethernet addresses of
the host. There is only one ethernet address for each host
regardless of the number of interfaces a host has. You can get
this information in one of several ways:

1. use the 'banner' command at the ok prompt,
2. use the 'ifconfig -a' command (need to be root),
3. use ping, arp and grep commands. ('ping exxon; arp -a | grep exxon')

Ethernet addresses are given as six hexadecimal bytes separated
by colons. (ie, 01:23:45:67:89:ab)


What is ha-host2's ethernet address? 8:0:20:**:**:**

Will this cluster support any HA data services (yes/no) [yes]?  no


Performing Quorum Selection


Checking node status...
Checking host ha-host1 ...
ha-host1 is alive

One of the specified hosts is either unreachable or permissions
are not set up or the appropriate software has not been installed
on it. In this situation, it is not possible to determine the set
of devices attached to both the hosts.
Note that both private and shared devices for this host will be
displayed in this node and the administrator must exercise extreme
caution in choosing a suitable quorum device.

Getting device information for host ha-host2
This may take a few seconds to a few minutes...done
Select quorum device for ha-host1 and ha-host2.
Type the number corresponding to the desired selection.
For example: 1
1) DISK:c1t0d0s2:01178LB362
2) DISK:c1t1d0s2:01178N8335
3) DISK:c1t2d0s2:01188NH828
4) DISK:c2t10d0s2:01188LX832
5) DISK:c2t8d0s2:01178KD241
6) DISK:c2t9d0s2:01178KB436
Quorum device: 1
Disk c1t0d0s2 with serial id 01178LB362 has been chosen
as the quorum device.

Finished Quorum Selection



Installing ethernet Network Interface packages.
 
What is the path to the CD-ROM image [/cdrom/cdrom0]:  

Installing the following packages: SUNWsma SUNWsmax

Package directory: /cdrom/cdrom0/Sun_Cluster_2_2/Sol_2.8/Packages
Modifying /etc/devlink.tab
Modifying /etc/inet/services
Modifying /etc/inet/inetd.conf

  ... SUNWsma: postinstall complete


安装<SUNWsma>成功

Package directory: /cdrom/cdrom0/Sun_Cluster_2_2/Sol_2.8/Packages

  ... SUNWsmax: postinstall complete

安装<SUNWsmax>成功

        Checking on installed package state
................

..........

==== Select Data Services Menu ==========================

Please select which of the following data services
are to be installed onto this cluster. Select singly,
or in a space separated list.
Note: Sun Cluster HA for NFS and Sun Cluster for Informix XPS
are installed automatically with the Server Framework.

You may de-select a data service by selecting it 
a second time.

Select DONE when finished selecting the configuration.

        1) Sun Cluster HA for Oracle
        2) Sun Cluster HA for Informix
        3) Sun Cluster HA for Sybase
        4) Sun Cluster HA for Netscape
        5) Sun Cluster HA for Netscape LDAP
        6) Sun Cluster HA for Lotus
        7) Sun Cluster HA for Tivoli
         Sun Cluster HA for SAP
        9) Sun Cluster HA for DNS

INSTALL 10) No Data Services
        11) DONE

Choose a data service: 11

============ Main Menu =================

1) Install/Upgrade - Install or Upgrade Server
             Packages or Install Client Packages.
2) Remove  - Remove Server or Client Packages.
3) Change  - Modify cluster or data service configuration
4) Verify  - Verify installed package sets.
5) List    - List installed package sets.

6) Quit    - Quit this program.
7) Help    - The help screen for this menu.
 
Please choose one of the menu items: [7]:  6
==== Verify Package Installation ==========================
Installation
    All  of the install      packages have been installed
Framework
    None of the client       packages have been installed
    All  of the server       packages have been installed
Communications
    All  of the SMA          packages have been installed
Data Services
    None of the Sun Cluster HA for Oracle packages have been installed
    None of the Sun Cluster HA for Informix packages have been installed
    None of the Sun Cluster HA for Sybase packages have been installed
    None of the Sun Cluster HA for Netscape packages have been installed
    None of the Sun Cluster HA for Netscape LDAP packages have been installed
    None of the Sun Cluster HA for Lotus packages have been installed
    None of the Sun Cluster HA for Tivoli packages have been installed
    None of the Sun Cluster HA for SAP packages have been installed
    None of the Sun Cluster HA for DNS packages have been installed
    None of the Sun Cluster for Oracle Parallel Server packages have been installed
root@ha-host2 # 


==========================================================================================


如果要安装数据库的模块,请参考以下ORACLE的例子


==== Select Data Services Menu ==========================

Please select which of the following data services
are to be installed onto this cluster. Select singly,
or in a space separated list.
Note: Sun Cluster HA for NFS and Sun Cluster for Informix XPS
are installed automatically with the Server Framework.

You may de-select a data service by selecting it 
a second time.

Select DONE when finished selecting the configuration.

        1) Sun Cluster HA for Oracle
        2) Sun Cluster HA for Informix
        3) Sun Cluster HA for Sybase
        4) Sun Cluster HA for Netscape
        5) Sun Cluster HA for Netscape LDAP
        6) Sun Cluster HA for Lotus
        7) Sun Cluster HA for Tivoli
         Sun Cluster HA for SAP
        9) Sun Cluster HA for DNS

INSTALL 10) No Data Services
        11) DONE

Choose a data service: 1


==== Select Data Services Menu ==========================

Please select which of the following data services
are to be installed onto this cluster. Select singly,
or in a space separated list.
Note: Sun Cluster HA for NFS and Sun Cluster for Informix XPS
are installed automatically with the Server Framework.

You may de-select a data service by selecting it 
a second time.

Select DONE when finished selecting the configuration.

INSTALL 1) Sun Cluster HA for Oracle
        2) Sun Cluster HA for Informix
        3) Sun Cluster HA for Sybase
        4) Sun Cluster HA for Netscape
        5) Sun Cluster HA for Netscape LDAP
        6) Sun Cluster HA for Lotus
        7) Sun Cluster HA for Tivoli
         Sun Cluster HA for SAP
        9) Sun Cluster HA for DNS

        10) No Data Services
        11) DONE

Choose a data service: 11
 
What is the path to the CD-ROM image [/cdrom/cdrom0]:  

Installing Data Service packages.

Installing the following packages: SUNWscpro SUNWscds SUNWscsyb

            >>>> Warning <<<<
  The installation process will run several scripts as root.  In
  addition, it may install setUID programs.  If you choose automatic
  mode, the installation of the chosen packages will proceed without
  any user interaction.  If you wish to manually control the install
  process you must choose the manual installation option.

Choices:
   manual     Interactively install each package
   automatic  Install the selected packages with no user interaction.

In addition, the following commands are supported:
   list       Show a list of the packages to be installed
   help       Show this command summary
   close      Return to previous menu
   quit       Quit the program

 
Install mode [manual automatic] [automatic]:  


Package directory: /cdrom/cdrom0/Sun_Cluster_2_2/Sol_2.8/Packages

安装<SUNWscpro>成功

Package directory: /cdrom/cdrom0/Sun_Cluster_2_2/Sol_2.8/Packages

安装<SUNWscds>成功

Package directory: /cdrom/cdrom0/Sun_Cluster_2_2/Sol_2.8/Packages
Purified ccd file written to /etc/opt/SUNWcluster/conf/ccd.database.pure
There were 0 errors found.

安装<SUNWscora>成功

        Checking on installed package state
..........................

============ Main Menu =================

1) Install/Upgrade - Install or Upgrade Server
             Packages or Install Client Packages.
2) Remove  - Remove Server or Client Packages.
3) Change  - Modify cluster or data service configuration
4) Verify  - Verify installed package sets.
5) List    - List installed package sets.

6) Quit    - Quit this program.
7) Help    - The help screen for this menu.
 
Please choose one of the menu items: [7]:  6
==== Verify Package Installation ==========================
Installation
    All  of the install      packages have been installed
Framework
    None of the client       packages have been installed
    All  of the server       packages have been installed
Communications
    All  of the SMA          packages have been installed
Data Services
     All    of the Sun Cluster HA for Oracle packages have been installed
    None of the Sun Cluster HA for Informix packages have been installed
    None of the Sun Cluster HA for Sybase packages have been installed
    None of the Sun Cluster HA for Netscape packages have been installed
    None of the Sun Cluster HA for Netscape LDAP packages have been installed
    None of the Sun Cluster HA for Lotus packages have been installed
    None of the Sun Cluster HA for Tivoli packages have been installed
    None of the Sun Cluster HA for SAP packages have been installed
    None of the Sun Cluster HA for DNS packages have been installed
    None of the Sun Cluster for Oracle Parallel Server packages have been installed
root@ha-host2 # 



=====================================================================================


配置NAFO(Network Adapter Fail Over,主备机都要做)

运行以下命令:
root@ha-host2 # /opt/SUNWpnm/bin/pnmset
In the following dialog, you will be prompted to configure public
network management.
do you want to continue ... [y/n]: y
How many NAFO backup groups on the host [1]: 1
Enter backup group number [0]: 0
Please enter all network adapters under nafo0:
hme0 
The following test will evaluate the correctness of the customer
NAFO configuration...
name duplication test passed
Check nafo0... < 20 seconds
hme0 is active
remote address = 10.·.·.·
test hme0 wait...
nafo0 test passed

NAFO配置结束。

===========================================================================================


配置逻辑主机 (只在主用机上做一次就可以了)
启动Cluster
在主用机上运行以下命令,启动Cluster
ha-host1@root# scadmin startcluster ha-host1 sc-TEST
在备用机上运行以下命令,加入Cluster
ha-host1@root# scadmin startnode
在主用机上运行以下命令,配置逻辑主机及相关信息
ha-host1@root# scconf  sc-TEST  -L ha-TEST  -n  ha-host1,ha-host2 -g datdg -i hme0,hme0,han2000 -m
在主/备用机上运行以下命令,配置文件管理系统
ha-host1@root# scconf sc-TEST -F ha-TEST
在主/备用机上修改双机共享存储挂接配置文件:
修改文件/etc/opt/SUNWcluster/conf/hanfs/vfstab.ha-TEST,加入如下行:

/dev/vx/dsk/datadg02/vol-00   /dev/vx/rdsk/datadg02/vol-00/opt/test0 ufs 1 no -
/dev/vx/dsk/datadg02/vol-01   /dev/vx/rdsk/datadg02/vol-01/opt/test1 ufs 1 no -
/dev/vx/dsk/datadg02/vol-02   /dev/vx/rdsk/datadg02/vol-02/opt/test2 ufs 1 no -
/dev/vx/dsk/datadg02/vol-03   /dev/vx/rdsk/datadg02/vol-03/opt/test3 ufs 1 no -


===========================================================================================


oracle 正常安装 再用TAR 命令备份和恢复到备用机上。



===========================================================================================

为Cluster配置Oracle

以下在主用机上做(Cluster 已经启动,Oracle已经启动 
# su - oracle
$ svrmgrl  (其中省略了系统回应信息)
SVRMGR>connect internal;
SVRMGR>grant connect, resource to scott identified by tiger;
SVRMGR>alter user scott default tablespace system quota 1m on system;
SVRMGR>grant select on v_$sysstat to scott;
SVRMGR>grant create session to scott;
SVRMGR>grant create table to scott;
SVRMGR>disconnect;
SVRMGR>exit;
$


2、编辑oracle的2个文件
以下在主用机上做
# su - oracle
$ vi /opt/oracle/home/network/admin/tnsnames.ora
(将文件中的关于HOST = host1 的设置改成HOST = ha-TEST 逻辑主机名)
(并确认其中SID = ora8,SERVICE = ora
$ vi /opt/oracle/home/network/admin/listener.ora
(将文件中的关于HOST = host1 的设置改成HOST = ha-TEST 逻辑主机名)
(并确认其中SID = ora8,SERVICE = ora

3、copy 文件及改属性
以下在主用机上做,且Cluster已经启动,/han2000目录已经挂接
# cp /opt/oracle/home/network/admin/tnsnames.ora /var/opt/oracle/
# cp /opt/oracle/home/network/admin/listener.ora /var/opt/oracle/
# cp /opt/oracle/admin/ora8/pfile/initora8.ora /ha-TEST
# chown oracle /ha-TEST/initora8.ora
# chgrp oinstall /ha-TEST/initora8.ora
# chown oracle /var/opt/oracle/tnsnames.ora
# chgrp oinstall /var/opt/oracle/tnsnames.ora
# chown oracle /var/opt/oracle/listener.ora
# chgrp oinstall /var/opt/oracle/listener.ora

4、复制Oracle的文件到备用机
以下在主用机上做
# cd /opt
# tar cf oracle.tar oracle
# rcp oracle.tar ha-host2:/opt
# cd /var/opt
# tar cf var-oracle.tar oracle
# rcp var-oracle.tar ha-host2:/var/opt
以下在备用机上做
# cd /opt
# tar xf oracle.tar
# cd /var/opt
# tar xf var-oracle.tar

5、在Cluster上注册Oracle服务
以下在主用机上做,且Cluster已经启动
# hareg -s -r oracle
# hareg -y oracle
# haoracle insert ora8 ha-TEST 60 10 120 300 scott/tiger \
> /han2000/initN2000.ora
(60循环检测间隔  60秒
 10连接检测间隔  10次
 120检测超时时间 120秒
 300重启延时时间 300秒)
# haoracle start ora8

6、做适当的检查,切换,看oracle启动是否正常
# haoracle list
   onra8:ha-TEST:60:10:120:300:scott:tiger:/ha-TEST/initora8.ora:
# hareg
   oracle on


剩下的就是测试了,还有你的应用如何让cluster控制切换,那是就事论事的,这里没有办法写。

如果过程中有什么不一致的地方是我修改的问题,请包含和指正。

声明:此文档只能用于测试!!禁止用于生产系统安装调试!!

 mmmmn 回复于:2002-06-03 10:54:03
我以为你写的是3.x的呢,残念。。。。。。

 bear 回复于:2002-06-03 10:56:54
3.x的我还没有装熟怎么写?再说SUN的3.x还存在很大的变化,再等等。
再过2个月。

 lintonyang 回复于:2002-06-03 11:03:56
你法的是什么东西?我不懂!不好意思!:)

 bear 回复于:2002-06-03 11:06:17
这是大家给我布置的作业:(。

 garyjia 回复于:2002-06-03 11:19:06
如果应用不是数据库而是邮件系统,有什么特别要注意的吗?

 bear 回复于:2002-06-03 11:26:26
好象支持列表中没有邮件系统?

 garyjia 回复于:2002-06-03 11:27:50
只能选择VCS了。

 procrus 回复于:2002-06-03 11:30:53
sun的cluster和legato的ha相比,谁更好??

 三少爷 回复于:2002-06-03 13:33:37
老大,辛苦了

 bear 回复于:2002-06-03 17:26:18
希望有用。

 fancy 回复于:2002-06-03 20:00:16
谢谢你,bear!

 sunyoung 回复于:2002-06-04 11:57:48
各位老大啊
我能跟你们学吗

 段誉 回复于:2002-06-04 12:05:43
感谢!!
还有个问题,就是Oracle 8是否需要OPS?
 

 bear 回复于:2002-06-04 17:29:59
不用也可以用主/备方式。

 ssyyx 回复于:2002-06-06 11:17:56
SUN CLUSTER 是用来做什么的啊?


 bear 回复于:2002-06-06 14:05:16
就是集群系统呀!主要是增加系统可靠性的一种方案。

 xxf 回复于:2002-06-14 17:56:25
我对bear的佩服犹如滔滔江水,连绵不绝!

 系统工程师 回复于:2002-06-14 19:25:49
  我也是....

原文转自:http://www.ltesting.net