Cluster/HA2011. 8. 4. 10:49

1. Cluster Design and Planning


o. cluster diagram

 ----------+----+-------------------------------------+----+-------------
                |      |         network name : ether1               |      |
                |      |                                                       |      |
 +---------+----+------------+             +----------+----+------------+
 |        en0  en1                     |             |         en0  en1           |
 |                                         |             |                            |
 |                                         |             |                            |
 |                                         |  rs232a    |                            |
 |                            /dev/tty0 +-------------+ /dev/tty0                  |
 |                                         |             |                            |
 |                                         |             |                            |
 |                                         |             |                            |
 |     rootvg                           |             |     rootvg                 |
 |      - hdisk0                       |             |      - hdisk0              |
 |      - hdisk1                       |             |      - hdisk1              |
 |                                         |             |                            |
 |                                         |             |                            |
 |     <halifax>               ssa0 |             | ssa0    <vancouver>        |
 +-------------------------+-+             +-+--------------------------+
                           |                                            |
                           |                                            |
                          +-+---------------------------+-+
                          |                                             |
                         |                    hdisk2                 |
                         |                    hdisk3                 |
                         |                    hdisk4                 |
                         |                                              |
                         +-------------------------------+




- cluster name : canada
- cluster id : 1
- cluster subnet : 255.255.255.0


o. halifax

- vg name : shared_vg_a
- logical volume : shared_jfslv_a
- file system name : /shared_fs_a
- jfslog : shared_jfslog_a

- service address : 192.168.42.1 (halifax_service)
- standby address : 192.168.142.1 (halifax_standby)
- boot address : 192.168.42.10 (halifax_boot)


o. vancouver

- vg name : shared_vg_b
- logical volume : shared_jfslv_b
- file system name : /shared_fs_b
- jfslog : shared_jfslog_b

- service address : 192.168.42.2 (vancouver_service)
- standby address : 192.168.142.2 (vancouver_standby)
- boot address : 192.168.42.20 (vancouver_boot)






2. Network Setup and Test


o. set hostname

   # hostname halifax
   # hostname vancouver


o. boot, standby adapter configuration

   halifax# smitty chinet

     en0 (boot)
     192.168.42.10
     255.255.255.0

     en1 (standby)
     192.168.142.1
     255.255.255.0

   vancouver# smitty chinet

     en0 (boot)
     192.168.42.20
     255.255.255.0

     en1 (standby)
     192.168.142.2
     255.255.255.0


o. verify network configuration on both node
  
   # netstat -in
   # ifconfig -a


   # cat /etc/hosts
   192.168.42.10 halifax_boot
   192.168.42.1 halifax_service
   192.168.142.1 halifax_standby
   192.168.42.20 vancouver_boot
   192.168.42.2 vancouver_service
   192.168.142.2 vancouver_standby

   # netstat -i

   # host halifax_boot
   # host halifax_service
   # host halifax_standby
   # host vancouver_boot
   # host vancouver_service
   # host vancouver_standby


o. create .rhosts file for root on both node

   # cat /.rhosts
   halifax_boot
   halifax_service
   halifax_standby
   vancouver_boot
   vancouver_service
   vancouver_standby


o. serial(rs-232) configuration on both node

   # smitty tty
   Enable login : disable
   baud rate = 9600
   parity = no
   bits = 8
   stop bits = 1


o. verify serial(rs-232) connection

   halifax# stty < /dev/tty0
   vancouver# stty < /dev/tty0





3. LVM Activities


o. check unused major number on both node

   # lvlstmajor


o. create vg, lv, fs on hdisk2 in halifax node

   halifax# smitty mkvg
   vg name = shared_vg_a
   autovaryon = no
   vg major# = 66

   halifax# smitty mklv
   lv name = shared_jfslog_a
   lv type = jfslog
   size = 1 pp

   halifax# logform /dev/shared_jfslog_a

   halifax# smitty mklv
   lv name = shared_jfslv_a
   lv type = jfs
   size = 40 pp

   halifax# smitty jfs
   mount point = /shared_fs_a
   mount automatically = no


o. verify vg, lv, fs in halifax node

   halifax# varyonvg shared_vg_a
   halifax# mount /shared_fs_a
   halifax# lsvg -l shared_vg_a

   halifax# umount /shared_fs_a
   halifax# varyoffvg shared_vg_a


o. import vg in vancouver node

   vancouver# importvg -V66 -y shared_vg_a hdisk2

   vancouver# chvg -an shared_vg_a


o. verify vg, lv, fs in vancouver node

   vancouver# varyonvg shared_vg_a
   vancouver# mount /shared_fs_a
   vancouver# lsvg -l shared_vg_a

   vancouver# umount /shared_fs_a
   vancouver# varyoffvg shared_vg_a





4. HACMP/ES Fileset Install


o. install hacmp/es fileset on both node

   halifax# smitty installp
    - cluster.adt.es
    - cluster.es
    - cluster.es.clvm
    - cluster.es.cspoc
    - cluster.es.plugins
    - cluster.license
    - cluster.man.en_US.es
    - cluster.doc.en_US.es

   vancouver# smitty installp
    - cluster.adt.es
    - cluster.es
    - cluster.es.clvm
    - cluster.es.cspoc
    - cluster.es.plugins
    - cluster.license
    - cluster.man.en_US.es
    - cluster.doc.en_US.es


o. if hacmp/es patch is available, install it

   halifax# smitty installp
   vancouver# smitty installp


o. reboot the system

   halifax# shutdown -Fr
   vancouver# shutdown -Fr


o. verify the hacmp/es smitty menu

   halifax# smitty hacmp
   vancouver# smitty hacmp


o. insert hacmp/es path to the PATH env.

   - /usr/es/sbin/cluster/utilities
   - /usr/es/sbin/cluster/diag
   - /usr/es/sbin/cluster





5. Configure Cluster Topology


o. define the cluster

   halifax# smitty hacmp
   -> cluster configuration 
   -> cluster topology 
   -> configure cluster 
   -> add cluster definition 

   cluster name : canada
   cluster id : 1


o. add cluster nodes

   halifax# smitty hacmp
   -> cluster configuration 
   -> cluster topology 
   -> configure nodes
   -> add cluster nodes

   halifax vancouver 


o. define initial adapter for each node

   halifax# smitty hacmp
   -> cluster configuration 
   -> cluster topology 
   -> configure adapters
   -> configure ip-based interface / ip labels
   -> add initial interfaces
   -> add an adapter on a new network
   
   add halifax_boot as the initial interface for the halifax node
   network type = ether
   network name = ether1

   add vancouver_boot as the initial interface for the vancouver node
   network type = ether
   network name = ether1


o. discover ip topology

   halifax# smitty hacmp
   -> cluster configuration 
   -> cluster topology 
   -> configure adapters
   -> configure ip-based interface / ip labels
   -> discover ip topology


o. add multiple ip-based interfaces

   halifax# smitty hacmp
   -> cluster configuration 
   -> cluster topology 
   -> configure adapters
   -> configure ip-based interface / ip labels
   -> add multiple ip-based interface

   standby
    - halifax_standby
    - vancouver_standby


o. add service interface

   halifax# smitty hacmp
   -> cluster configuration 
   -> cluster topology 
   -> configure adapters
   -> configure ip-based interface / ip labels
   -> add ip labels requiring indivisual configuration

   halifax_service
    mac : 00:04:00:00:00:01
   vancouver_service
    mac : 00:04:00:00:00:02


o. configure non-ip adapter

   halifax# smitty hacmp
   -> cluster configuration 
   -> cluster topology 
   -> configure adapters
   -> configure adapters on non ip-based network
   -> add an adapter
   -> add an adapter on a new network

   label : halifax_tty
   network type : rs232
   network name : rs232a
   device : /dev/tty0

   label : vancouver_tty
   network type : rs232
   network name : rs232a
   device : /dev/tty0


o. synchronize the topology

   halifax# smitty hacmp
   -> cluster configuration 
   -> cluster topology 
   -> synchronize topology


o. verify the synchronization on both node

   halifax# /usr/es/sbin/cluster/utilities/cllsif
   vancouver# /usr/es/sbin/cluster/utilities/cllsif





6. Configure Cluster Resource


o. add resource group

   halifax# smitty hacmp
   -> cluster configuration 
   -> cluster resources
   -> define resource groups
   -> add a resource group

   rg name = shared_res_grp_a
   node names = halifax vancouver


o. discover current volume group configuration

   halifax# smitty hacmp
   -> cluster configuration 
   -> cluster resources
   -> discover current volume group configuration
   -> cluster wide configuration


o. change/show resources/attributes for a resource group

   halifax# smitty hacmp
   -> cluster configuration 
   -> cluster resources
   -> change/show resources/attributes for a resource group
   -> shared_res_grp_a

   service ip label : halifax_service
   filesystems : default
   volume group : shared_vg_a


o. synchronize the resource

   halifax# smitty hacmp
   -> cluster configuration 
   -> cluster resources
   -> synchronize the resources


o. verify the synchronization on both node

   halifax# /usr/es/sbin/cluster/utilities/clshowres
   vancouver# /usr/es/sbin/cluster/utilities/clshowres





7. Cluster Administration


o. start & stop the cluster

   # smitty clstart
   # smitty clstop


o. log

   /tmp/hacmp.out
   /usr/es/adm/cluster.log


o. cluster statistics

   # clstat -a -r 1


o. cluster resource

   # clshowres
   # clfindres


   
#
# EoF
#

Posted by [TheWon]