码迷,mamicode.com
首页 > 数据库 > 详细

Oracle 10g RAC 如何配置 VIP IPMP

时间:2014-09-05 12:41:11      阅读:254      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   os   io   使用   ar   for   数据   

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当前情况
oracle@ofs00mlctsc01:~ $> srvctl config nodeapps -n ofs00mlctsc01 -a
VIP exists.: /ofs00mlctsc01-vip/10.99.32.11/255.255.255.0/bnx1
oracle@ofs00mlctsc01:~ $> srvctl config nodeapps -n ofs00mlctsc01
ofs00mlctsc01 mlctscdb1 /app/oracle/product/10.2
oracle@ofs00mlctsc01:~ $> 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
oracle@ofs00mlctsc01:~ $> 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设置
oracle@ofs00mlctsc01:~ $> srvctl stop nodeapps -n ofs00mlctsc01
oracle@ofs00mlctsc01:~ $> 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 
oracle@ofs00mlctsc01:~ $> 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执行
oracle@ofs00mlctsc01:~ $> 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的配置
oracle@ofs00mlctsc01:~ $> srvctl config nodeapps -n ofs00mlctsc01 -a
VIP exists.: /ofs00mlctsc01-vip/10.99.32.11/255.255.255.0/bnx0:bnx1
oracle@ofs00mlctsc01:~ $> srvctl config nodeapps -n ofs00mlctsc01
ofs00mlctsc01 mlctscdb1 /app/oracle/product/10.2

oracle@ofs00mlctsc01:~ $> srvctl start nodeapps -n ofs00mlctsc01
oracle@ofs00mlctsc01:~ $> 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 

oracle@ofs00mlctsc01:~ $> 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类似

oracle@ofs00mlctsc02:~ $> 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 
 
oracle@ofs00mlctsc02:~ $> srvctl config nodeapps -n ofs00mlctsc02
ofs00mlctsc02 mlctscdb2 /app/oracle/product/10.2
oracle@ofs00mlctsc02:~ $> srvctl config nodeapps -n ofs00mlctsc02 -a
VIP exists.: /ofs00mlctsc02-vip/10.99.32.21/255.255.255.0/bnx1
oracle@ofs00mlctsc02:~ $> 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               

oracle@ofs00mlctsc02:~ $> 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
oracle@ofs00mlctsc02:~ $> srvctl start nodeapps -n ofs00mlctsc02

oracle@ofs00mlctsc02:~ $> 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 
oracle@ofs00mlctsc02:~ $> 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会被停掉,这一点需要注意。

Oracle 10g RAC 如何配置 VIP IPMP

标签:style   blog   color   os   io   使用   ar   for   数据   

原文地址:http://www.cnblogs.com/cqubityj/p/3957639.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!