Configuring the SF 7.4.1 Oracle RAC cluster随笔

本文旨在记录过程,不做过多描述。具体参数信息请参考官方文档。

1、环境信息

主机配置信息如下图:
Configuring the SF 7.4.1 Oracle RAC cluster随笔
共享磁盘信息如下图:
Configuring the SF 7.4.1 Oracle RAC cluster随笔

2、安装Veritas InfoScale Enterprise

以root身份登录任意一节点,执行installer程序,然后输入I,如下图:

[[email protected] ~]# /mnt/rhel7_x86_64/installer

Configuring the SF 7.4.1 Oracle RAC cluster随笔
选择Veritas InfoScale Enterprise,安装完成后不立即进行配置。然后输入要安装的主机名,以空格隔开。
Configuring the SF 7.4.1 Oracle RAC cluster随笔
Configuring the SF 7.4.1 Oracle RAC cluster随笔
Configuring the SF 7.4.1 Oracle RAC cluster随笔
如果有正式的license输入即可;如果没有就使用keyless licensing选项。
Configuring the SF 7.4.1 Oracle RAC cluster随笔

3、配置Veritas集群服务

[[email protected] ~]# /opt/VRTS/install/installer -configure

选择SF Oracle RAC选项,输入集群几点的主机名,下一步。
Configuring the SF 7.4.1 Oracle RAC cluster随笔
Configuring the SF 7.4.1 Oracle RAC cluster随笔
接着配置集群名称以及心跳:
Configuring the SF 7.4.1 Oracle RAC cluster随笔
Configuring the SF 7.4.1 Oracle RAC cluster随笔
Configuring the SF 7.4.1 Oracle RAC cluster随笔
Configuring the SF 7.4.1 Oracle RAC cluster随笔
Configuring the SF 7.4.1 Oracle RAC cluster随笔
Configuring the SF 7.4.1 Oracle RAC cluster随笔
Configuring the SF 7.4.1 Oracle RAC cluster随笔
Configuring the SF 7.4.1 Oracle RAC cluster随笔
Configuring the SF 7.4.1 Oracle RAC cluster随笔
Configuring the SF 7.4.1 Oracle RAC cluster随笔
Configuring the SF 7.4.1 Oracle RAC cluster随笔

4、配置I/O fencing服务

[[email protected] ~]# /opt/VRTS/install/installer -fencing

Configuring the SF 7.4.1 Oracle RAC cluster随笔
这里选择Configure disk based fencing选项。
Configuring the SF 7.4.1 Oracle RAC cluster随笔
Configuring the SF 7.4.1 Oracle RAC cluster随笔
Configuring the SF 7.4.1 Oracle RAC cluster随笔
Configuring the SF 7.4.1 Oracle RAC cluster随笔
可以使用下面命令进行验证:
Configuring the SF 7.4.1 Oracle RAC cluster随笔
Configuring the SF 7.4.1 Oracle RAC cluster随笔
配置完成后,默认会在集群中添加一个新的资源组vxfendg;可以使用hagrp命令进行验证:
Configuring the SF 7.4.1 Oracle RAC cluster随笔
Configuring the SF 7.4.1 Oracle RAC cluster随笔

5、配置Oracle OCR和VOTE

在安装oracle rac之前,必须配置好ocr和vote。可以创建基于文件系统的,也可以创建基于裸设备的,这里使用基于文件系统的ocr和vote。

[[email protected] ~]# /opt/VRTS/install/installer -configure

Configuring the SF 7.4.1 Oracle RAC cluster随笔
Configuring the SF 7.4.1 Oracle RAC cluster随笔
Configuring the SF 7.4.1 Oracle RAC cluster随笔
Configuring the SF 7.4.1 Oracle RAC cluster随笔
Configuring the SF 7.4.1 Oracle RAC cluster随笔
Configuring the SF 7.4.1 Oracle RAC cluster随笔
Configuring the SF 7.4.1 Oracle RAC cluster随笔
Configuring the SF 7.4.1 Oracle RAC cluster随笔
配置完成后,集群服务会增加一个cvm资源组,可以使用如下命令验证查询:
Configuring the SF 7.4.1 Oracle RAC cluster随笔

6、Oracle网络配置

Configuring the SF 7.4.1 Oracle RAC cluster随笔
Configuring the SF 7.4.1 Oracle RAC cluster随笔
Configuring the SF 7.4.1 Oracle RAC cluster随笔

7、创建oracle数据文件磁盘组

--初始化磁盘
[[email protected] ~]# vxdisksetup -if odb01_vmdk0_0
--创建磁盘组
[[email protected] ~]# vxdg -s init datadg odb01_vmdk0_0=odb01_vmdk0_0
--创建两个volume
[[email protected] ~]# vxassist -g datadg make vol01 50G
[[email protected] ~]# vxassist -g datadg make vol02 50G
--创建vxfs文件系统
[[email protected] ~]# mkfs -t vxfs -o bsize=8192,largefiles /dev/vx/dsk/datadg/vol01
[[email protected] ~]# mkfs -t vxfs -o bsize=8192,largefiles /dev/vx/dsk/datadg/vol02
--创建挂载点
[[email protected] ~]# mkdir -p /u02/{oradata,archive}  
[[email protected] ~]# mkdir -p /u02/{oradata,archive}  

8、创建Oracle资源组

[[email protected] ~]# haconf -makerw
--创建资源组rhn_rg
[[email protected] ~]# hagrp -add rhn_rg
[[email protected] ~]# hagrp -modify rhn_rg Parallel 1
[[email protected] ~]# hagrp -modify rhn_rg SystemList odb01 0 odb02 1
[[email protected] ~]# hagrp -modify rhn_rg AutoStartList odb01 odb02
--添加datadg_rs资源
[[email protected] ~]# hares -add datadg_rs CVMVolDg rhn_rg
[[email protected] ~]# hares -modify datadg_rs CVMDiskGroup datadg
[[email protected] ~]# hares -modify datadg_rs  CVMActivation sw
[[email protected] ~]# hares -modify datadg_rs  CVMVolume vol01 vol01
[[email protected] ~]# hares -modify datadg_rs  NodeList odb01 odb02
[[email protected] ~]# hares -modify datadg_rs Critical 0
--添加文件系统资源
[[email protected] ~]# hares -add oradata_mnt CFSMount rhn_rg
[[email protected] ~]# hares -add archive_mnt CFSMount rhn_rg
[[email protected] ~]# hares -modify oradata_mnt MountPoint "/u02/oradata"
[[email protected] ~]# hares -modify archive_mnt MountPoint "/u02/archive"
[[email protected] ~]# hares -modify oradata_mnt BlockDevice /dev/vx/dsk/datadg/vol01
[[email protected] ~]# hares -modify archive_mnt BlockDevice /dev/vx/dsk/datadg/vol02
[[email protected] ~]# hares -modify archive_mnt Critical 0
[[email protected] ~]# hares -modify oradata_mnt Critical 0
--启用资源组并online
[[email protected] ~]# hagrp -enableresources rhn_rg
[[email protected] ~]# haconf -dump -makero
[[email protected] ~]# hagrp -online rhn_rg -any
[[email protected] ~]# chown -R oracle:oinstall /u02

Configuring the SF 7.4.1 Oracle RAC cluster随笔

9、部署Oracle RAC系统

这里不详细描述oracle grid和database的安装过程,只做以下说明:
1、安装配置grid组件时,对应的ocr和vote位置选择对应的文件系统;
2、创建数据库实例时,数据文件和归档选择对应的文件系统。

10、创建oracle实例资源

向已创建的rhn_rg资源组添加数据库实例资源信息,如下:

[[email protected] ~]# haconf -makerw
--添加rhn_rs资源
[[email protected] ~]# hares -add rhn_rs Oracle rhn_rg
[[email protected] ~]# hares -modify rhn_rs Owner oracle
[[email protected] ~]# hares -modify rhn_rs Home /u01/app/oracle/product/11.2.0/db_1
[[email protected] ~]# hares -modify rhn_rs StartUpOpt SRVCTLSTART          
[[email protected] ~]# hares -modify rhn_rs ShutDownOpt SRVCTLSTOP
--设置各个节点对应的实例名称
[[email protected] ~]# hares -local rhn_rs Sid
[[email protected] ~]# hares -modify rhn_rs Sid rhndb1 -sys odb01
[[email protected] ~]# hares -modify rhn_rs Sid rhndb2 -sys odb02
[[email protected] ~]# hares -modify rhn_rs Critical 0
--设置资源之间的依赖关系
[[email protected] ~]# hares -link oradata_mnt datadg_rs
[[email protected] ~]# hares -link archive_mnt datadg_rs
[[email protected] ~]# hares -link rhn_rs oradata_mnt
[[email protected] ~]# hares -link rhn_rs archive_mnt 
[[email protected] ~]# hagrp -link rhn_rg cvm online local firm
[[email protected]01 ~]# hagrp -enableresources rhn_rg
[[email protected] ~]# haconf -dump -makero
[[email protected] ~]# hagrp -online rhn_rg -any

Configuring the SF 7.4.1 Oracle RAC cluster随笔

猜你喜欢

转载自blog.51cto.com/candon123/2454368