存储 频道

IBM HACMP双机服务器系统的解决方案

    三、IBM HACMP双机服务器系统的解决方案

    HACMP的安装配置步骤如下:

    (一)在两台服务器上分别安装HACMP软件
    #smit installp

    (二)分别检查两台主机上安装的软件是否成功
    #/usr/sbin/cluster/diag/clverify
    software
    cluster
    clverify>software         
    Valid Options are:
    lpp
    clverify.software> lpp
    若没有error出现则安装成功。

    (三)分别配置两台服务器的boot IP地址和Standby IP地址,保证boot 网和Standby网能ping通(用smit  tcpip命令),用netstat命令检查配置是否正确:
    #netstat -i

    (四)利用smit tty在两台主机上增加一个TTY接口,配置心跳线(RS232):
    #smitty tty
      TTY                                            tty0
      TTY type                                       tty
      TTY interface                                   rs232
      Description                                     Asynchronous Terminal
      Status                                          Available
      Location                                       20-70-01-00
      Parent adapter                                   sa2
    PORT number                                   [0]               
      Enable LOGIN                                   disable                 
      BAUD rate                                      [9600]                   
      PARITY                                     [none]                   
      BITS per character                           [8]                      
      Number of STOP BITS                            [1]

    用lsdev –Cc tty查看tty是否配置好。
    #lsdev –Cc tty
    在两台上分别输入如下命令:
    S85_1# cat /etc/hosts >/dev/tty0
    S85_2# cat </dev/tty0
    如果在S85_2机能接收到信息,则表明心跳线已经配置好。

    (五)具体配置及技巧
    注:HACMP的配置(或修改配置)只需要在其中的一台主机上进行,当配置(或修改)完毕后使用同步命令将配置结果传到另外一台主机上。一般选S85_1在进行配置。
    在S85_1上运行smit hacmp,然后按照下面的步骤进行配置:
     #smit hacmp 

    1、 Cluster Configuration
    1.1、配置Cluster Topology
 配置Configure Cluster/ Add a Cluster Definition   
    * Cluster ID                          [100]                   #
    * Cluster Name                       [sb_ha]

 配置Configure Nodes,增加两个Node
    * Node Names                                    [s85_a]
    * Node Names                                    [s85_b]

 配置Configure Adapters,分别配置两台机的service地址,boot地址,standby地址及tty(a_svc、b_svc、a_boot、b_boot、a_stdby、b_stdby、a_tty、b_tty)
    * Adapter IP Label                            a_svc 
      Network Type                                 [ether]                  
      Network Name                                [ethnet]                
      Network Attribute                              public                  
      Adapter Function                               service                 
      Adapter Identifier                            [172.16.1.1]
      Adapter Hardware Address                    [ ]
      Node Name                                 [s85_a] 
    修改/etc/hosts及/.rhosts文件,如:修改/etc/hosts文件,增加以下内容:
      172.16.1.1            a_svc
      172.16.1.2            b_svc
      172.16.1.3            a_boot
      172.16.1.4            b_boot
      172.16.2.1            a_stdby
      172.16.2.2            b_stdby
    修改/.rhosts文件,增加以下内容:
      a_svc
      b_svc
      a_boot
      b_boot
      a_stdby
      b_stdby

    1.2、同步cluster(Cluster Configuration/ Cluster Topology/ Synchronize Cluster Topology)
    在进行同步的时候可以先进行模拟(Emulate)同步,当模拟同步OK后再进行实际(actual)同步:
                   Synchronize Cluster Topology
    Type or select values in entry fields.
    Press Enter AFTER making all desired changes.
    [TOP]                                                   [Entry Fields]
      Ignore Cluster Verification Errors?              [No]                +
    * Emulate or Actual?                         [Emulate]             +

    2、配置Cluster Resources
    2.1、定义一个资源组(Define Resource Groups)
    注意,在定义资源组的时候,要注意Participating Node Names的先后顺序。  

    Resource Group Name                           data_res  
    New Resource Group Name                       []
    Node Relationship                                  cascading   
    Participating Node Names                      [s85_a  s85_b]

    2.2、定义应用服务器(Define Application Servers)
    Server Name                                    ora_app   
    New Server Name                               [ ]
    start Script                                   [/etc/start]
    Stop Script                                   [/etc/stop]

    2.3、修改资源组属性(Change/Show Resources for a Resource Group)
    data_res组:      
       Resource Group Name                       data_res
       Node Relationship                              cascading
       Participating Node Names                  s85_a  s85_b
       Service IP label                                [a_svc]
       Filesystems(default is all)                []                
       Filesystems Consistency Check                  fsck 
       Filesystems Recovery Method                    sequential
       Filesystems to Export                           [] 
       Filesystems to NFS mount                       []          
       Volume Groups                                [datavg logvg] 
       Concurrent Volume groups                       []           
       Raw Disk PVIDs                               []  
       Application Servers                         [ora_app]

    2.4、同步资源组(Synchronize Cluster Resources)
    在进行同步的时候可以先进行模拟(Emulate)同步,当模拟同步OK后再进行实际(actual)同步:
                      Synchronize Cluster Resources
    Type or select values in entry fields.
    Press Enter AFTER making all desired changes.
    [TOP]                                                   [Entry Fields]
      Ignore Cluster Verification Errors?             [No]                  +
    * Emulate or Actual?                          [Emulate]             +

    3、HACMP的启动及关闭      
    (1)启动过程:
            #smit clstart
            #tail –f /tmp/hacmp.out
            May 22 17:29:23 EVENT COMPLETED: node_up_complete s85_a         
     如果/tmp/hacmp.out文件显示类似上述信息,则表明HACMP在本机上可以正常启动。

    (2)关闭过程:
            #smit clstop

    4、HACMP功能的测试
    在HACMP配置完成并检查没有错误后,即可按3的方法启动HACMP,进行功能测试。包括应用在同一台服务器的两个网卡能否切换,在两台服务器间能否切换等。可用命令:
    #netstat-in来看地址的切换情况

0
相关文章