AIX5300-08 HACMP5.4.1 ORACLE10204 RAC 安裝(5)

westzq1984發表於2009-04-21

 

HACMP安裝配置

需要在2臺機器上都進行HACMP安裝,而且安裝的檔案集需要相同

配置只需要在1臺機器上進行,配置完成後進行同步操作

 

安裝軟體

# smit install_latest

SOFTWARE to install 選擇需要安裝的軟體包

    cluster.hativolicluster.haview不安裝,其他都選  

修改ACCEPT new license agreements?  YES

安裝完成後注意看日誌,看最後是否標識全部成功了

 

檢查:lppchk -v lppchk -c cluster* 如果正確安裝,應該無返回

 

安裝補丁包

http://www14.software.ibm.com/webapp/set2/sas/f/hacmp/home.html

 

由於我們使用的SCSI磁碟,需要修改HA指令碼,否則HA啟動無法掛載磁碟

    修改/usr/es/sbin/cluster/events/utils/cl_mode3

    281行,409行,STATUS=0

 

配置磁碟

如果在重灌系統前沒有清除卷組,那麼需要格式化磁碟

格式化操作必須在儲存連上機器30分鐘後才能進行

# diag

  -> Task Selection (Diagnostics, Advanced Diagnostics, Service Aids, etc.)

-> Format Media

 

也可以把該磁碟先exportvg,在把VG清除掉

 

檢視磁碟是否已經被識別,而且PVID相同

# lspv

hdisk0          0003c1be68e57349                    rootvg          active

hdisk1          0052a6ee7ec6da95                   

兩臺機器上分別執行,注意,hdisk0為內建磁碟,hdisk1為共享磁碟

兩臺機器上顯示的該磁碟應該同樣命名為hdisk1,而且PVID0052a6ee7ec6da95)必須是相同的

 

建立VG( P61A上執行 )

# smit mkvg

-> Add a Scalable Volume Group

                           Add a Scalable Volume Group

 

Type or select values in entry fields.

Press Enter AFTER making all desired changes.

 

                                                        [Entry Fields]

  VOLUME GROUP name                                  [oravg]

  Physical partition SIZE in megabytes                128                      +

* PHYSICAL VOLUME names                              [hdisk1]                  +

  Force the creation of a volume group?               no                       +

  Activate volume group AUTOMATICALLY                 no                       +

    at system restart?

  Volume Group MAJOR NUMBER                          []                        +#

  Create VG Concurrent Capable?                       enhanced concurrent      +

  Max PPs per VG in units of 1024                     32                       +

  Max Logical Volumes                                 256                      +

 

 

建立LV( P61A上執行)

varyonvg oravg

mklv -y 'tcrs_ocr_01' -t 'raw' oravg 2

mklv -y 'tcrs_vote_01' -t 'raw' oravg 2

mklv -y 'trac_ctrl_1' -t 'raw' oravg 1

mklv -y 'trac_ctrl_2' -t 'raw' oravg 1

mklv -y 'trac_ctrl_3' -t 'raw' oravg 1

mklv -y 'trac_redo1_11' -t 'raw' oravg 1

mklv -y 'trac_redo1_21' -t 'raw' oravg 1

mklv -y 'trac_redo2_11' -t 'raw' oravg 1

mklv -y 'trac_redo2_21' -t 'raw' oravg 1

mklv -y 'trac_spfile' -t 'raw' oravg 1

mklv -y 'trac_pwdfile' -t 'raw' oravg 1

mklv -y 'trac_indx_01' -t 'raw' oravg 5

mklv -y 'trac_users_01' -t 'raw' oravg 5

mklv -y 'trac_tools_01' -t 'raw' oravg 5

mklv -y 'trac_system_01' -t 'raw' oravg 10

mklv -y 'trac_sysaux_01' -t 'raw' oravg 10

mklv -y 'trac_temp_01' -t 'raw' oravg 10

mklv -y 'trac_undotbs_01' -t 'raw' oravg 10

mklv -y 'trac_undotbs_02' -t 'raw' oravg 10

 

檢查

bash-3.00# lsvg -l oravg

oravg:

LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT

tcrs_ocr_01         raw        2       2       1    closed/syncd  N/A

tcrs_vote_01        raw        2       2       1    closed/syncd  N/A

trac_ctrl_1         raw        1       1       1    closed/syncd  N/A

trac_ctrl_2         raw        1       1       1    closed/syncd  N/A

trac_ctrl_3         raw        1       1       1    closed/syncd  N/A

trac_redo1_11       raw        1       1       1    closed/syncd  N/A

trac_redo1_21       raw        1       1       1    closed/syncd  N/A

trac_redo2_11       raw        1       1       1    closed/syncd  N/A

trac_redo2_21       raw        1       1       1    closed/syncd  N/A

trac_spfile         raw        1       1       1    closed/syncd  N/A

trac_pwdfile        raw        1       1       1    closed/syncd  N/A

trac_indx_01        raw        5       5       1    closed/syncd  N/A

trac_users_01       raw        5       5       1    closed/syncd  N/A

trac_tools_01       raw        5       5       1    closed/syncd  N/A

trac_system_01      raw        10      10      1    closed/syncd  N/A

trac_sysaux_01      raw        10      10      1    closed/syncd  N/A

trac_temp_01        raw        10      10      1    closed/syncd  N/A

trac_undotbs_01     raw        10      10      1    closed/syncd  N/A

trac_undotbs_02     raw        10      10      1    closed/syncd  N/A

 

export卷組( P61A上執行 )

     # varyoffvg oravg

     # exportvg oravg

 

P61B上,import卷組

     # importvg -y oravg hdisk1

 

P61A上,import卷組

     # importvg -y oravg hdisk1

 

現在在P61AP61B上執行lspv,應該為如下:

# lspv

hdisk0          0003c1be68e57349                    rootvg          active

hdisk1          0052a6ee7ec6da95                    oravg

 

現在在P61B上單獨varyon oravg

# varyonvg oravg

 

P61B上檢視卷組屬性,確保該卷組不是在機器啟動時varyon

# lsvg oravg|grep "AUTO ON"

ACTIVE PVs:         22                       AUTO ON:        no

 

P61Bvaryoff vg

# varyoffvg oravg

 

修改LV屬主

CRS檔案 /dev/rtcrs_ocr_01/dev/rtcrs_vote_01的檔案屬主為oracle:oinstall

其他資料庫檔案/dev/rtrac_* 的檔案屬主為oracle:dba

 

bash-3.00# chown oracle.oinstall /dev/rtcrs_*

bash-3.00# chown oracle.dba /dev/rtrac_*

bash-3.00# ls -l /dev |grep rt

crw-rw----    1 oracle   oinstall     51,  1 Apr 20 21:43 rtcrs_ocr_01

crw-rw----    1 oracle   oinstall     51,  2 Apr 20 21:43 rtcrs_vote_01

crw-rw----    1 oracle   dba          51,  3 Apr 20 21:43 rtrac_ctrl_1

crw-rw----    1 oracle   dba          51,  4 Apr 20 21:43 rtrac_ctrl_2

crw-rw----    1 oracle   dba          51,  5 Apr 20 21:43 rtrac_ctrl_3

crw-rw----    1 oracle   dba          51, 12 Apr 20 21:43 rtrac_indx_01

crw-rw----    1 oracle   dba          51, 11 Apr 20 21:43 rtrac_pwdfile

crw-rw----    1 oracle   dba          51,  6 Apr 20 21:43 rtrac_redo1_11

crw-rw----    1 oracle   dba          51,  7 Apr 20 21:43 rtrac_redo1_21

crw-rw----    1 oracle   dba          51,  8 Apr 20 21:43 rtrac_redo2_11

crw-rw----    1 oracle   dba          51,  9 Apr 20 21:43 rtrac_redo2_21

crw-rw----    1 oracle   dba          51, 10 Apr 20 21:43 rtrac_spfile

crw-rw----    1 oracle   dba          51, 16 Apr 20 21:43 rtrac_sysaux_01

crw-rw----    1 oracle   dba          51, 15 Apr 20 21:43 rtrac_system_01

crw-rw----    1 oracle   dba          51, 17 Apr 20 21:43 rtrac_temp_01

crw-rw----    1 oracle   dba          51, 14 Apr 20 21:43 rtrac_tools_01

crw-rw----    1 oracle   dba          51, 18 Apr 20 21:43 rtrac_undotbs_01

crw-rw----    1 oracle   dba          51, 19 Apr 20 21:43 rtrac_undotbs_02

crw-rw----    1 oracle   dba          51, 13 Apr 20 21:43 rtrac_users_01

 

配置HACMP

1.建立叢集

# smitty hacmp

Initialization and Standard Configuration

Configure an HACMP Cluster and Nodes   

* Cluster Name                                       [rac10g]

  New Nodes (via selected communication paths)       [P61A P61B]            

(節點名一定要和hostname命令返回值一樣。)

 

2.建立資源組

# smitty hacmp

Initialization and Standard Configuration

Configure HACMP Resource Groups

Add a Resource Group

* Resource Group Name                                [rac10grq]

* Participating Nodes (Default Node Priority)        [P61A P61B]                            +        

Startup Policy                                      Online On All Available Nodes         +             Fallover Policy                                     Bring Offline (On Error Node Only)  

 Fallback Policy                                     Never Fallback                       

 

3.為資源組racdbrg增加共享磁碟

# smitty hacmp

Initialization and Standard Configuration

Configure HACMP Resource Groups

Change/Show Resources for a Resource Group (standard)

  Resource Group Name                                 rac10grq

  Participating Nodes (Default Node Priority)         P61A P61B

 

  Startup Policy                                      Online On All Available Nodes

  Fallover Policy                                     Bring Offline (On Error Node Only)

  Fallback Policy                                     Never Fallback

  Concurrent Volume Groups                           [oravg]                              +

  Use forced varyon of volume groups, if necessary    false                               +

  Application Servers                                []                                   +

 

 

4.配置串列埠網路作為HB

# smitty hacmp

Extended Configuration

Extended Topology Configuration

Configure HACMP Communication Interfaces/Devices

Add Communication Interfaces/Devices

 

Add Discovered Communication Interface and Devices

Communication Devices

 db01 tty0 /dev/tty0

 db02 tty0 /dev/tty0

 

5.配置HB IP網路

# smitty hacmp

Extended Configuration

Extended Topology Configuration

Configure HACMP Networks

Change/Show a Network in the HACMP Cluster

 

* Network Name net_ether_02

New Network Name []

* Network Type [ether]

* Netmask [255.255.255.0]

* Enable IP Address Takeover via IP Aliases [Yes]

IP Address Offset for Heartbeating over IP Aliases []

* Network attribute private

 

6.同步叢集配置檔案

# smitty hacmp

Extended Configuration

Extended Verification and Synchronization

HACMP Verification and Synchronization

* Verify, Synchronize or Both                        [Both]                               +

* Automatically correct errors found during          [Yes]                                +

  verification?

 

* Force synchronization if verification fails?       [No]                                 +

* Verify changes only?                               [No]                                 +

* Logging                                            [Standard]                           +

 

同步時候,遇到如下警告:

WARNING: File 'netmon.cf' is missing or empty on the following nodes:

修改 vi /usr/es/sbin/cluster/netmon.cf

10.10.1.61

10.10.1.62

12.0.0.61

12.0.0.62

 

6.測試HACMP叢集

第一個節點

# hostname

P61A

# smitty clstart

# lssrc -g cluster  

第二個節點

# hostname

P61B

# smitty clstart

# lssrc -g cluster

 

HACMP啟動後,oravg應該已經varyon

bash-3.00# lspv

hdisk0          0009a9fac0415175                    rootvg          active

hdisk1          000b7b6d7ff41d9c                    oravg           concurrent

 

Hacmp 5.4.1hacmp.out檔案位置 /var/hacmp/log/hacmp.out 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8242091/viewspace-591201/,如需轉載,請註明出處,否則將追究法律責任。

相關文章