ITPub博客

首页 > Linux操作系统 > Linux操作系统 > AIX5300-08 HACMP5.4.1 ORACLE10204 RAC 安装(5)

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

原创 Linux操作系统 作者:westzq1984 时间:2009-04-21 18:48:31 0 删除 编辑

 

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/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2009-04-06

  • 博文量
    251
  • 访问量
    957734