RAC 11.2.0.3 修改VIP地址

snowdba發表於2014-07-10

停止監聽器和VIP資源
[root@node1 ~]# crsctl stop resource ora.node1.vip -f
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'node1'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'node1' succeeded
CRS-2673: Attempting to stop 'ora.node1.vip' on 'node1'
CRS-2677: Stop of 'ora.node1.vip' on 'node1’ succeeded

[root@node2 ~]# crsctl stop resource ora.node2.vip -f
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'node2'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'node2' succeeded
CRS-2673: Attempting to stop 'ora.node2.vip' on 'node2'
CRS-2677: Stop of 'ora.node2.vip' on 'node2’ succeeded

修改VIP資源
[root@node1 ~]# srvctl modify nodeapps -A 192.168.1.177/255.255.255.0/eth0 -n node1
[root@node1 ~]# srvctl modify nodeapps -A 192.168.1.179/255.255.255.0/eth0 -n node2

啟動VIP
[root@node1 ~]# crsctl start resource ora.node1.vip
CRS-2672: Attempting to start 'ora.node1.vip' on 'node1'
CRS-2676: Start of 'ora.node1.vip' on 'node1’ succeeded

[root@node2 ~]# crsctl start resource ora.node2.vip
CRS-2672: Attempting to start 'ora.node2.vip' on 'node2'
CRS-2676: Start of 'ora.node2.vip' on 'node2’ succeeded

啟動本地監聽
[root@node1 ~]# crsctl start res ora.LISTENER.lsnr
CRS-2672: Attempting to start 'ora.LISTENER.lsnr' on 'node1'
CRS-2672: Attempting to start 'ora.LISTENER.lsnr' on 'node2'
CRS-2676: Start of 'ora.LISTENER.lsnr' on 'node1' succeeded
CRS-2676: Start of 'ora.LISTENER.lsnr' on 'node2’ succeeded

修改local_listener引數
[oracle@node1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jul 10 19:38:40 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SYS@PROD1> show parameter local_listener

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
local_listener                       string      (DESCRIPTION=(ADDRESS_LIST=(AD
                                                 DRESS=(PROTOCOL=TCP)(HOST=192.
                                                 168.1.172)(PORT=1521))))

SYS@PROD1> alter system set local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.177)(PORT=1521))))' scope=both sid='PROD1';

System altered.

SYS@PROD1> alter system set local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.179)(PORT=1521))))' scope=both sid='PROD2';

System altered.

檢視網路卡設定資訊
[root@node1 ~]# ifconfig eth0:1
eth0:1    Link encap:Ethernet  HWaddr 08:00:27:F4:8E:06 
          inet addr:192.168.1.177  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

[root@node2 ~]# ifconfig eth0:1
eth0:1    Link encap:Ethernet  HWaddr 08:00:27:9D:01:9A 
          inet addr:192.168.1.179  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

修改/etc/hosts
192.168.1.171   node1   node1.oracle.com
##192.168.1.172   node1-vip
192.168.1.177   node1-vip

192.168.1.173   node2   node2.oracle.com
##192.168.1.174   node2-vip
192.168.1.179   node2-vip

192.168.1.176   node-cluster node-cluster-scan

172.168.1.191   node1-priv
172.168.1.192   node2-priv

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29047826/viewspace-1216046/,如需轉載,請註明出處,否則將追究法律責任。

相關文章