首页 > 代码库 > Oracle 10g RAC 如何配置 VIP IPMP
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当前情况
oracle@ofs00mlctsc01:~ $> srvctl config nodeapps -n ofs00mlctsc01 -aVIP exists.: /ofs00mlctsc01-vip/10.99.32.11/255.255.255.0/bnx1
oracle@ofs00mlctsc01:~ $> srvctl config nodeapps -n ofs00mlctsc01ofs00mlctsc01 mlctscdb1 /app/oracle/product/10.2
oracle@ofs00mlctsc01:~ $> ifconfig -alo0: 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-ipmpbnx1: 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-ipmpbnx1:1: flags=1040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4> mtu 1500 index 3 inet 10.99.32.11 netmask ffffff00 broadcast 10.99.32.255bnx2: 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-ipmpbnx3: 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 -tName 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 -tName 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\|bnx1PRKO-2117 : This command should be executed as the system privilege user.这个命令需要用root执行
oracle@ofs00mlctsc01:~ $> su - rootPassword: Sun Microsystems Inc. SunOS 5.10 Generic January 2005You 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# exitlogout
- 检查并启动nodeapps的配置
oracle@ofs00mlctsc01:~ $> srvctl config nodeapps -n ofs00mlctsc01 -aVIP exists.: /ofs00mlctsc01-vip/10.99.32.11/255.255.255.0/bnx0:bnx1
oracle@ofs00mlctsc01:~ $> srvctl config nodeapps -n ofs00mlctsc01ofs00mlctsc01 mlctscdb1 /app/oracle/product/10.2oracle@ofs00mlctsc01:~ $> srvctl start nodeapps -n ofs00mlctsc01
oracle@ofs00mlctsc01:~ $> crs_stat -tName 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 -alo0: 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-ipmpbnx0:1: flags=1040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4> mtu 1500 index 2 inet 10.99.32.11 netmask ffffff00 broadcast 10.99.32.255bnx1: 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-ipmpbnx2: 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-ipmpbnx3: 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 -tName 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 ofs00mlctsc02ofs00mlctsc02 mlctscdb2 /app/oracle/product/10.2
oracle@ofs00mlctsc02:~ $> srvctl config nodeapps -n ofs00mlctsc02 -aVIP exists.: /ofs00mlctsc02-vip/10.99.32.21/255.255.255.0/bnx1
oracle@ofs00mlctsc02:~ $> crs_stat -tName 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 2005You 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# exitlogoutoracle@ofs00mlctsc02:~ $> srvctl start nodeapps -n ofs00mlctsc02oracle@ofs00mlctsc02:~ $> crs_stat -tName 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 -alo0: 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-ipmpbnx0:1: flags=1040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4> mtu 1500 index 2 inet 10.99.32.21 netmask ffffff00 broadcast 10.99.32.255bnx1: 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-ipmpbnx2: 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-ipmpbnx3: 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
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。