Oracle 10g RAC 如何配置 VIP IPMP

metalink note 283107.1介绍了如何设置VIP的IPMP,此处记录一下设置过程。

o Existing 10g RAC installation
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      For existing 10g RAC installations, use srvctl to modify the VIP to use all the NIC‘s
      within the same IPMP group.  The following example is configuring the VIP for jphp1580,
      to use the two NIC‘s specified in the command line.

        # srvctl stop nodeapps -n jpsun1580
        # srvctl modify nodeapps -n jpsun1580 -o /u01/app/oracle/product/10gdb -A 146.56.78.1/255.255.252.0/ce0\|ce1
        # srvctl start nodeapps -n jpsun1580

节点1修改过程

  • 查看节点1当前情况
[email protected]:~ $> srvctl config nodeapps -n ofs00mlctsc01 -a
VIP exists.: /ofs00mlctsc01-vip/10.99.32.11/255.255.255.0/bnx1
[email protected]:~ $> srvctl config nodeapps -n ofs00mlctsc01
ofs00mlctsc01 mlctscdb1 /app/oracle/product/10.2
[email protected]:~ $> ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
bnx0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 10.99.32.10 netmask ffffff00 broadcast 10.99.32.255
        groupname prod-ipmp
bnx1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
        groupname prod-ipmp
bnx1:1: flags=1040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4> mtu 1500 index 3
        inet 10.99.32.11 netmask ffffff00 broadcast 10.99.32.255
bnx2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 4
        inet 192.168.5.10 netmask ffffff00 broadcast 192.168.5.255
        groupname priv-ipmp
bnx3: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 5
        inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
        groupname priv-ipmp
[email protected]:~ $> crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora....scdb.db application    ONLINE    ONLINE    ofs0...sc02
ora....b1.inst application    ONLINE    ONLINE    ofs0...sc01
ora....b2.inst application    ONLINE    ONLINE    ofs0...sc02
ora....SM1.asm application    ONLINE    ONLINE    ofs0...sc01
ora....01.lsnr application    ONLINE    ONLINE    ofs0...sc01
ora....c01.gsd application    ONLINE    ONLINE    ofs0...sc01
ora....c01.ons application    ONLINE    ONLINE    ofs0...sc01
ora....c01.vip application    ONLINE    ONLINE    ofs0...sc01
ora....SM2.asm application    ONLINE    ONLINE    ofs0...sc02
ora....02.lsnr application    ONLINE    ONLINE    ofs0...sc02
ora....c02.gsd application    ONLINE    ONLINE    ofs0...sc02
ora....c02.ons application    ONLINE    ONLINE    ofs0...sc02
ora....c02.vip application    ONLINE    ONLINE    ofs0...sc02 

其中bnx0和bnx1是IPMP组prod-ipmp组的两个成员,目前OCR中记录的VIP使用的网卡是bnx1,因此VIP
10.99.32.11被加到了bnx1上。
  • 停止nodeapps,并修改nodeapps设置
[email protected]:~ $> srvctl stop nodeapps -n ofs00mlctsc01
[email protected]:~ $> crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora....scdb.db application    ONLINE    ONLINE    ofs0...sc02
ora....b1.inst application    ONLINE    ONLINE    ofs0...sc01
ora....b2.inst application    ONLINE    ONLINE    ofs0...sc02
ora....SM1.asm application    ONLINE    ONLINE    ofs0...sc01
ora....01.lsnr application    OFFLINE   OFFLINE
ora....c01.gsd application    OFFLINE   OFFLINE
ora....c01.ons application    OFFLINE   OFFLINE
ora....c01.vip application    OFFLINE   OFFLINE
ora....SM2.asm application    ONLINE    ONLINE    ofs0...sc02
ora....02.lsnr application    ONLINE    ONLINE    ofs0...sc02
ora....c02.gsd application    ONLINE    ONLINE    ofs0...sc02
ora....c02.ons application    ONLINE    ONLINE    ofs0...sc02
ora....c02.vip application    ONLINE    ONLINE    ofs0...sc02
[email protected]:~ $> srvctl modify nodeapps -n ofs00mlctsc01 -o /app/oracle/product/10.2 -A 10.99.32.11/255.255.255.0/bnx0\|bnx1
PRKO-2117 : This command should be executed as the system privilege user.
这个命令需要用root执行
[email protected]:~ $> su - root
Password:
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
You have new mail.
-bash-3.00# /app/oracle/product/10.2/bin/srvctl modify nodeapps -n ofs00mlctsc01 -o /app/oracle/product/10.2 -A 10.99.32.11/255.255.255.0/bnx0\|bnx1
****ORACLE_HOME environment variable not set!
    ORACLE_HOME should be set to the main
    directory that contains Oracle products.
    Set and export ORACLE_HOME, then re-run.
需要先设备ORACLE_HOME环境变量
-bash-3.00# export ORACLE_HOME=/app/oracle/product/10.2
-bash-3.00# /app/oracle/product/10.2/bin/srvctl modify nodeapps -n ofs00mlctsc01 -o /app/oracle/product/10.2 -A 10.99.32.11/255.255.255.0/bnx0\|bnx1
-bash-3.00# exit
logout
  • 检查并启动nodeapps的配置
[email protected]:~ $> srvctl config nodeapps -n ofs00mlctsc01 -a
VIP exists.: /ofs00mlctsc01-vip/10.99.32.11/255.255.255.0/bnx0:bnx1
[email protected]:~ $> srvctl config nodeapps -n ofs00mlctsc01
ofs00mlctsc01 mlctscdb1 /app/oracle/product/10.2

[email protected]:~ $> srvctl start nodeapps -n ofs00mlctsc01
[email protected]:~ $> crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora....scdb.db application    ONLINE    ONLINE    ofs0...sc02
ora....b1.inst application    ONLINE    ONLINE    ofs0...sc01
ora....b2.inst application    ONLINE    ONLINE    ofs0...sc02
ora....SM1.asm application    ONLINE    ONLINE    ofs0...sc01
ora....01.lsnr application    ONLINE    ONLINE    ofs0...sc01
ora....c01.gsd application    ONLINE    ONLINE    ofs0...sc01
ora....c01.ons application    ONLINE    ONLINE    ofs0...sc01
ora....c01.vip application    ONLINE    ONLINE    ofs0...sc01
ora....SM2.asm application    ONLINE    ONLINE    ofs0...sc02
ora....02.lsnr application    ONLINE    ONLINE    ofs0...sc02
ora....c02.gsd application    ONLINE    ONLINE    ofs0...sc02
ora....c02.ons application    ONLINE    ONLINE    ofs0...sc02
ora....c02.vip application    ONLINE    ONLINE    ofs0...sc02 

[email protected]:~ $> ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
bnx0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 10.99.32.10 netmask ffffff00 broadcast 10.99.32.255
        groupname prod-ipmp
bnx0:1: flags=1040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4> mtu 1500 index 2
        inet 10.99.32.11 netmask ffffff00 broadcast 10.99.32.255
bnx1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
        groupname prod-ipmp
bnx2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 4
        inet 192.168.5.10 netmask ffffff00 broadcast 192.168.5.255
        groupname priv-ipmp
bnx3: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 5
        inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
        groupname priv-ipmp

修改了OCR中的配置以后,VIP回到了bnx0上。

节点2修改过程与节点1类似

[email protected]:~ $> crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora....scdb.db application    ONLINE    ONLINE    ofs0...sc02
ora....b1.inst application    ONLINE    ONLINE    ofs0...sc01
ora....b2.inst application    ONLINE    ONLINE    ofs0...sc02
ora....SM1.asm application    ONLINE    ONLINE    ofs0...sc01
ora....01.lsnr application    ONLINE    ONLINE    ofs0...sc01
ora....c01.gsd application    ONLINE    ONLINE    ofs0...sc01
ora....c01.ons application    ONLINE    ONLINE    ofs0...sc01
ora....c01.vip application    ONLINE    ONLINE    ofs0...sc01
ora....SM2.asm application    ONLINE    ONLINE    ofs0...sc02
ora....02.lsnr application    ONLINE    ONLINE    ofs0...sc02
ora....c02.gsd application    ONLINE    ONLINE    ofs0...sc02
ora....c02.ons application    ONLINE    ONLINE    ofs0...sc02
ora....c02.vip application    ONLINE    ONLINE    ofs0...sc02 

[email protected]:~ $> srvctl config nodeapps -n ofs00mlctsc02
ofs00mlctsc02 mlctscdb2 /app/oracle/product/10.2
[email protected]:~ $> srvctl config nodeapps -n ofs00mlctsc02 -a
VIP exists.: /ofs00mlctsc02-vip/10.99.32.21/255.255.255.0/bnx1
[email protected]:~ $> crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora....scdb.db application    ONLINE    ONLINE    ofs0...sc02
ora....b1.inst application    ONLINE    ONLINE    ofs0...sc01
ora....b2.inst application    ONLINE    ONLINE    ofs0...sc02
ora....SM1.asm application    ONLINE    ONLINE    ofs0...sc01
ora....01.lsnr application    ONLINE    ONLINE    ofs0...sc01
ora....c01.gsd application    ONLINE    ONLINE    ofs0...sc01
ora....c01.ons application    ONLINE    ONLINE    ofs0...sc01
ora....c01.vip application    ONLINE    ONLINE    ofs0...sc01
ora....SM2.asm application    ONLINE    ONLINE    ofs0...sc02
ora....02.lsnr application    OFFLINE   OFFLINE
ora....c02.gsd application    OFFLINE   OFFLINE
ora....c02.ons application    OFFLINE   OFFLINE
ora....c02.vip application    OFFLINE   OFFLINE               

[email protected]:~ $> su - root
Password:
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
You have new mail.
-bash-3.00# export ORACLE_HOME=/app/oracle/product/10.2
-bash-3.00# /app/oracle/product/10.2/bin/srvctl modify nodeapps -n ofs00mlctsc02 -o /app/oracle/product/10.2 -A 10.99.32.21/255.255.255.0/bnx0\|bnx1
-bash-3.00# exit
logout
[email protected]:~ $> srvctl start nodeapps -n ofs00mlctsc02

[email protected]:~ $> crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora....scdb.db application    ONLINE    ONLINE    ofs0...sc02
ora....b1.inst application    ONLINE    ONLINE    ofs0...sc01
ora....b2.inst application    ONLINE    ONLINE    ofs0...sc02
ora....SM1.asm application    ONLINE    ONLINE    ofs0...sc01
ora....01.lsnr application    ONLINE    ONLINE    ofs0...sc01
ora....c01.gsd application    ONLINE    ONLINE    ofs0...sc01
ora....c01.ons application    ONLINE    ONLINE    ofs0...sc01
ora....c01.vip application    ONLINE    ONLINE    ofs0...sc01
ora....SM2.asm application    ONLINE    ONLINE    ofs0...sc02
ora....02.lsnr application    ONLINE    ONLINE    ofs0...sc02
ora....c02.gsd application    ONLINE    ONLINE    ofs0...sc02
ora....c02.ons application    ONLINE    ONLINE    ofs0...sc02
ora....c02.vip application    ONLINE    ONLINE    ofs0...sc02
[email protected]:~ $> ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
bnx0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 10.99.32.20 netmask ffffff00 broadcast 10.99.32.255
        groupname prod-ipmp
bnx0:1: flags=1040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4> mtu 1500 index 2
        inet 10.99.32.21 netmask ffffff00 broadcast 10.99.32.255
bnx1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
        groupname prod-ipmp
bnx2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 4
        inet 192.168.5.20 netmask ffffff00 broadcast 192.168.5.255
        groupname priv-ipmp
bnx3: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 5
        inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
        groupname priv-ipmp
在修改过程中并未停止数据库,因此此操作应该是可以在线做。不过在操作过程中listener和VIP会被停掉,这一点需要注意。
时间: 2024-12-23 21:39:34

Oracle 10g RAC 如何配置 VIP IPMP的相关文章

Solaris 10(x86)构建Oracle 10g RAC之--配置系统环境(2)

Solaris 10(x86)构建Oracle 10g RAC之--配置系统环境(2) 系统环境: 操作系统:Solaris 10(x86-64) Cluster: Oracle CRS 10.2.0.1.0 Oracle:  Oracle 10.2.0.1.0 如图所示:RAC 系统架构 一.建立主机之间的信任关系(在所有node) 1.配置主机hosts.equiv文件 [[email protected]:/]# cat /etc/hosts.equiv  node1  root node

Solaris 10(x86)构建Oracle 10g RAC之--配置系统环境(1)

系统环境: 操作系统:Solaris 10(x86-64) Cluster: Oracle CRS 10.2.0.1.0 Oracle:  Oracle 10.2.0.1.0 如图所示:RAC 系统架构 一.操作系统环境 1.网络配置(在所有节点) [[email protected]:/]# cat /etc/inet/ipnodes  # # Internet host table # ::1     localhost        127.0.0.1       localhost   

Oracle 10g RAC修改IP/VIP地址示例

一.准备工作 1. 数据库信息 操作系统版本  : OEL5.4 x64   数据库版本    : Oracle 10.2.0.5 x64 RAC 2. IP地址对应信息 说明: 服务器主机名不能更改,如确实要改名,需要重装CRS解决,还不如重新安装呢.   本文环境是10g rac+ocfs+asm,心跳地址不变,IP地址因环境限制暂时采用同一个网段,不同的IP地址,但是过程与不同网段改名一致. 原IP地址:    192.168.0.6         node1         修改为:

Oracle 10g RAC之配置时间同步(NTP)

所有节点的时间必须同步,这通常是通过配置NTP服务器实现的.如果用户的网络中已经有一台时间服务器,那么可以所有节点都指向它,否则可以从集群中挑选一个节点作为时间服务器,让其他节点与它同步.下面分别演示这两种方法: (1)如果公司网络中已经有一台时间服务器如:192.168.11.10是一台ntp时间服务器此时NTP服务器的配置文件是/etc/ntp.conf,在每个节点编辑这个文件.[[email protected] ~]# vi /etc/ntp.conf编辑后的内容如下,首选公司的时间服务

oracle 10g rac 修改public ip、vip和private ip

oracle 10g rac 修改public ip.vip和private ip [TOC] 1.IP地址规划 Hostname 当前IP 修改后IP Public IP node1 192.168.56.20 192.168.100.20 Public IP node2 192.168.56.21 192.168.100.21 VIP node1-vip 192.168.56.98 192.168.100.98 VIP node2-vip 192.168.56.99 192.168.100.

RedHat EL5 安装Oracle 10g RAC之--系统环境配置(1)

RedHat EL5 安装Oracle 10g RAC之--系统环境配置(1) 系统环境: 操作系统:RedHat EL5 Cluster: Oracle CRS 10.2.0.1.0 Oracle:  Oracle 10.2.0.1.0 如图所示:RAC 系统架构 一.操作系统环境 1.网络配置(在所有节点) [[email protected] ~]# cat /etc/hosts # Do not remove the following line, or various programs

RedHat EL5 安装Oracle 10g RAC之--系统环境配置(2)

RedHat EL5 安装Oracle 10g RAC之--系统环境配置(2) 系统环境: 操作系统:RedHat EL5 Cluster: Oracle CRS 10.2.0.1.0 Oracle:  Oracle 10.2.0.1.0 如图所示:RAC 系统架构 6.通过SSH配置主机间的信任关系 node1: [[email protected] ~]$ mkdir .ssh [[email protected] ~]$ ssh-keygen -t rsa Generating publi

AIX 5.3下Oracle 10g RAC 启动故障--CRS启动失败

AIX 5.3下Oracle 10g RAC 启动故障--CRS启动失败 系统环境: 操作系统: AIX 5300-09 集群软件: CRS 10.2.0.1 数据库:   Oracle 10.2.0.1                     系统架构图 故障现象: 系统重启后,在节点上CRS 启动失败或CRS服务启动成功,CRS Resource无法ONLINE. [[email protected] racg] cat /etc/hosts 127.0.0.1              

【转】Oracle 10g RAC TAF

本人转自:http://www.cnblogs.com/future2012lg/archive/2013/10/12/3365978.html Oracle RAC 同一时候具备HA(High Availiablity) 和LB(LoadBalance). 而其高可用性的基础就是Failover(故障转移). 它指集群中不论什么一个节点 的故障都不会影响用户的使用,连接到故障节点的用户会被自己主动转移到健康节点,从用户感受而言, 是感觉不到这样的切换. Oracle 10g RAC 的Fail