ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 在solaris sparc 64bit搭建双节点sun cluster_集录

在solaris sparc 64bit搭建双节点sun cluster_集录

原创 Linux操作系统 作者:wisdomone1 时间:2010-03-02 01:17:21 0 删除 编辑

xxx系统集群安装测试

 


 

2009年10月

 

 

 

目录

 


第1章            集群系统规划

1. 首信AAA系统

首信基于Oracle数据库和Java技术的Web应用,运行在Soalris 10操作系统上,服务支持独立启动和切换,适用于集群,需在Sun Cluster集群上得到验证。

2. Solaris Cluster软件

Sun对Solaris操作系统的高可用性扩展的系统,提供数据中心应用和服务的故障切换和远程容灾,包括对本地、园区级、和城市间的业务持续性支持服务,最新版本为本次测试要用的Soalris Cluster 3.2 1/09,具体包括以下部分:

·        Sun Cluster 3.2集群软件

·        Sun Cluster Agent 3.2应用服务代理

3. Sun服务器和存储硬件

服务器节点:双Sun SPARC Enterprsie T系列服务器节点(1个CPU,1GB内存以上)

共享存储:单台Sun StorageTek 2540光线盘阵(2个镜像卷,分别装Oracle和AAA数据)

管理工作站:PC机或笔记本(浏览器及终端)

 

 

 

 

 

第2章            集群安装和配置

1         软件安装

1.1  双节点集群

集群名称:capitek

服务器节点:运行Oracle/AAA应用,互为热备(capitek1,capitek2)

磁盘阵列: 双光纤,支持MPxIO多路径切换,2个镜像RAID卷组(oradata,aaadata)

公网:单网卡(推荐双网卡),组成IPMP多路径切换组(sc_ipmp)

私网:心跳线,双网卡,自动配置、探测、切换

管理工作站:通过console终端和浏览器管理

 

 

 

 

 

 


1.2  检查和配置系统环境

1.2.1检查Solaris 10操作系统版本

Sun Cluster是对Solaris操作系统的高可用性扩展,其安装必须与Solaris版本相对应,目前针对最新Sun Cluster 3.2 1/09需安装Solaris 10 5/09,所以需在所装节点上检查Solaris版本

capitek1# more /etc/release

                       Solaris 10 5/09 s10s_u7wos_08 SPARC

           Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.

                        Use is subject to license terms.

                             Assembled 30 March 2009

 

capitek2# more /etc/release

                       Solaris 10 5/09 s10s_u7wos_08 SPARC

           Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.

                        Use is subject to license terms.

                             Assembled 30 March 2009

 
 

 

 

 


1.2.2检查和配置节点服务器的IP地址

capitek1 # vi /etc/hosts

...

::1     localhost      

127.0.0.1       localhost      

172.16.31.72    capitek1     capitek1.capitek.com    loghost

172.16.31.73    capitek2

172.16.31.74    oradata

172.16.31.75    aaadata

 

capitek2 # vi /etc/hosts

...

::1     localhost

127.0.0.1       localhost

172.16.31.73    capitek2     capitek2.capitek.com  loghost

172.16.31.72    capitek1

172.16.31.74    oradata

172.16.31.75    aaadata

 

capitek1# ifconfig -a

lo0: flags=2001000849 mtu 8232 index 1

        inet 127.0.0.1 netmask ff000000

e1000g0: flags=201000843 mtu 1500 index 2

        inet 172.16.31.72 netmask ffffff00 broadcast 172.16.31.255

        ether 0:14:4f:9f:6b:ea

 

capitek1# vi defaultrouter

172.16.31.71

 

capitek2# ifconfig -a

lo0: flags=2001000849 mtu 8232 index 1

        inet 127.0.0.1 netmask ff000000

e1000g0: flags=201000843 mtu 1500 index 2

        inet 172.16.31.73 netmask ffffff00 broadcast 172.16.31.255

        ether 0:14:4f:a7:5b:de

 

capitek2# vi defaultrouter

172.16.31.71

 
 

 

 

 

 

 

 

 

 

 

 


1.2.3配置IPMP网络多路径

capitek1 # vi hostname.e1000g0

capitek1 netmask + broadcast + group sc_ipmp up

 

capitek1 # reboot

capitek1 # ps -ef |grep in.mpathd

    root   256     1   0 13:42:55 ?        0:05 /usr/lib/inet/in.mpathd

 

 

 

capitek2 # vi /etc/hostname.e1000g0

capitek2 netmask + broadcast + group sc_ipmp up

 

capitek1 # reboot

capitek2 # ps -ef |grep in.mpathd

    root   47     1   0 13:50:50 ?           0:05 /usr/lib/inet/in.mpathd

 

 
 

 

 

 

 

 


1.2.4检查和配置节点服务器的访问权限

capitek1 # vi /etc/default/login                       

...

#CONSOLE=/dev/console

...

 

capitek2 # vi /etc/default/login

...

#CONSOLE=/dev/console

...

 

capitek1 # vi /.rhosts

capitek1 root

capitek2 root

 

capitek2 # vi /.rhosts

capitek1 root

capitek2 root

 
 

 

 

 

 

 

 

 

 

 

 


1.2.5检查HBA光纤卡状态,并在所有节点上设置MPxIO多路径切换

 

capitek1# cfgadm -al

...

c2                        fc-private   connected    configured   unknown

c2::202400a0b8391069      disk         connected    configured   unknown

...

c4                        fc-private   connected    configured   unknown

c4::202500a0b8391069      disk         connected    configured   unknown

 

capitek1# luxadm -e port

/devices/pci@7c0/pci@0/pci@1/pci@0,2/SUNW,qlc@2/fp@0,0:devctl     CONNECTED

/devices/pci@7c0/pci@0/pci@9/SUNW,qlc@0/fp@0,0:devctl             NOT CONNECTED

/devices/pci@7c0/pci@0/pci@9/SUNW,qlc@0,1/fp@0,0:devctl           CONNECTED

 

capitek1 # stmsboot -D fp -e

WARNING: This operation will require a reboot.

Do you want to continue ? [y/n] (default: y) y

The changes will come into effect after rebooting the system.

Reboot the system now ? [y/n] (default: y) y

...

 

capitek2 # stmsboot -D fp -e

 

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


1.2.6检查硬盘分区,准备Sun Cluster/Solaris Volume Manager所需的分区

磁盘阵列,即共享存储,在Sun Cluster中为全局设备,可同时被集群服务器节点访问,所以需在每个服务器中创建挂接点文件系统,即globaldevices,需512MB。

Sun Cluster需Solaris Volume Manager卷管理软件创建和管理磁盘组,并能在集群服务器间切换,保证磁盘组同一时可只被一服务器拥有(可写),其数据库需占一分区,200MB大小。

capitek1 # format

Searching for disks...done

 

AVAILABLE DISK SELECTIONS:

       0. c0t0d0

          /pci@780/pci@0/pci@9/scsi@0/sd@0,0

       ...

       4. c5t600A0B80003909D40000087F4AD56D7Fd0

          /scsi_vhci/ssd@g600a0b80003909d40000087f4ad56d7f

       5. c5t600A0B8000391069000008654AD5695Cd0

          /scsi_vhci/ssd@g600a0b8000391069000008654ad5695c

Specify disk (enter its number): 0

...

Part      Tag    Flag     Cylinders         Size            Blocks

  0       root    wm       0 -  3220       15.63GB    (3221/0/0)   32776896

  1       swap    wu    3221 -  4869        8.00GB    (1649/0/0)   16780224

  2     backup    wm       0 - 14086       68.35GB    (14087/0/0) 143349312

  3 unassigned    wm       0                0         (0/0/0)             0

  4 unassigned    wm    4870 -  5076        1.00GB    (207/0/0)     2106432

  5 unassigned    wm       0                0         (0/0/0)             0

  6       home    wm    5077 - 13932       42.97GB    (8856/0/0)   90118656

  7 unassigned    wm   13933 - 14086      765.19MB    (154/0/0)     1567104

...

 

capitek2 # format

Searching for disks...done

 

AVAILABLE DISK SELECTIONS:

       0. c0t0d0

          /pci@780/pci@0/pci@9/scsi@0/sd@0,0

       ...

       3. c3t600A0B80003909D40000087F4AD56D7Fd0

          /scsi_vhci/ssd@g600a0b80003909d40000087f4ad56d7f

       4. c3t600A0B8000391069000008654AD5695Cd0

          /scsi_vhci/ssd@g600a0b8000391069000008654ad5695c

Specify disk (enter its number): 0

...

Part      Tag    Flag     Cylinders         Size            Blocks

  0       root    wm       0 -  3220       15.63GB    (3221/0/0)   32776896

  1       swap    wu    3221 -  4869        8.00GB    (1649/0/0)   16780224

  2     backup    wm       0 - 14086       68.35GB    (14087/0/0) 143349312

  3 unassigned    wm       0                0         (0/0/0)             0

  4 unassigned    wm    4870 -  5076        1.00GB    (207/0/0)     2106432

  5 unassigned    wm       0                0         (0/0/0)             0

  6       home    wm    5077 - 13932       42.97GB    (8856/0/0)   90118656

  7 unassigned    wm   13933 - 14086      765.19MB    (154/0/0)     1567104

...

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 


1.2.7检查硬盘分区,检查Sun Cluster分区,创建Solaris Volume Manager所需的数据库

capitek1 # df -h

Filesystem             size   used  avail capacity  Mounted on

/dev/dsk/c0t0d0s0       15G   5.6G   9.7G    37%    /

...

/dev/dsk/c0t0d0s4      997M   1.0M   936M     1%    /globaldevices

...

 

Capitek2 # df -h

Filesystem             size   used  avail capacity  Mounted on

/dev/dsk/c0t0d0s0       15G   5.6G   9.7G    37%    /

...

/dev/dsk/c0t0d0s4      997M   1.0M   936M     1%    /globaldevices

...

capitek1 # metadb -a -f -a -c 3 c0t0d0s7

capitek1 # metadb

    flags       first blk   block count

     a        u        16      8192    /dev/dsk/c0t0d0s7

     a        u        8208        8192    /dev/dsk/c0t0d0s7

     a        u        16400       8192    /dev/dsk/c0t0d0s7

 

capitek2 # metadb -a -f -a -c 3 c0t0d0s7

capitek2 # metadb

    flags       first blk   block count

     a        u        16      8192    /dev/dsk/c0t0d0s7

     a        u        8208        8192    /dev/dsk/c0t0d0s7

     a        u        16400       8192    /dev/dsk/c0t0d0s7

 
 

 

 

 

 

 

 

 


1.2.8在所有服务器节点上安装Sun EIS标准安装补丁程序,并重新启动服务器

Sun EIS标准安装补丁程序是Sun服务部门发布的针对生产环境的补丁程序,包括最新内核补丁,推荐使用Sun EIS DVD光盘或光盘映像文件安装,装后需重新启动。

Capitek1# lofiadm -a /export/home/EIS/eis-dvd20090728.iso

 

capitek1# mount -f hsfs /dev/lofi/1 /export/home/EIS/cdrom

 

capitek1# cd /export/home/EIS/cdrom/sun/install

capitek1# ls

bin                local-bin          profile-EIS        setup-standard.sh

copy-dvd2sun.sh    local-bin_x86      profile-root

 

capitek1# ./setup-standard.sh

...

You must log out & back in for the environment to be updated

 

Alternative: to test beforehand enter  . /.profile

 

 

setup-standard completed.

 

capitek1# reboot

 
 

 

 

 

 

 

 


1.2.9在所有服务器节点上修改Oracle安装所需内核参数,并重新启动服务器

capitek1 # vi /etc/system                          

set shmsys:shminfo_shmmax = 8494967295

set shmsys:shminfo_shmmin = 1

set shmsys:shminfo_shmmni = 200

set shmsys:shminfo_shmseg = 120

set semsys:seminfo_semmni = 200

set semsys:seminfo_semmsl = 200

set semsys:seminfo_semmns = 400

set semsys:seminfo_semopm = 200

set semsys:seminfo_semvmx = 32767

 

 

capitek2 # more /etc/system

set shmsys:shminfo_shmmax = 8494967295

set shmsys:shminfo_shmmin = 1

set shmsys:shminfo_shmmni = 200

set shmsys:shminfo_shmseg = 120

set semsys:seminfo_semmni = 200

set semsys:seminfo_semmsl = 200

set semsys:seminfo_semmns = 400

set semsys:seminfo_semopm = 200

set semsys:seminfo_semvmx = 32767

 
 

 

 

 

 

 

 


1.3安装Sun Cluster集群软件

1.3.1在第一个节点服务器上安装集群软件

Sun Cluster的安装是在第一个服务器上安装集群软件并首先建立集群,集群的其它服务器节点再并行安装软件加入到建立的集群中。

capitek1 # cd /export/home/sc32

capitek1 # ls

suncluster-3_2u2-ga.iso

capitek1 # lofiadm -a /export/home/sc32/suncluster-3_2u2-ga.iso

/dev/lofi/1

capitek1 # mount -F hsfs /dev/lofi/1 /mnt

 

capitek1 # cd /mnt

capitek1 # ls

Copyright      License        README         Solaris_sparc  Solaris_x86

capitek1 # cd Solaris_sparc

capitek1 # ls

Product       installer     release_info

capitek1 # ./installer -nodisplay

 

 
 

 

 

 

 

 


接受License,并选择安装类型

Welcome to the Sun Java(TM) Availability Suite;

...  

Copyright 2008 Sun Microsystems, Inc. All rights reserved.

   Use is subject to license terms.

  

  

...

   Have you read, and do you accept, all of the terms of the preceding

 Software License Agreement [No] {"<" goes back, "!" exits}? Yes

…

Installation Type

-----------------

 

   Do you want to install the full set of Sun Java(TM) Availability Suite

   Products and Services? (Yes/No) [Yes] {"<" goes back, "!" exits} no

 
 

 

 

 

 


选择安装Sun Cluster和Agents软件包

Choose Software Components - Main Menu

-------------------------------

Note: "*  *" indicates that the selection is disabled

 

[ ] 1. Sun Cluster Geographic Edition 3.2 1/09

[ ] 2. Quorum Server

[ ] 3. Monitoring Console 1.0 Update 1

[ ] 4. High Availability Session Store 4.4.3

[ ] 5. Sun Cluster 3.2 1/09

[ ] 6. Java DB 10.2.2.1

[ ] 7. Sun Cluster Agents 3.2 1/09

[ ] 8. All Shared Components

 

   Enter a comma separated list of products to install, or press

   R to refresh the list [] {"<" goes back, "!" exits}: 5,7

...

 
 

 

 

 

 


选择Sun Cluster HA for Oracle等Agents

Component Selection - Selected Product "Sun Cluster Agents 3.2 1/09"

--------------------------------------------------------------------

 

*[X] 1. Sun Cluster HA for Sun Java System Application Server

*[X] 2. Sun Cluster HA for Sun Java System Message Queue

…

*[X] 16. Sun Cluster HA for Oracle

…

*[X] 20. Sun Cluster Support for Oracle RAC

...

   Enter a comma separated list of components to install

 (or A to install all )

   [A] {"<" goes back, "!" exits} 16,20

 

*[X] 16. Sun Cluster HA for Oracle

...

Checking System Status

 

    Available disk space...        : Checking .... OK

....  

 
 

 

 

 

 

 


选择以后配置

Screen for selecting Type of Configuration

 

1. Configure Now - Selectively override defaults or express through

2. Configure Later - Manually configure following installation

 

 

   Select Type of Configuration [1] {"<" goes back, "!" exits} 2

Ready to Install

----------------

The following components will be installed.

 

Product: Java Availability Suite

Uninstall Location: /var/sadm/prod/SUNWentsyssc32u2

Space Required: 257.66 MB

---------------------------------------------------

    Java DB

       Java DB Server

       Java DB Client

    Sun Cluster 3.2 1/09

       Sun Cluster Core

       Sun Cluster Manager

    Sun Cluster Agents 3.2 1/09

       Sun Cluster HA for Oracle

...  

 

 
 

 

 

 

 

 

 

 


完成软件包安装

1. Install

2. Start Over

3. Exit Installation

 

   What would you like to do [1] {"<" goes back, "!" exits}?

 

Java Availability Suite

|-1%--------------25%--------------50%--------------75%-----------100%|

 

 

Installation Complete

 

 

Software installation has completed successfully. You can view the installation

summary and log by using the choices below. Summary and log files are available

in /var/sadm/install/logs/.

...  

   Enter 1 to view installation summary and Enter 2 to view installation logs

   [1] {"!" exits} !

In order to notify you of potential updates, we need to confirm an internet

connection.

Do you want to proceed [Y/N] : N

capitek1 #

 
 

 

 

 

 

 

 

 

 


1.4安装Sun Cluster集群补丁程序

服务器节点安装完Sun Cluster和Agents软件包后,如不安装Sun Cluster补丁程序就重新启动,可能会有Bug,严重的会导致服务器不断重新启动,所以需在服务器重新启动前安装Sun Cluster补丁程序,需从Sun Cluster DVD光盘或光盘映像文件中展开安装,最后重新启动。

capitek1 # cd /eis/sun/patch/SunCluster/3.2/10

capitek1 # unpack-patches /export/home/patch/sc

capitek1 # ls /export/home/patch/sc/10

125511-02    126014-05    126032-07   126053-01   126071-02     126106-33      139921-02

125514-05    126017-03    126035-05   126056-01   126074-01     127405-03      140017-02

125992-04    126020-04    126041-01   126059-04   126080-03     127408-01      README

125998-01    126023-03    126044-05   126062-06   126083-03     128481-02      install_patches

126008-02    126026-02    126047-11   126065-03   126086-01     128556-03      patch_order

126011-02    126029-01    126050-02   126068-05   126092-03     139908-01

capitek1 # ./installer_patches

 

Patch cluster install script. for Patches for SC 3.2 under Solaris 10

...  

Are you ready to continue with install? [y/n]: y

Determining if sufficient save space exists...

Sufficient save space exists, continuing...

…

For more installation messages refer to the installation logfile:

  /var/sadm/install_data/Patches_for_SC_3.2_under_Solaris_10_log

 

Use '/usr/bin/patchadd -p' to verify installed patch-ids.

Refer to individual patch README files for more patch detail.

Rebooting the system is usually necessary after installation.

 

capitek1 # reboot

 
 

 

 

 

 

 

 

 

 

 


2.创建并配置集群

capitek1 # scinstall

 

  *** Main Menu ***

 

    Please select from one of the following (*) options:

 

      * 1) Create a new cluster or add a cluster node

        2) Configure a cluster to be JumpStarted from this install server

        3) Manage a dual-partition upgrade

        4) Upgrade this cluster node

        5) Print release information for this cluster node

 

      * ?) Help with menu options

      * q) Quit

 

    Option:  1

 
2.1创建集群

 

 

 

 

 

 

在本服务器节点上创建集群

 *** New Cluster and Cluster Node Menu ***

 

    Please select from any one of the following options:

 

        1) Create a new cluster

        2) Create just the first node of a new cluster on this machine

        3) Add this machine as a node in an existing cluster

 

        ?) Help with menu options

        q) Return to the Main Menu

 

    Option:  2

*** Establish Just the First Node of a New Cluster ***

 

    This option is used to establish a new cluster using this machine as

    the first node in that cluster.

 

    Before you select this option, the Sun Cluster framework software must

    already be installed. Use the Java Enterprise System (JES) installer

    to install Sun Cluster software.

 

    Press Control-d at any time to return to the Main Menu.

 

    Do you want to continue (yes/no) [yes]? 

 
 

 

 

 

 

 

 

 


选择典型集群配置

  >>> Typical or Custom Mode <<<

 

    This tool supports two modes of operation, Typical mode and Custom.

    For most clusters, you can use Typical mode. However, you might need

    to select the Custom mode option if not all of the Typical defaults

    can be applied to your cluster.

 

    For more information about the differences between Typical and Custom

    modes, select the Help option from the menu.

 

    Please select from one of the following options:

 

        1) Typical

        2) Custom

 

        ?) Help

        q) Return to the Main Menu

 

    Option [1]:  2

 
 

 

 

 

 

 

 


为集群建立名称

  >>> Cluster Name <<<

 

    Each cluster has a name assigned to it. The name can be made up of any

    characters other than whitespace. Each cluster name should be unique

    within the namespace of your enterprise.

 

    What is the name of the cluster you want to establish?  capitek

 
 

 

 

 


配置检查

  >>> Check <<<

 

    This step allows you to run cluster check to verify that certain basic

    hardware and software pre-configuration requirements have been met. If

    cluster check detects potential problems with configuring this machine

    as a cluster node, a report of violated checks is prepared and

    available for display on the screen.

 

    Do you want to run cluster check (yes/no) [yes]? 

  ...

  Reports in: /var/cluster/logs/install/cluster_check/

  cleaning up...

Press Enter to continue: 

 
 

 

 

 

 


依次输入集群服务器节点名称

  >>> Cluster Nodes <<<

 

    This Sun Cluster release supports a total of up to 16 nodes.

 

    Please list the names of the other nodes planned for the initial

    cluster configuration. List one node name per line. When finished,

    type Control-D:

 

    Node name (Control-D to finish):  capitek1

    Node name (Control-D to finish):  capitek2

    Node name (Control-D to finish):  ^D

 

This is the complete list of nodes:

 

    capitek1

    capitek2

 

    Is it correct (yes/no) [yes]? 

 
 

 

 

 

 

 

 


选择是否加密

 >>> Authenticating Requests to Add Nodes <<<

 

    Once the first node establishes itself as a single node cluster, other

    nodes attempting to add themselves to the cluster configuration must

    be found on the list of nodes you just provided. You can modify this

    list by using claccess(1CL) or other tools once the cluster has been

    established.

 

    By default, nodes are not securely authenticated as they attempt to

    add themselves to the cluster configuration. This is generally

    considered adequate, since nodes which are not physically connected to

    the private cluster interconnect will never be able to actually join

    the cluster. However, DES authentication is available. If DES

    authentication is selected, you must configure all necessary

    encryption keys before any node will be allowed to join the cluster

    (see keyserv(1M), publickey(4)).

 

    Do you need to use DES authentication (yes/no) [no]? 

 
 

 

 

 

 

 

 

 

 

 


选择心跳线配置是否使用了网络交换机

 >>> Minimum Number of Private Networks <<<

 

    Each cluster is typically configured with at least two private

    networks. Configuring a cluster with just one private interconnect

    provides less availability and will require the cluster to spend more

    time in automatic recovery if that private interconnect fails.

 

    Should this cluster use at least two private networks (yes/no) [yes]? 

...

 

>>> Point-to-Point Cables <<<

 

    The two nodes of a two-node cluster may use a directly-connected

    interconnect. That is, no cluster switches are configured. However,

    when there are greater than two nodes, this interactive form. of

    scinstall assumes that there will be exactly one switch for each

    private network.

 

    Does this two-node cluster use switches (yes/no) [yes]?  no

 
 

 

 

 

 

 

 


指定心跳线使用的网口

 >>> Cluster Transport Adapters and Cables <<<

 

    You must configure the cluster transport adapters for each node in the

    cluster. These are the adapters which attach to the private cluster

    interconnect.

 

    Select the first cluster transport adapter:

 

        1) e1000g1

        2) e1000g2

        3) e1000g3

        4) Other

 

    Option:  2

 

    Adapter "e1000g2" is an Ethernet adapter.

 

    Searching for any unexpected network traffic on "e1000g2" ... done

Unexpected network traffic was seen on "e1000g2".

"e1000g2" may be cabled to a public network.

 

     Do you want to use "e1000g2" anyway (yes/no) [no]?  yes

 
 

 

 

 

 

 

 

 

 

 


添加其它心跳线网口

  Select the second cluster transport adapter:

 

        1) e1000g1

        2) e1000g2

        3) e1000g3

        4) Other

 

    Option:  3

 

    Adapter "e1000g3" is an Ethernet adapter.

 

    Searching for any unexpected network traffic on "e1000g3" ... done

    Verification completed. No traffic was detected over a 10 second

    sample period.

 
 

 

 

 

 


接受心跳线网络地址自动配置

 >>> Network Address for the Cluster Transport <<<

 

    The cluster transport uses a default network address of 172.16.0.0. If

    this IP address is already in use elsewhere within your enterprise,

    specify another address from the range of recommended private

    addresses (see RFC 1918 for details).

 

    The default netmask is 255.255.240.0. You can select another netmask,

    as long as it minimally masks all bits that are given in the network

    address.

 

    The default private netmask and network address result in an IP

    address range that supports a cluster with a maximum of 64 nodes, 10

    private networks and 0 virtual clusters.

 

    Is it okay to accept the default network address (yes/no) [yes]? 

 

    Is it okay to accept the default netmask (yes/no) [yes]? 

 

    Plumbing network address 172.16.0.0 on adapter e1000g2 >> NOT DUPLICATE ... done

    Plumbing network address 172.16.0.0 on adapter e1000g3 >> NOT DUPLICATE ... done

 
 

 

 

 

 

 

 

 

 

 

 

 


指定全局设备在服务器本地的挂载文件系统

  Se>>> Global Devices File System <<<

 

    Each node in the cluster must have a local file system mounted on

    /global/.devices/node@ before it can successfully participate

    as a cluster member. Since the "nodeID" is not assigned until

    scinstall is run, scinstall will set this up for you.

 

    You must supply the name of either an already-mounted file system or a

    raw disk partition which scinstall can use to create the global

    devices file system. This file system or partition should be at least

    512 MB in size.

 

    Alternatively, you can use a loopback file (lofi), with a new file

    system, and mount it on /global/.devices/node@.

 

    If an already-mounted file system is used, the file system must be

    empty. If a raw disk partition is used, a new file system will be

    created for you.

 

    If the lofi method is used, scinstall creates a new 100 MB file system

    from a lofi device by using the file /.globaldevices. The lofi method

    is typically preferred, since it does not require the allocation of a

    dedicated disk slice.

 

    The default is to use /globaldevices.

 

    Is it okay to use this default (yes/no) [yes]? 

 
 

 

 

 

 

 

 

 

 


启动Global Fencing功能

   >>> Set Global Fencing <<<

 

    Fencing is a mechanism that a cluster uses to protect data integrity

    when the cluster interconnect between nodes is lost. By default,

    fencing is turned on for global fencing, and each disk uses the global

    fencing setting. This screen allows you to turn off the global

    fencing.

 

    Most of the time, leave fencing turned on. However, turn off fencing

    when at least one of the following conditions is true: 1) Your shared

    storage devices, such as Serial Advanced Technology Attachment (SATA)

    disks, do not support SCSI; 2) You want to allow systems outside your

    cluster to access storage devices attached to your cluster; 3) Sun

    Microsystems has not qualified the SCSI persistent group reservation

    (PGR) support for your shared storage devices.

 

    If you choose to turn off global fencing now, after your cluster

    starts you can still use the cluster(1CL) command to turn on global

    fencing.

 

    Do you want to turn off global fencing (yes/no) [no]? 

 
 

 

 

 

 

 

 

 


选择不自动指定Quorum设备

   >>> Quorum Configuration <<<

 

    Every two-node cluster requires at least one quorum device. By

    default, scinstall selects and configures a shared disk quorum device

    for you.

 

    This screen allows you to disable the automatic selection and

    configuration of a quorum device.

 

    You have chosen to turn on the global fencing. If your shared storage

    devices do not support SCSI, such as Serial Advanced Technology

    Attachment (SATA) disks, or if your shared disks do not support

    SCSI-2, you must disable this feature.

 

    If you disable automatic quorum device selection now, or if you intend

    to use a quorum device that is not a shared disk, you must instead use

    clsetup(1M) to manually configure quorum once both nodes have joined

    the cluster for the first time.

 

    Do you want to disable automatic quorum device selection (yes/no) [no]?

 yes

 
 

 

 

 

 

 

 


选择是否服务器配置后自动重新启动

  >>> Automatic Reboot <<<

 

    Once scinstall has successfully initialized the Sun Cluster software

    for this machine, the machine must be rebooted. After the reboot, this

    machine will be established as the first node in the new cluster.

 

    Do you want scinstall to reboot for you (yes/no) [yes]?  no

 

    You will need to manually reboot this node in "cluster mode" after

    scinstall successfully completes.

 

   

Press Enter to continue: 

 
 

 

 

 

 

 

 

 

 

 


完成配置后推出

  >>> Confirmation <<<

 

    Your responses indicate the following options to scinstall:

 

     scinstall -i \

        -C capitek \

        -F \

        -T node=capitek1,node=capitek2,authtype=sys \

        -w netaddr=172.16.0.0,netmask=255.255.240.0,maxnodes=64,maxprivatenets=10,numvirtualclusters=12 \

        -A trtype=dlpi,name=e1000g2 -A trtype=dlpi,name=e1000g3 \

        -B type=direct

 

    Are these the options you want to use (yes/no) [yes]? 

 

    Do you want to continue with this configuration step (yes/no) [yes]?

Checking device to use for global devices file system ... done

 

Initializing cluster name to "capitek" ... done

Initializing authentication options ... done

Initializing configuration for adapter "e1000g2" ... done

Initializing configuration for adapter "e1000g3" ... done

Initializing private network address options ... done

...

Ensure that the EEPROM parameter "local-mac-address?" is set to "true"

... done

...

  

Press Enter to continue: 

*** New Cluster and Cluster Node Menu ***

 

    Please select from any one of the following options:

 

        1) Create a new cluster

        2) Create just the first node of a new cluster on this machine

        3) Add this machine as a node in an existing cluster

 

        ?) Help with menu options

        q) Return to the Main Menu

 

    Option:  q

 

**** Main Menu ***

 

    Please select from one of the following (*) options:

 

        1) Create a new cluster or add a cluster node

        2) Configure a cluster to be JumpStarted from this install server

      * 3) Manage a dual-partition upgrade

      * 4) Upgrade this cluster node

      * 5) Print release information for this cluster node

 

      * ?) Help with menu options

      * q) Quit

 

    Option:  q

 

Log file - /var/cluster/logs/install/scinstall.log.1429

 

capitek1 # reboot

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


2.2指定Quorum设备并激活集群

2.2.1检查全局设备

capitek1 # df -h

Filesystem             size   used  avail capacity  Mounted on

/dev/dsk/c0t0d0s0       15G   5.9G   9.3G    39%    /

...

/dev/dsk/c0t0d0s6       42G    18G    24G    43%    /export/home

/dev/did/dsk/d1s4      997M   1.7M   935M     1%    /global/.devices/node@1

 

capitek1 # scdidadm -L

1        capitek1:/dev/rdsk/c0t0d0      /dev/did/rdsk/d1    

2        capitek1:/dev/rdsk/c0t1d0      /dev/did/rdsk/d2    

3        capitek1:/dev/rdsk/c1t0d0      /dev/did/rdsk/d3    

4        capitek1:/dev/rdsk/c4t2d31     /dev/did/rdsk/d4    

5        capitek1:/dev/rdsk/c3t125d31   /dev/did/rdsk/d5    

5        capitek2:/dev/rdsk/c2t1d31     /dev/did/rdsk/d5    

6        capitek1:/dev/rdsk/c5t600A0B80003909D40000087F4AD56D7Fd0 /dev/did/rdsk/d6

6        capitek2:/dev/rdsk/c3t600A0B80003909D40000087F4AD56D7Fd0 /dev/did/rdsk/d6

7        capitek1:/dev/rdsk/c5t600A0B8000391069000008654AD5695Cd0 /dev/did/rdsk/d7

7        capitek2:/dev/rdsk/c3t600A0B8000391069000008654AD5695Cd0 /dev/did/rdsk/d7

8        capitek2:/dev/rdsk/c0t0d0      /dev/did/rdsk/d8    

9        capitek2:/dev/rdsk/c0t1d0      /dev/did/rdsk/d9    

10       capitek2:/dev/rdsk/c1t0d0      /dev/did/rdsk/d10   

 
 

 

 

 

 

 


2.2.2指定Quorum设备并激活集群

Sun Cluster通过指定Quorum法定设备,来避免出现集群心跳线故障而争抢共享磁盘,保证数据完整,拥有Quorum法定设备的服务器占有共享磁盘,所以需Quorum法定设备为在各服务器可访问的共享存储上,即必须为全局设备,并且数量为集群中服务器总数-1。

capitek1 # scsetup

>>> Initial Cluster Setup <<<

 

    This program has detected that the cluster "installmode" attribute is

    still enabled. As such, certain initial cluster setup steps will be

    performed at this time. This includes adding any necessary quorum

    devices, then resetting both the quorum vote counts and the

    "installmode" property.

...

    Is it okay to continue (yes/no) [yes]?  

    Do you want to add any quorum devices (yes/no) [yes]? 

...

    What is the type of device you want to use?

 

        1) Directly attached shared disk

        2) Network Attached Storage (NAS) from Network Appliance

        3) Quorum Server

        q) Return to the quorum menu

 

    Option:  1

 
 

 

 

 

 

 

 


输入制定为Quorum设备的全局设备名

>>> Add a SCSI Quorum Disk <<<

 

    A SCSI quorum device is considered to be any Sun Cluster supported

    attached storage which connected to two or more nodes of the cluster.

    Dual-ported SCSI-2 disks may be used as quorum devices in two-node

    clusters. However, clusters with more than two nodes require that

    SCSI-3 PGR disks be used for all disks with more than two node-to-disk

    paths.

 

    You can use a disk containing user data or one that is a member of a

    device group as a quorum device.

 

    For more information on supported quorum device topologies, see the

    Sun Cluster documentation.

 

    Is it okay to continue (yes/no) [yes]? 

 

    Which global device do you want to use (d)?  d6

 

    Is it okay to proceed with the update (yes/no) [yes]? 

 

scconf -a -q globaldev=d6

 

    Command completed successfully.

 

Press Enter to continue: 

 

    Do you want to add another quorum device (yes/no) [no]? 

...

   

    Once the "installmode" property has been reset, this program will skip

    "Initial Cluster Setup" each time it is run again in the future.

    However, quorum devices can always be added to the cluster using the

    regular menu options. Resetting this property fully activates quorum

    settings and is necessary for the normal and safe operation of the

    cluster.

 

    Is it okay to reset "installmode" (yes/no) [yes]? 

 

 

scconf -c -q reset

scconf -a -T node=.

 

    Cluster initialization is complete.

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


配置完成退出

*** Main Menu ***

 

    Please select from one of the following options:

 

        1) Quorum

        2) Resource groups

        3) Data Services

        4) Cluster interconnect

        5) Device groups and volumes

        6) Private hostnames

        7) New nodes

        8) Other cluster tasks

 

        ?) Help with menu options

        q) Quit

 

    Option:  q

 

capitek1 #

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


2.3验证集群安装状态

capitek1 # scstat -p

------------------------------------------------------------------

 

-- Cluster Nodes --

 

                    Node name           Status

                    ---------           ------

  Cluster node:     capitek1            Online

  Cluster node:     capitek2            Online

 

------------------------------------------------------------------

 

-- Cluster Transport Paths --

 

                    Endpoint               Endpoint               Status

                    --------               --------               ------

  Transport path:   capitek1:e1000g3       capitek2:e1000g3       Path online

  Transport path:   capitek1:e1000g2       capitek2:e1000g2       Path online

 

------------------------------------------------------------------

 

-- Quorum Summary from latest node reconfiguration --

 

  Quorum votes possible:      3

  Quorum votes needed:        2

  Quorum votes present:       3

 

-- Quorum Votes by Node (current status) --

 

                    Node Name           Present Possible Status

                    ---------           ------- -------- ------

  Node votes:       capitek1            1        1       Online

  Node votes:       capitek2            1        1       Online

 

 

-- Quorum Votes by Device (current status) --

 

                    Device Name         Present Possible Status

                    -----------         ------- -------- ------

  Device votes:     /dev/did/rdsk/d6s2  1        1       Online

...

-- IPMP Groups --

 

              Node Name           Group   Status         Adapter   Status

              ---------           -----   ------         -------   ------

  IPMP Group: capitek1            sc_ipmp Online         e1000g0   Online

 

  IPMP Group: capitek2            sc_ipmp Online         e1000g0   Online

...

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


2.4用Solaris Volume Manager创建集群间切换的磁盘组

创建Metaset磁盘组

capitek1 # metaset -s oradata -a -h capitek1 capitek2

capitek1 # metaset -s aaadata -a -h capitek1 capitek2

        

Capitek1 # scdidadm -L

...

6        capitek1:/dev/rdsk/c5t600A0B80003909D40000087F4AD56D7Fd0 /dev/did/rdsk/d6    

6        capitek2:/dev/rdsk/c3t600A0B80003909D40000087F4AD56D7Fd0 /dev/did/rdsk/d6    

7        capitek1:/dev/rdsk/c5t600A0B8000391069000008654AD5695Cd0 /dev/did/rdsk/d7    

7        capitek2:/dev/rdsk/c3t600A0B8000391069000008654AD5695Cd0 /dev/did/rdsk/d7    

...

capitek1 # metaset -s oradata -a /dev/did/rdsk/d6

capitek1 # metaset -s aaadata -a /dev/did/rdsk/d7

 

capitek1 # metaset -s oradata -a -m capitek1 capitek2

capitek1 # metaset -s aaadata -a -m capitek1 capitek2

 
 

 

 

 

 


检查磁盘组状态

capitek1 # scstat -D

 

-- Device Group Servers --

 

                         Device Group        Primary             Secondary

                         ------------        -------             ---------

  Device group servers:  oradata             capitek1            capitek2

  Device group servers:  aaadata             capitek1            capitek2

 

 

-- Device Group Status --

 

                              Device Group        Status              

                              ------------        ------             

  Device group status:        oradata             Online

  Device group status:        aaadata             Online

...

 

 

 

 
 

 

 

 

 

 

 

 

 

 


3.在其它节点上安装和配置集群

3.1  安装集群软件

用Sun Cluster DVD光盘或光盘映像文件安装

capitek2 # cd /export/home/sc32

capitek2 # ls

suncluster-3_2u2-ga.iso

capitek2 # lofiadm -a /export/home/sc32/suncluster-3_2u2-ga.iso

/dev/lofi/1

capitek2 # mount -F hsfs /dev/lofi/1 /mnt

 

capitek2 # cd /mnt

capitek2 # ls

Copyright      License        README         Solaris_sparc  Solaris_x86

capitek2 # cd Solaris_sparc

capitek2 # ls

Product       installer     release_info

capitek2 # ./installer -nodisplay

...

 
 

 

 

 

 


安装Sun Cluster和Agents软件包

Installation Type

-----------------

 

   Do you want to install the full set of Sun Java(TM) Availability Suite

   Products and Services? (Yes/No) [Yes] {"<" goes back, "!" exits} no

 

Choose Software Components - Main Menu

-------------------------------

Note: "*  *" indicates that the selection is disabled

 

[ ] 1. Sun Cluster Geographic Edition 3.2 1/09

[ ] 2. Quorum Server

[ ] 3. Monitoring Console 1.0 Update 1

[ ] 4. High Availability Session Store 4.4.3

[ ] 5. Sun Cluster 3.2 1/09

[ ] 6. Java DB 10.2.2.1

[ ] 7. Sun Cluster Agents 3.2 1/09

[ ] 8. All Shared Components

 

   Enter a comma separated list of products to install,

   or press R to refresh

   the list [] {"<" goes back, "!" exits}: 5,7

 
 

 

 

 

 

 

 

 


选择Sun Cluster HA for Oracle等

Component Selection - Selected Product "Sun Cluster Agents 3.2 1/09"

--------------------------------------------------------------------

 

*[X] 1. Sun Cluster HA for Sun Java System Application Server

...

*[X] 16. Sun Cluster HA for Oracle

...

*[X] 20. Sun Cluster Support for Oracle RAC

...

*[X] 36. Sun Cluster HA for Informix

 

   Enter a comma separated list of components to install

   (or A to install all )

   [A] {"<" goes back, "!" exits} 16,20

...

Screen for selecting Type of Configuration

 

1. Configure Now - Selectively override defaults or express through

 

2. Configure Later - Manually configure following installation

 

 

   Select Type of Configuration [1] {"<" goes back, "!" exits} 2

...

Product: Java Availability Suite

Uninstall Location: /var/sadm/prod/SUNWentsyssc32u2

Space Required: 257.66 MB

---------------------------------------------------

    Java DB

       Java DB Server

       Java DB Client

    Sun Cluster 3.2 1/09

       Sun Cluster Core

       Sun Cluster Manager

    Sun Cluster Agents 3.2 1/09

       Sun Cluster HA for Oracle

       Sun Cluster Support for Oracle RAC

 

1. Install

2. Start Over

3. Exit Installation

 

   What would you like to do [1] {"<" goes back, "!" exits}?

 

Java Availability Suite

|-1%-----------25%--------------50%--------------75%---------100%|

 

Installation Complete

...

 

   Enter 1 to view installation summary and Enter 2 to view installation logs

   [1] {"!" exits} !

In order to notify you of potential updates, we need to confirm an

internet connection.

Do you want to proceed [Y/N] : N

 

capitek2 #

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


3.2  安装集群补丁程序,并重新启动

capitek2 # cd /export/home/10

capitek2 # ls

125511-02    126014-05    126032-07    126053-01    126071-02    126106-33        139921-02

125514-05    126017-03    126035-05    126056-01    126074-01    127405-03        140017-02

125992-04    126020-04    126041-01    126059-04    126080-03    127408-01        README

125998-01    126023-03    126044-05    126062-06    126083-03    128481-02        install_patches

126008-02    126026-02    126047-11    126065-03    126086-01    128556-03        patch_order

126011-02    126029-01    126050-02    126068-05    126092-03    139908-01

 

capitek2 # ./install_patches

 

Patch cluster install script. for Patches for SC 3.2 under Solaris 10

...

Are you ready to continue with install? [y/n]: y

...

 

For more installation messages refer to the installation logfile:

  /var/sadm/install_data/Patches_for_SC_3.2_under_Solaris_10_log

 

Use '/usr/bin/patchadd -p' to verify installed patch-ids.

Refer to individual patch README files for more patch detail.

Rebooting the system is usually necessary after installation.

 

capitek2 # reboot

updating /platform/sun4v/boot_archive

 
 

 

 

 

 

 

 

 


3.2  加入集群

capitek2 # scinstall

 

  *** Main Menu ***

 

    Please select from one of the following (*) options:

 

      * 1) Create a new cluster or add a cluster node

        2) Configure a cluster to be JumpStarted from this install server

        3) Manage a dual-partition upgrade

        4) Upgrade this cluster node

        5) Print release information for this cluster node

 

      * ?) Help with menu options

      * q) Quit

 

    Option:  1

 
 

 

 

 

 

 

 


选择加入集群

*** New Cluster and Cluster Node Menu ***

 

    Please select from any one of the following options:

 

        1) Create a new cluster

        2) Create just the first node of a new cluster on this machine

        3) Add this machine as a node in an existing cluster

 

        ?) Help with menu options

        q) Return to the Main Menu

 

    Option:  3

 

*** Add a Node to an Existing Cluster ***

 

 

    This option is used to add this machine as a node in an already

    established cluster. If this is a new cluster, there may only be a

    single node which has established itself in the new cluster.

 

    Before you select this option, the Sun Cluster framework software must

    already be installed. Use the Java Enterprise System (JES) installer

    to install Sun Cluster software.

 

    Press Control-d at any time to return to the Main Menu.

 

 

    Do you want to continue (yes/no) [yes]? 

 

>>> Typical or Custom Mode <<<

 

    This tool supports two modes of operation, Typical mode and Custom.

    For most clusters, you can use Typical mode. However, you might need

    to select the Custom mode option if not all of the Typical defaults

    can be applied to your cluster.

 

    For more information about the differences between Typical and Custom

    modes, select the Help option from the menu.

 

    Please select from one of the following options:

 

        1) Typical

        2) Custom

 

        ?) Help

        q) Return to the Main Menu

 

    Option [1]:  2

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


指定加入集群的而发起服务器节点和集群名称

>>> Sponsoring Node <<<

 

    For any machine to join a cluster, it must identify a node in that

    cluster willing to "sponsor" its membership in the cluster. When

    configuring a new cluster, this "sponsor" node is typically the first

    node used to build the new cluster. However, if the cluster is already

    established, the "sponsoring" node can be any node in that cluster.

 

    Already established clusters can keep a list of hosts which are able

    to configure themselves as new cluster members. This machine should be

    in the join list of any cluster which it tries to join. If the list

    does not include this machine, you may need to add it by using

    claccess(1CL) or other tools.

 

    And, if the target cluster uses DES to authenticate new machines

    attempting to configure themselves as new cluster members, the

    necessary encryption keys must be configured before any attempt to

    join.

 

    What is the name of the sponsoring node?  Capitek1

 

>>> Cluster Name <<<

 

    Each cluster has a name assigned to it. When adding a node to the

    cluster, you must identify the name of the cluster you are attempting

    to join. A sanity check is performed to verify that the "sponsoring"

    node is a member of that cluster.

 

    What is the name of the cluster you want to join?  capitek

 

    Attempting to contact "capitek1" ... done

 

    Cluster name "capitek" is correct.

   

Press Enter to continue: 

 

>>> Check <<<

 

    This step allows you to run cluster check to verify that certain basic

    hardware and software pre-configuration requirements have been met. If

    cluster check detects potential problems with configuring this machine

    as a cluster node, a report of violated checks is prepared and

    available for display on the screen.

 

    Do you want to run cluster check (yes/no) [yes]? 

 

    Running cluster check ...

 

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


检查集群心跳线和Global Devices全局设备

  >>> Autodiscovery of Cluster Transport <<<

 

    If you are using Ethernet or Infiniband adapters as the cluster

    transport adapters, autodiscovery is the best method for configuring

    the cluster transport.

 

    Do you want to use autodiscovery (yes/no) [yes]? 

 

    Probing ........

 

    The following connections were discovered:

 

    capitek1:e1000g2  -  capitek2:e1000g2

    capitek1:e1000g3  -  capitek2:e1000g3

 

    Is it okay to configure these connections (yes/no) [yes]?

...

>>> Global Devices File System <<<

 

    Each node in the cluster must have a local file system mounted on

    /global/.devices/node@ before it can successfully participate

    as a cluster member. Since the "nodeID" is not assigned until

    scinstall is run, scinstall will set this up for you.

...

The default is to use /globaldevices.

 

    Is it okay to use this default (yes/no) [yes]?

 

>>> Automatic Reboot <<<

 

    Once scinstall has successfully initialized the Sun Cluster software

    for this machine, the machine must be rebooted. The reboot will cause

    this machine to join the cluster for the first time.

 

    Do you want scinstall to reboot for you (yes/no) [yes]?  no

 

    You will need to manually reboot this node in "cluster mode" after

    scinstall successfully completes.

   

Press Enter to continue:

>>> Confirmation <<<

 

    Your responses indicate the following options to scinstall:

 

      scinstall -i \

           -C capitek \

           -N capitek1 \

           -A trtype=dlpi,name=e1000g2 -A trtype=dlpi,name=e1000g3 \

           -B type=direct \

           -m endpoint=:e1000g2,endpoint=capitek1:e1000g2 \

           -m endpoint=:e1000g3,endpoint=capitek1:e1000g3

 

    Are these the options you want to use (yes/no) [yes]? 

 

    Do you want to continue with this configuration step (yes/no) [yes]?

...    

 

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


配置完后退出,并重新启动

  *** New Cluster and Cluster Node Menu ***

 

    Please select from any one of the following options:

 

        1) Create a new cluster

        2) Create just the first node of a new cluster on this machine

        3) Add this machine as a node in an existing cluster

 

        ?) Help with menu options

        q) Return to the Main Menu

 

    Option:  q

 

*** Main Menu ***

 

    Please select from one of the following (*) options:

 

        1) Create a new cluster or add a cluster node

        2) Configure a cluster to be JumpStarted from this install server

      * 3) Manage a dual-partition upgrade

      * 4) Upgrade this cluster node

      * 5) Print release information for this cluster node

 

      * ?) Help with menu options

      * q) Quit

 

    Option:  q

 

 

Log file - /var/cluster/logs/install/scinstall.log.2037

 

capitek2 # reboot

updating /platform/sun4v/boot_archive

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


4.挂载共享磁盘阵列卷组

将共享盘阵的磁盘组挂载上

capitek1 # metainit -s oradata d80 1 1 /dev/did/rdsk/d6s0

capitek1 # newfs /dev/md/oradata/rdsk/d80

capitek1 # metainit -s aaadata d80 1 1 /dev/did/rdsk/d7s0

capitek1 # newfs /dev/md/aaadata/rdsk/d80

 

capitek1 # vi /etc/vfstab

...

/dev/md/oradata/dsk/d80 /dev/md/oradata/rdsk/d80     /global/oradata ufs     2   no   global,logging

/dev/md/aaadata/dsk/d80 /dev/md/aaadata/rdsk/d80     /global/aaadata ufs     2   no   global,logging 

...

capitek1 # mkdir oradata

capitek1 # mkdir aaadata

capitek1 # mount /global/oradata

capitek1 # mount /global/aaadata

capitek1 # df -h

Filesystem             size   used  avail capacity  Mounted on

/dev/dsk/c0t0d0s0       15G   5.9G   9.3G    39%    /

...

/dev/md/oradata/dsk/d80

                        63G    64M    62G     1%    /global/oradata

/dev/md/aaadata/dsk/d80

                        63G    64M    62G     1%    /global/aaadata

 

capitek1 # chown -R oracle:dba /global/oradata

 

capitek1 # scswitch -z -D oradata -h capitek2

capitek1 # scswitch -z -D aaadata -h capitek2

 

capitek2 # vi /etc/vfstab

...

swap    -       /tmp    tmpfs   -       yes     -

/dev/did/dsk/d8s4 /dev/did/rdsk/d8s4 /global/.devices/node@2 ufs 2 no global

/dev/md/oradata/dsk/d80 /dev/md/oradata/rdsk/d80     /global/oradata ufs     2   no   global,logging

/dev/md/aaadata/dsk/d80 /dev/md/aaadata/rdsk/d80     /global/aaadata ufs     2   no   global,logging

...

capitek2 # mount /global/oradata

capitek2 # mount /global/aaadata

capitek2 # df -h

Filesystem             size   used  avail capacity  Mounted on

/dev/dsk/c0t0d0s0       15G   5.9G   9.3G    39%    /

/devices                 0K     0K     0K     0%    /devices

...

/dev/md/oradata/dsk/d80

                        63G    64M    62G     1%    /global/oradata

/dev/md/aaadata/dsk/d80

                        63G    64M    62G     1%    /global/aaadata

 

capitek2 # chown -R oracle:dba /global/oradata

 

 

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


检查磁盘组在集群中的状态

capitek2 # scstat -D

 

-- Device Group Servers --

 

                         Device Group        Primary             Secondary

                         ------------        -------             ---------

  Device group servers:  oradata             capitek2            capitek1

  Device group servers:  aaadata             capitek2            capitek1

 

 

-- Device Group Status --

 

                              Device Group        Status             

                              ------------        ------             

  Device group status:        oradata             Online

  Device group status:        aaadata             Online

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


5.安装Oracle/AAA应用程序

5.1解压Oracle软件,并检查所有服务器节点的应用环境

5.1.1检查服务器节点

capitek1 # su - oracle

Sun Microsystems Inc.   SunOS 5.10      Generic January 2005

$ cd cd /export/home/oracle/ora10g/product/10.2.0/db_1/network/admin/

$ ls

listener.ora         samples       sqlnet.log           tnsnames.ora.091021

listener.ora.091021  shrept.lst    tnsnames.ora

 

$ vi listener.ora

...

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (GLOBAL_DBNAME = ora10g)

      (ORACLE_HOME = /export/home/oracle/ora10g/product/10.2.0/db_1)

      (SID_NAME = ora10g)

    )

  )

 

LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.31.72)(PORT = 1521))

      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))

    )

  )

 

$ more tnsnames.ora

...

ORA10G =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.31.72)(PORT = 1521))

    )

    (CONNECT_DATA =

      (SERVICE_NAME = ora10g)

    )

  )

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 


5.1.2检查其它服务器节点

capitek2 # su - oracle

Sun Microsystems Inc.   SunOS 5.10      Generic January 2005

$ cd cd /export/home/oracle/ora10g/product/10.2.0/db_1/network/admin/

$ ls

listener.ora         samples       sqlnet.log           tnsnames.ora.091021

listener.ora.091021  shrept.lst    tnsnames.ora

 

$ vi listener.ora

...

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (GLOBAL_DBNAME = ora10g)

      (ORACLE_HOME = /export/home/oracle/ora10g/product/10.2.0/db_1)

      (SID_NAME = ora10g)

    )

  )

 

LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.31.73)(PORT = 1521))

      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))

    )

  )

 

$ more tnsnames.ora

...

ORA10G =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.31.73)(PORT = 1521))

    )

    (CONNECT_DATA =

      (SERVICE_NAME = ora10g)

    )

  )

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


5.1.3检查所有服务器节点环境设置

$ env

CLASSPATH=/usr/local/soliddb-6.3/jdbc/SolidDriver2.0.jar:/solid_cdc/access_server/jre32:/solid_cdc/access_server/jre64

HOME=/export/home/oracle

HZ=100

LD_LIBRARY_PATH=/export/home/oracle/ora10g/product/10.2.0/db_1/lib:

/export/home/oracle/ora10g/product/10.2.0/db_1/network/lib:/lib64:/usr/local/lib

LOGNAME=oracle

MAIL=/var/mail/oracle

NLS_LANG=AMERICAN_AMERICA.ZHS16GBK

ORACLE_BASE=/export/home/oracle/ora10g

ORACLE_HOME=/export/home/oracle/ora10g/product/10.2.0/db_1

ORACLE_SID=ora10g

PATH=/export/home/oracle/ora10g/product/10.2.0/db_1/bin:/bin:/sbin:/usr/ccs/bin:/usr/local/bin:/usr/local/radius/bin:/usr/sbin

SHELL=/bin/sh

TEMP=/export/home/tmp

TERM=vt100

TMPDIR=/export/home/tmp

TZ=PRC

 
 

 

 

 

 


5.1.4检查所有服务器节点Oracle数据库能否正常运行

$ sqlplus "/ as sysdba"

 

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Oct 21 09:51:50 2009

 

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

 

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production

With the Partitioning, OLAP and Data Mining options

 

SQL> startup

ORACLE instance started.

 

Total System Global Area 6375342080 bytes

Fixed Size                  1988128 bytes

Variable Size            1090521568 bytes

Database Buffers         5268045824 bytes

Redo Buffers               14786560 bytes

Database mounted.

Database opened.

 

SQL> exit

Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production

With the Partitioning, OLAP and Data Mining options

 
 

 

 

 

 

 

 

 

 

 

 

 


5.1.5检查所有服务器节点Oracle Lisener能否正常运行

$ lsnrctl status

 

LSNRCTL for Solaris: Version 10.2.0.1.0 - Production on 21-OCT-2009 09:55:33

 

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

 

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.31.73)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for Solaris: Version 10.2.0.1.0 - Production

Start Date                21-OCT-2009 09:27:43

Uptime                    0 days 0 hr. 27 min. 50 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /export/home/oracle/ora10g/product/10.2.0/db_1/network/admin/listener.ora

Listener Log File         /export/home/oracle/ora10g/product/10.2.0/db_1/network/log/listener.log

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.31.73)(PORT=1521)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))

Services Summary...

Service "ora10g" has 2 instance(s).

  Instance "ora10g", status UNKNOWN, has 1 handler(s) for this service...

  Instance "ora10g", status READY, has 2 handler(s) for this service...

Service "ora10g_XPT" has 1 instance(s).

  Instance "ora10g", status READY, has 2 handler(s) for this service...

The command completed successfully

 
 

 

 

 

 

 

 


5.1.6停下所有服务器节点Oracle应用,并按Sun Cluster要求修改配置(浮动IP)

修改服务器节点

capitek1 # su - oracle

Sun Microsystems Inc.   SunOS 5.10      Generic January 2005

$ cd /export/home/oracle/ora10g/product/10.2.0/db_1/network/admin/

$ ls

listener.ora         samples    sqlnet.log        tnsnames.ora.091021

listener.ora.091021  shrept.lst    tnsnames.ora

 

$ vi listener.ora

....

 

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (GLOBAL_DBNAME = ora10g)

      (ORACLE_HOME = /export/home/oracle/ora10g/product/10.2.0/db_1)

      (SID_NAME = ora10g)

    )

  )

 

LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.31.74)(PORT = 1521))

      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))

    )

  )

 
 

 

 

 

 

 

 

 

 


修改其它服务器节点

capitek2 # su - oracle

Sun Microsystems Inc.   SunOS 5.10      Generic January 2005

$ cd /export/home/oracle/ora10g/product/10.2.0/db_1/network/admin/

$ ls

listener.ora         samples      sqlnet.log           tnsnames.ora.091021

listener.ora.091021  shrept.lst   tnsnames.ora

 

$ vi listener.ora

...

 

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (GLOBAL_DBNAME = ora10g)

      (ORACLE_HOME = /export/home/oracle/ora10g/product/10.2.0/db_1)

      (SID_NAME = ora10g)

    )

  )

 

LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.31.74)(PORT = 1521))

      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))

    )

  )

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


5.2解压AAA软件,并检查所有服务器节点的应用环境

5.2.1解压AAA软件,并观察启动/停止脚本

capitek2 # cd /aaa_data

capitek2 # ls

log  omc   omc.091021.tar  raddb   stat_stat   statfilepro     yzacct

 

capitek2 # cd /global

capitek2 # ls

aaadata  oradata

capitek2 # cd aaadata

capitek2 # ls

aaa.tar  log  lost+found   omc    raddb  stat_stat statfilepro  yzacct

 

capitek2 # mkdir /usr/local

capitek2 # cd /usr/local

capitek2 # ls

bin         etc         info        libexec     radius      sbin        ssl

doc         include     lib         man         radius.tar  share       var

capitek2 # tar xvf radius.tar

x radius, 0 bytes, 0 tape blocks

...

capitek2 # ls

bin         etc         info        libexec     radius      sbin        ssl

doc         include     lib         man         radius.tar  share       var

 

capitek2 # cd radius

capitek2 # ls

bin    check    etc       log        run        versions.txt

capitek2 # cd bin

capitek2 # ls

acct_test      backfile       debug          radiusd        radtester      startbackup    stat.se

auth_test      backstat       radclient      radiusd-ocs    restartradius  startdaemon    stopdaemon

backacct       backupfees     raddaemon      radiusd.debug  snmpreset      startradius    stopradius

 

capitek2 # more startdaemon

#!/bin/sh

RADIUS_HOME=/usr/local/radius

...

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


5.2.2创建新的启动/停止/监控脚本,直接引用AAA启动/停止/监控脚本,利用于Sun Cluster Agent Builder创建新的Sun Cluster Agent,并在创建Sun Cluster服务时加入集群中

capitek2 # mkdir /usr/local/script                     

 

capitek2 # ls

radiusstart.ksh  radiusstop.ksh   radiustatus.ksh

 

capitek2 # ./radiusstart.ksh

raddaemo is starting.

capitek2 # ./radiusstop.ksh

Using CATALINA_BASE:   /global/aaadata/omc

...

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


6.为Sun Cluster创建Oracle/AAA服务

6.1在任意服务器节点上创建Oracle资源组

选择Resource Group服务资源组

capitek1 # scsetup

 

  *** Main Menu ***

 

    Please select from one of the following options:

 

        1) Quorum

        2) Resource groups

        3) Data Services

        4) Cluster interconnect

        5) Device groups and volumes

        6) Private hostnames

        7) New nodes

        8) Other cluster tasks

 

        ?) Help with menu options

        q) Quit

 

    Option:  2

 
 

 

 

 

 

 


创建Resource Group服务资源组

*** Resource Group Menu ***

 

    Please select from one of the following options:

 

        1) Create a resource group

        2) Add a network resource to a resource group

        3) Add a data service resource to a resource group

        4) Resource type registration

        5) Online/Offline or Switchover a resource group

        6) Suspend/Resume recovery for a resource group

        7) Enable/Disable a resource

        8) Change properties of a resource group

        9) Change properties of a resource

       10) Remove a resource from a resource group

       11) Remove a resource group

       12) Clear the stop_failed error flag from a resource

 

        ?) Help

        s) Show current status

        q) Return to the main menu

 

    Option:  1

 
 

 

 

 

 

 

 


选择资源组的类型(故障切换)

>>> Create a Resource Group <<<

 

    Use this option to create a new resource group. You can also use this

    option to create new resources for the new group.

 

    A resource group is a container into which you can place resources of

    various types, such as network and data service resources. The cluster

    uses resource groups to manage its resource types. There are two types

    of resource groups, failover and scalable.

 

    Only failover resource groups may contain network resources. A network

    resource is either a LogicalHostname or SharedAddress resource.

 

    It is important to remember that each scalable resource group depends

    upon a failover resource group which contains one or more

    SharedAddress network resources.

 

    Is it okay to continue (yes/no) [yes]? 

 

    Select the type of resource group you want to add:

 

        1) Failover Group

        2) Scalable Group

 

    Option:  1

 
 

 

 

 

 

 

 

 


配置资源组名称,并指定启动时所在的服务器节点

What is the name of the group you want to add?  oracle-rg

 

    Do you want to add an optional description (yes/no) [yes]?  no

 

    Because this cluster has two nodes, the new resource group will be

    configured to be hosted by both cluster nodes.

 

    At this time, you may select one node to be the preferred node for

    hosting this group. Or, you may allow the system to select a preferred

    node on an arbitrary basis.

 

    Do you want to specify a preferred node (yes/no) [yes]? 

 

    Select the preferred node or zone for hosting this group:

 

        1) capitek1

        2) capitek2

 

    Option:  1

 
 

 

 

 

 

 

 

 

 


完成资源组配置

Some types of resources (for example, HA for NFS) require the use of

    an area in a global file system for storing configuration data. If any

    of the resources that will be added to this group require such

    support, you can specify the full directory path name now.

 

    Do you want to specify such a directory now (yes/no) [no]? 

 

    Is it okay to proceed with the update (yes/no) [yes]? 

 

scrgadm -a -g oracle-rg -h capitek1,capitek2

 

    Command completed successfully.

 

   

Press Enter to continue: 

 

    Do you want to add any network resources now (yes/no) [yes]?  no

 

    Do you want to add any data service resources now (yes/no) [yes]?  no

 

    Do you want to bring this resource group online now (yes/no) [yes]? 

 

scswitch -Z -g oracle-rg

 

    Command completed successfully.

 
 

 

 

 

 

 

 


选择往资源组里添加服务资源(共享盘)

*** Resource Group Menu ***

 

    Please select from one of the following options:

 

        1) Create a resource group

        2) Add a network resource to a resource group

        3) Add a data service resource to a resource group

        4) Resource type registration

        5) Online/Offline or Switchover a resource group

        6) Suspend/Resume recovery for a resource group

        7) Enable/Disable a resource

        8) Change properties of a resource group

        9) Change properties of a resource

       10) Remove a resource from a resource group

       11) Remove a resource group

       12) Clear the stop_failed error flag from a resource

 

        ?) Help

        s) Show current status

        q) Return to the main menu

 

    Option:  3

 
 

 

 

 

 

 

 

 

 

 


指定服务资源类型为存储类型

>>> Add a Data Service Resource to a Resource Group <<<

 

    This option allows you to add a data service resource to a resource

    group. If the resource type for the data service is not yet registered

    with the cluster, you will have the opportunity to register that type.

 

    Is it okay to continue (yes/no) [yes]? 

 

 

    Select the type of resource you want to add:

 

           Res Name             Description                               

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

 

        1) SUNW.Event           HA Event server for Sun Cluster

        2) SUNW.HAStoragePlus:8 HA Storage Plus

...

     10) SUNW.gds:6           Generic Data Service for Sun Cluster

 

        n) Next >

 

    Option:  2

 
 

 

 

 

 

 

 


指定服务资源的名称

The type of resource you selected is not yet registered. Each resource

    type must be registered with the cluster before any resources of the

    selected type can be added to a resource group.

 

    Registration of a resource type updates the cluster-wide configuration

    with the resource type properties found in default rt_reg files (see

    rt_reg(4)) on this node. It is important that the same resource type

    or data service software has been installed on each node in the

    cluster prior to registration.

 

    Is the software for this service installed on each node (yes/no) [yes]? 

 

    Is it okay to register this resource type now (yes/no) [yes]? 

 

scrgadm -a -t SUNW.HAStoragePlus:8

 

    Command completed successfully.

 

   

Press Enter to continue: 

 

    What is the name of the resource you want to add?  oradata-mount-res

 
 

 

 

 

 

 

 

 

 

 


指定服务资源的加入的资源组和属性(共享存储)

Select the resource group you want to use for "oradata-mount-res":

 

           Group Name           Type       Description                  

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

 

        1) oracle-rg            Failover

 

    Option:  1

...

Please check the man page for your data service to learn more about

    extension properties associated with the resource that you are adding.

 

    Any extension properties you would like to set (yes/no) [yes]? 

 

    Select a property you would like to set:

 

           Property Name                  Default Setting    Desired Setting

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

 

        1) GlobalDevicePaths             

        2) FilesystemMountPoints         

        3) AffinityOn                     True

...

        q) Done

 

    Option:  2

 
 

 

 

 

 

 

 

 

 


完成服务资源的加入

Are you done setting properties (yes/no) [yes]? 

 

    Here is the list of extension properties you want to set: 

 

    FilesystemMountPoints=/global/oradata

 

    Is it correct (yes/no) [yes]? 

    Is it okay to proceed with the update (yes/no) [yes]? 

 

scrgadm -a -j oradata-mount-res -g oracle-rg -t SUNW.HAStoragePlus:8 -x FilesystemMountPoints=/global/oradata

scrgadm -c -j oradata-mount-res -y R_description="Failover data service resource for SUNW.HAStoragePlus:8"

 

    Commands completed successfully.

 

Press Enter to continue: 

 

    Do you want to enable "oradata-mount-res" on all nodes (yes/no) [yes]? 

    Do you want to enable this resource (yes/no) [yes]? 

 

scswitch -e -j oradata-mount-res

scswitch -e -M -j oradata-mount-res

 

    Commands completed successfully.

 
 

 

 

 

 

 

 

 


*** Resource Group Menu ***

 

    Please select from one of the following options:

 

        1) Create a resource group

        2) Add a network resource to a resource group

        3) Add a data service resource to a resource group

        4) Resource type registration

        5) Online/Offline or Switchover a resource group

        6) Suspend/Resume recovery for a resource group

        7) Enable/Disable a resource

       ...

 

        ?) Help

        s) Show current status

        q) Return to the main menu

 

    Option:  2

 

>>> Add a Network Resource to a Resource Group <<<

 

    Use this option to add a network resource to a resource group.

 

    There are two types of network resources, LogicalHostname and

    SharedAddress. Only failover resource groups may contain network

    resources. A failover resource group typically contains one or more

    network resource type resources. Usually, there is at least one

    network resource for each subnet.

 

    Is it okay to continue (yes/no) [yes]? 

 

    Select the type of network resource you want to add:

 

        1) LogicalHostname

        2) SharedAddress

 

    Option:  1

...

be actively available on each of the nodes.

 

    What logical hostname do you want to add? 

     What logical hostname do you want to add?  oradata

 

    Select the resource group you want to use for "oradata":

 

           Group Name           Type       Description                  

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

 

        1) aaa-rg               Failover

        2) oracle-rg            Failover

 

    Option:  2

 

    Is it okay to proceed with the update (yes/no) [yes]? 

 

scrgadm -a -L -g oracle-rg -l oradata

scrgadm -c -j oradata -y R_description="LogicalHostname resource for oradata"

 

    Commands completed successfully.

 
加入服务资源(逻辑主机/浮动IP)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6.2在任意服务器节点上创建AAA资源组

创建Resource Group服务资源组

*** Resource Group Menu ***

 

    Please select from one of the following options:

 

        1) Create a resource group

        2) Add a network resource to a resource group

        3) Add a data service resource to a resource group

        4) Resource type registration

        5) Online/Offline or Switchover a resource group

        6) Suspend/Resume recovery for a resource group

        7) Enable/Disable a resource

        8) Change properties of a resource group

        9) Change properties of a resource

       10) Remove a resource from a resource group

       11) Remove a resource group

       12) Clear the stop_failed error flag from a resource

 

        ?) Help

        s) Show current status

        q) Return to the main menu

 

    Option:  1

 
 

 

 

 

 

 

 


选择资源组的类型(故障切换)

>>> Create a Resource Group <<<

 

    Use this option to create a new resource group. You can also use this

    option to create new resources for the new group.

 

    ...

 

    Only failover resource groups may contain network resources. A network

    resource is either a LogicalHostname or SharedAddress resource.

 

    It is important to remember that each scalable resource group depends

    upon a failover resource group which contains one or more

    SharedAddress network resources.

 

    Is it okay to continue (yes/no) [yes]? 

 

    Select the type of resource group you want to add:

 

        1) Failover Group

        2) Scalable Group

 

    Option:  1

 

    What is the name of the group you want to add?  aaa-rg

 
 

 

 

 

 

 

 

 


完成资源组配置

Some types of resources (for example, HA for NFS) require the use of

    an area in a global file system for storing configuration data. If any

    of the resources that will be added to this group require such

    support, you can specify the full directory path name now.

 

    Do you want to specify such a directory now (yes/no) [no]? 

 

    Is it okay to proceed with the update (yes/no) [yes]?  no

 

scrgadm -a -g aaa-rg -h capitek2,capitek1

 

    Command completed successfully.

 
 

 

 

 

 


选择往资源组里添加服务资源(逻辑主机/浮动IP)

Press Enter to continue: 

 

    Do you want to add any network resources now (yes/no) [yes]? 

 

    Select the type of network resource you want to add:

 

        1) LogicalHostname

        2) SharedAddress

 

    Option:  1

...

 If a failover resource group contains LogicalHostname resources, the

    most common configuration is to have one LogicalHostname resource for

    each subnet.

 

    How many LogicalHostname resources would you like to create [1]? 

...

What logical hostname do you want to add?  aaadata

 

Is it okay to proceed with the update (yes/no) [yes]? 

 

scrgadm -a -L -g aaa-rg -l aaadata

scrgadm -c -j aaadata -y R_description="LogicalHostname resource for aaadata"

 

    Commands completed successfully.

 

Press Enter to continue: 

 

    Do you want to add any additional network resources (yes/no) [no]?  no

 

    Do you want to add any data service resources now (yes/no) [yes]?  no

 

    Do you want to bring this resource group online now (yes/no) [yes]? 

 

scswitch -Z -g aaa-rg

 

    Command completed successfully.

 
 

 

 

 

 

 

 

 

 

 

 

 


选择再往资源组里添加服务资源(共享盘)

*** Resource Group Menu ***

 

    Please select from one of the following options:

 

        1) Create a resource group

        2) Add a network resource to a resource group

        3) Add a data service resource to a resource group

        4) Resource type registration

        5) Online/Offline or Switchover a resource group

        6) Suspend/Resume recovery for a resource group

        7) Enable/Disable a resource

        8) Change properties of a resource group

        9) Change properties of a resource

       10) Remove a resource from a resource group

       11) Remove a resource group

       12) Clear the stop_failed error flag from a resource

 

        ?) Help

        s) Show current status

        q) Return to the main menu

 

    Option:  3

 
 

 

 

 

 

 

 


指定服务资源类型为存储类型,和名称

>>> Add a Data Service Resource to a Resource Group <<<

 

    This option allows you to add a data service resource to a resource

    group. If the resource type for the data service is not yet registered

    with the cluster, you will have the opportunity to register that type.

 

    Is it okay to continue (yes/no) [yes]? 

 

 

    Select the type of resource you want to add:

 

           Res Name             Description                               

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

 

        1) SUNW.Event           HA Event server for Sun Cluster

        2) SUNW.HAStoragePlus:8 HA Storage Plus

...

      10) SUNW.gds:6           Generic Data Service for Sun Cluster

 

        n) Next >

 

    Option:  2

 

    What is the name of the resource you want to add?  aaadata-mount-res

 
 

 

 

 

 

 

 

 

 

 


指定服务资源的加入的资源组和属性(共享存储)

Select the resource group you want to use for "aaadata-mount-res":

 

           Group Name           Type       Description                  

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

 

        1) aaa-rg               Failover

        2) oracle-rg            Failover

 

    Option:  1

...

Any extension properties you would like to set (yes/no) [yes]? 

 

    Select a property you would like to set:

 

           Property Name                  Default Setting    Desired Setting

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

 

        1) GlobalDevicePaths             

        2) FilesystemMountPoints         

 

        q) Done

 

    Option:  2

 
 

 

 

 

 

 

 


指定服务资源的对应的共享存储

   Property name:         FilesystemMountPoints

        Property description:  The list of file system mountpoints

        Property type:         stringarray

        Property per-node:     FALSE

        Property value:        /global/aaadata

 

Select a property you would like to set:

 

           Property Name                  Default Setting    Desired Setting

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

 

        1) GlobalDevicePaths             

        2) FilesystemMountPoints                       /global/aaadata

        3) AffinityOn                     True

        4) FilesystemCheckCommand        

        5) Zpools                        

        6) ZpoolsSearchDir                

 

        q) Done

 

    Option:  q

 

 
 

 

 

 

 

 

 

 

 

 


完成共享盘资源服务的加入

   Are you done setting properties (yes/no) [yes]? 

 

 

    Here is the list of extension properties you want to set: 

 

      FilesystemMountPoints=/global/aaadata

 

    Is it correct (yes/no) [yes]? 

 

    Is it okay to proceed with the update (yes/no) [yes]? 

 

scrgadm -a -j aaadata-mount-res -g aaa-rg -t SUNW.HAStoragePlus:8 -x FilesystemMountPoints=/global/aaadata

scrgadm -c -j aaadata-mount-res -y R_description="Failover data service resource for SUNW.HAStoragePlus:8"

 

    Commands completed successfully.

Press Enter to continue: 

 

    Do you want to enable "aaadata-mount-res" on all nodes (yes/no) [yes]? 

 

    Do you want to enable this resource (yes/no) [yes]? 

 

scswitch -e -j aaadata-mount-res

scswitch -e -M -j aaadata-mount-res

...

 

    Commands completed successfully.

 

*** Resource Group Menu ***

 

    Please select from one of the following options:

 

        1) Create a resource group

        2) Add a network resource to a resource group

        3) Add a data service resource to a resource group

        4) Resource type registration

        5) Online/Offline or Switchover a resource group

        6) Suspend/Resume recovery for a resource group

        7) Enable/Disable a resource

        8) Change properties of a resource group

        9) Change properties of a resource

       10) Remove a resource from a resource group

       11) Remove a resource group

       12) Clear the stop_failed error flag from a resource

 

        ?) Help

        s) Show current status

        q) Return to the main menu

 

    Option:  q

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


在所有节点做Oracle/AAA安装目录到全局设备(共享盘)的链接

capitek1 # df -h

Filesystem             size   used  avail capacity  Mounted on

/dev/dsk/c0t0d0s0       15G   5.9G   9.3G    39%    /

...

/dev/md/oradata/dsk/d80

                        63G    64M    62G     1%    /global/oradata

 

capitek1 # cd /global

capitek1 # ls -l

total 4

drwxr-xr-x   2 root     root         512 Oct 20 14:13 aaadata

drwxr-xr-x   3 oracle   dba          512 Oct 20 14:06 oradata

 

capitek1 # ln -s /global/oradata /ora_data

capitek1 # chown -h oracle:dba /ora_data

capitek1 # ls -l

...

lrwxrwxrwx   1 oracle   dba 15 Oct 20 14:29 ora_data -> /global/oradata

...

capitek1 # ln -s /global/aaadata /aaa_data

capitek1 # ls -l

...

lrwxrwxrwx   1 root root   15 Oct 20 14:32 aaa_data -> /global/aaadata

...

 

 

capitek2 # cd /

capitek2 # ln -s /global/oradata /ora_data

capitek2 # chown -h oracle:dba /ora_data

 

capitek2 # ln -s /global/aaadata /aaa_data

capitek2 # ls -l

total 1038

lrwxrwxrwx   1 root     root  15 Oct 20 14:32 aaa_data -> /global/aaadata

...

lrwxrwxrwx   1 oracle   dba   15 Oct 20 14:31 ora_data -> /global/oradata

 

capitek2 # cd aaa_data

capitek2 # pwd -P

/global/aaadata

 

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


观察服务配置

capitek1 # scstat -g

...

-- Resource Groups and Resources --

 

            Group Name     Resources

            ----------     ---------

 Resources: oracle-rg      oradata-mount-res oradata

 Resources: aaa-rg         aaadata aaadata-mount-res

...

-- Resources --

 

            Resource Name  Node Name                State          Status Message

            -------------  ---------                -----          --------------

  Resource: oradata-mount-res capitek1              Online         Online

  Resource: oradata-mount-res capitek2              Offline        Offline

 

  Resource: oradata        capitek1                 Online         Online - LogicalHostname online.

  Resource: oradata        capitek2                 Offline        Offline - LogicalHostname offline.

 

  Resource: aaadata        capitek2                 Offline        Offline - LogicalHostname offline.

  Resource: aaadata        capitek1                 Online         Online - LogicalHostname online.

 

  Resource: aaadata-mount-res capitek2              Offline        Offline

  Resource: aaadata-mount-res capitek1              Online         Online

...

 

capitek1 # ifconfig -a

lo0: flags=2001000849 mtu 8232 index 1

      inet 127.0.0.1 netmask ff000000

e1000g0: flags=1000843 mtu 1500 index 2

      inet 172.16.31.72 netmask ffffff00 broadcast 172.16.31.255

      groupname sc_ipmp

      ether 0:14:4f:9f:6b:ea

e1000g0:1: flags=1001040843 mtu 1500 index 2

      inet 172.16.31.74 netmask ffffff00 broadcast 172.16.31.255

e1000g0:2: flags=1001040843 mtu 1500 index 2

      inet 172.16.31.75 netmask ffffff00 broadcast 172.16.31.255

e1000g2: flags=1008843 mtu 1500 index 4

      inet 172.16.0.129 netmask ffffff80 broadcast 172.16.0.255

      ether 0:14:4f:9f:6b:ec

e1000g3: flags=1008843 mtu 1500 index 6

      inet 172.16.1.1 netmask ffffff80 broadcast 172.16.1.127

      ether 0:14:4f:9f:6b:ed

clprivnet0: flags=1009843 mtu 1500 index 5

      inet 172.16.4.1 netmask fffffe00 broadcast 172.16.5.255

      ether 0:0:0:0:0:1

 

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


第3章          Sun Cluster Agent的开发和部署

1. 首信AAA系统说明

首信AAA系统属于自己开发的Web应用,不同于Oracle数据库,在Sun Cluster中找不到现成的Agent, 用于AAA服务的启动和切换,需利用Sun Cluster Agent Builder工具生成和部署新的Agent。

2. 首信AAA系统Agent生成

新的Agent名称:CPTKaaa

启动脚本:radiusstart.ksh

监控脚本:radiusstatus.ksh

停止脚本:radiusstop.ksh

capitek1 # mkdir /usr/local/script                     

 

capitek1 # ls

radiusstart.ksh  radiusstop.ksh   radiustatus.ksh

 

capitek1 # ./radiusstart.ksh

raddaemo is starting.

capitek1 # ./radiusstop.ksh

Using CATALINA_BASE:   /global/aaadata/omc

...

 

capitek2 # mkdir /usr/local/script                     

 

capitek2 # ls

radiusstart.ksh  radiusstop.ksh   radiustatus.ksh

 

capitek2 # ./radiusstart.ksh

raddaemo is starting.

capitek2 # ./radiusstop.ksh

Using CATALINA_BASE:   /global/aaadata/omc

...

 
 

 

 

 

 

 

 


启动Sun Cluster Agent Builder工具,填入AAA应用所用脚本,选择创建Agent,类似:

 

 

 

 

 

 

 

 


在所有节点上安装实际创建的Agent

capitek2 # cd /global/aaadata/

capitek2 # ls

aaa          aaa.tar      log          lost+found   omc        

raddb        stat_stat    statfilepro  yzacct

capitek2 # cd aaa

capitek2 # ls

CPTKaaa   rtconfig

capitek2 # cd CPTKaaa

capitek2 # ls

README.aaa  bin      etc         man         pkg         src      util

capitek2 # cd pkg

capitek2 # ls

CPTKaaa

capitek2 # pkgadd -d . *

 

Processing package instance from

...

/opt/cluster/lib/rgm/rtreg/CPTK.aaa

[ verifying class ]

 

Installation of was successful.

 
 

 

 

 

 

 

 

 

 


用scsetup在任意节点上加入aaa服务

capitek2 # scsetup

 

  *** Main Menu ***

 

    Please select from one of the following options:

 

        1) Quorum

        2) Resource groups

        3) Data Services

        4) Cluster interconnect

        5) Device groups and volumes

        6) Private hostnames

        7) New nodes

        8) Other cluster tasks

 

        ?) Help with menu options

        q) Quit

 

    Option:  2

 

*** Resource Group Menu ***

 

    Please select from one of the following options:

 

        1) Create a resource group

        2) Add a network resource to a resource group

        3) Add a data service resource to a resource group

        4) Resource type registration

        5) Online/Offline or Switchover a resource group

        6) Suspend/Resume recovery for a resource group

        7) Enable/Disable a resource

       ...

 

        ?) Help

        s) Show current status

        q) Return to the main menu

 

    Option:  3

 

>>> Add a Data Service Resource to a Resource Group <<<

 

    This option allows you to add a data service resource to a resource

    group. If the resource type for the data service is not yet registered

    with the cluster, you will have the opportunity to register that type.

 

    Is it okay to continue (yes/no) [yes]? 

 

    Select the type of resource you want to add:

 

           Res Name             Description                                

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

 

        1) CPTK.aaa:1.0         aaa server for Sun Cluster

        2) SUNW.Event           HA Event server for Sun Cluster

        3) SUNW.HAStoragePlus:8 HA Storage Plus

       

       ...

 

        n) Next >

 

    Option:  1

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


The type of resource you selected is not yet registered. Each resource

    type must be registered with the cluster before any resources of the

    selected type can be added to a resource group.

 

    Registration of a resource type updates the cluster-wide configuration

    with the resource type properties found in default rt_reg files (see

    rt_reg(4)) on this node. It is important that the same resource type

    or data service software has been installed on each node in the

    cluster prior to registration.

 

    Is the software for this service installed on each node (yes/no) [yes]? 

 

    Is it okay to register this resource type now (yes/no) [yes]? 

 

scrgadm -a -t CPTK.aaa:1.0

 

    Command completed successfully.

 

Press Enter to continue: 

 

    What is the name of the resource you want to add?  aaa-service-res

 

    Select the resource group you want to use for "aaa-service-res":

 

           Group Name           Type       Description                  

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

 

        1) aaa-rg               Failover

...

 

    Option:  1

 

Any extension properties you would like to set (yes/no) [yes]? 

 

    Select a property you would like to set:

 

           Property Name                  Default Setting    Desired Setting  

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

 

        1) Confdir_list                  

        2) Monitor_retry_count            4

        3) Monitor_retry_interval         2

        4) Probe_timeout                  30

        5) Child_mon_level                -1

 

        q) Done

 

    Option:  q

 

    Are you done setting properties (yes/no) [yes]? 

Here is the list of extension properties you want to set: 

 

       

 

    Is it correct (yes/no) [yes]? 

 

    Is it okay to proceed with the update (yes/no) [yes]? 

 

scrgadm -a -j aaa-service-res -g aaa-rg -t CPTK.aaa:1.0 -y Scalable=false

scrgadm -c -j aaa-service-res -y R_description="Failover data service resource for CPTK.aaa:1.0"

 

    Commands completed successfully.

 
用scsetup在任意节点上加入aaa服务

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

完成Agent的安装

 Press Enter to continue: 

 

    Do you want to enable "aaa-service-res" on all nodes (yes/no) [yes]? 

 

    Do you want to enable this resource (yes/no) [yes]? 

 

scswitch -e -j aaa-service-res

scswitch -e -M -j aaa-service-res

...

 

    Commands completed successfully.

 

*** Resource Group Menu ***

 

    Please select from one of the following options:

 

        1) Create a resource group

        2) Add a network resource to a resource group

        3) Add a data service resource to a resource group

        4) Resource type registration

        5) Online/Offline or Switchover a resource group

        6) Suspend/Resume recovery for a resource group

        7) Enable/Disable a resource

        8) Change properties of a resource group

        9) Change properties of a resource

       10) Remove a resource from a resource group

       11) Remove a resource group

       12) Clear the stop_failed error flag from a resource

 

        ?) Help

        s) Show current status

        q) Return to the main menu

 

    Option:  q

** Main Menu ***

 

    Please select from one of the following options:

 

        1) Quorum

        2) Resource groups

        3) Data Services

        4) Cluster interconnect

        5) Device groups and volumes

        6) Private hostnames

        7) New nodes

        8) Other cluster tasks

 

        ?) Help with menu options

        q) Quit

 

    Option:  q

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


观察利用Agent新加入的服务资源组,可在集群里切换

 capitek2 # scstat -g

 

-- Resource Groups and Resources --

 

            Group Name     Resources

            ----------     ---------

 Resources: oracle-rg      oradata-mount-res oradata oracle-service-res oracle-listener-res

 Resources: aaa-rg         aaadata aaadata-mount-res aaa-service-res

 

 

-- Resource Groups --

 

            Group Name     Node Name                State          Suspended

            ----------     ---------                -----          ---------

     Group: oracle-rg      capitek1                 Online         No

     Group: oracle-rg      capitek2                 Offline        No

 

     Group: aaa-rg         capitek2                 Online         No

     Group: aaa-rg         capitek1                 Offline        No

 

-- Resources --

 

            Resource Name  Node Name                State          Status Message

            -------------  ---------                -----          --------------

  Resource: oradata-mount-res capitek1              Online         Online

  Resource: oradata-mount-res capitek2              Offline        Offline

 

  Resource: oradata        capitek1                 Online         Online - LogicalHostname online.

  Resource: oradata        capitek2                 Offline        Offline - LogicalHostname offline.

 

  Resource: oracle-service-res capitek1             Online         Online

  Resource: oracle-service-res capitek2             Offline        Offline

 

  Resource: oracle-listener-res capitek1            Online         Online

  Resource: oracle-listener-res capitek2            Offline        Offline

 

  Resource: aaadata        capitek2                 Online         Online - LogicalHostname online.

  Resource: aaadata        capitek1                 Offline        Offline - LogicalHostname offline.

 

  Resource: aaadata-mount-res capitek2              Online         Online

  Resource: aaadata-mount-res capitek1              Offline        Offline

 

  Resource: aaa-service-res capitek2                Online         Online

  Resource: aaa-service-res capitek1                Offline        Offline

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


第4章          Sun Cluster 基本的监控管理

Sun Cluster系统带有Sun Cluster Manager管理工具,可通过国Web浏览器做基本的监控和管理,端口6789,还是推荐用命令行方式管理。

 

.

文本框: . 

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9240380/viewspace-628314/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
提供针对oracle初学者及进阶的数据库培训,欢迎大家咨询: 微信: wisdomone 微信公众号: lovedb 工作经历: 中国普天 北京科蓝 北京云和恩墨 北京神州新桥

注册时间:2008-04-04

最新文章