2009年02月25日
11g RAC change VIP ip
在做11G RAC習題時發現VIP設錯了,小記一下心得跟注意事項
修改流程參考 :http://orcl-experts.info/index.php?name=FAQ&id_cat=9
1、先說一下要修改的IP
10.1.2.140 c140.binhu.com.tw c140 <==我的PUBLIC IP
192.168.2.140 p140.binhu.com.tw p140 <==我的PRIVATE IP
#192.168.2.150 v150.binhu.com.tw v150 <==設錯的VIP IP
10.1.2.150 v150.binhu.com.tw v150 <==這才是我要的VIP IP
2、ifconfig
3、查看現在的情況
note:-s -l 這個 "l "是小寫的L,暫時不解為何用 c140.binhu.com.tw不能,而c140才行 =.="
4、進行修改
note:本以為這行應該很簡單的才對,後來還是遇到問題了,原來是權限不夠,但又很怪,給的owner是oracle,那很直覺就是用oracle執行了,反正這裏就要用 root 執行
5、重起 crs
6、等個一下,再次下 ifconfig
NOTE:是成功出現了,但原來舊的並沒有自動消失~~Orz,好吧只要手動刪除了,可用 ifconfig eth0:1 down / ifconfig eth0:2 down,再重做一次流程5 就可了
心得:為了必免 oracle / root 交換,建議全用 root 操作,並且注意 srvctl 指令的目錄應該為 CRS_HOME才對!!
1、先說一下要修改的IP
10.1.2.140 c140.binhu.com.tw c140 <==我的PUBLIC IP
192.168.2.140 p140.binhu.com.tw p140 <==我的PRIVATE IP
#192.168.2.150 v150.binhu.com.tw v150 <==設錯的VIP IP
10.1.2.150 v150.binhu.com.tw v150 <==這才是我要的VIP IP
2、ifconfig
| eth0 Link encap:Ethernet HWaddr 00:16:3E:0A:CF:8F inet addr:10.1.2.140 Bcast:10.1.2.255 Mask:255.255.255.0 inet6 addr: fe80::216:3eff:fe0a:cf8f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:12580965 errors:0 dropped:141 overruns:0 frame:0 TX packets:12815671 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:4108744045 (3.8 GiB) TX bytes:2364466592 (2.2 GiB) Interrupt:193 Base address:0x8000 eth0:1 Link encap:Ethernet HWaddr 00:16:3E:0A:CF:8F inet addr:192.168.2.150 Bcast:192.168.2.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:193 Base address:0x8000 eth1 Link encap:Ethernet HWaddr 00:16:3E:31:53:E6 inet addr:192.168.2.140 Bcast:192.168.2.255 Mask:255.255.255.0 inet6 addr: fe80::216:3eff:fe31:53e6/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:752658 errors:0 dropped:0 overruns:0 frame:0 TX packets:58 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:577722066 (550.9 MiB) TX bytes:4004 (3.9 KiB) Interrupt:201 Base address:0xe100 |
3、查看現在的情況
| [oracle@c140 pfile]$ srvctl config nodeapps -n c140.binhu.com.tw -a -g -s -l PRKO-2006 : Invalid node name: c140.binhu.com.tw [oracle@c140 pfile]$ ping c140 PING c140.binhu.com.tw (10.1.2.140) 56(84) bytes of data. 64 bytes from c140.binhu.com.tw (10.1.2.140): icmp_seq=0 ttl=64 time=0.064 ms --- c140.binhu.com.tw ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.064/0.064/0.064/0.000 ms, pipe 2 [oracle@c140 pfile]$ srvctl config nodeapps -n c140 -a -g -s -l VIP exists.: /v150/10.1.2.150/255.255.255.0/eth0 GSD exists. ONS daemon exists. Listener exists. |
4、進行修改
| [oracle@c140 pfile]$ srvctl modify nodeapps -n c140 -A 10.1.2.150/255.255.255.0/eth0 PRKO-2117 : This command should be executed as the system privilege user. [root@c140 bin]# ls -al srvctl -rwxr-x--x 1 oracle dba 6884 Feb 24 22:12 srvctl [root@c140 bin]# ./srvctl modify nodeapps -n c140 -A 10.1.2.150/255.255.255.0/eth0 |
5、重起 crs
| [root@c140 bin]# /etc/init.d/init.crs stop Shutting down Oracle Cluster Ready Services (CRS): Feb 25 22:35:42.044 | INF | daemon shutting down Stopping resources. This could take several minutes. Successfully stopped Oracle Clusterware resources Stopping Cluster Synchronization Services. Shutting down the Cluster Synchronization Services daemon. Shutdown request successfully issued. Shutdown has begun. The daemons should exit soon. [root@c140 bin]# /etc/init.d/init.crs start Startup will be queued to init within 30 seconds. |
6、等個一下,再次下 ifconfig
| [root@c140 ~]# ifconfig eth0 Link encap:Ethernet HWaddr 00:16:3E:0A:CF:8F inet addr:10.1.2.140 Bcast:10.1.2.255 Mask:255.255.255.0 inet6 addr: fe80::216:3eff:fe0a:cf8f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:12631235 errors:0 dropped:141 overruns:0 frame:0 TX packets:12863161 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:4137890086 (3.8 GiB) TX bytes:2378683983 (2.2 GiB) Interrupt:193 Base address:0x8000 eth0:1 Link encap:Ethernet HWaddr 00:16:3E:0A:CF:8F inet addr:192.168.2.150 Bcast:192.168.2.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:193 Base address:0x8000 eth0:2 Link encap:Ethernet HWaddr 00:16:3E:0A:CF:8F inet addr:10.1.2.150 Bcast:10.1.2.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:193 Base address:0x8000 eth1 Link encap:Ethernet HWaddr 00:16:3E:31:53:E6 inet addr:192.168.2.140 Bcast:192.168.2.255 Mask:255.255.255.0 inet6 addr: fe80::216:3eff:fe31:53e6/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:752678 errors:0 dropped:0 overruns:0 frame:0 TX packets:58 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:577723169 (550.9 MiB) TX bytes:4004 (3.9 KiB) Interrupt:201 Base address:0xe100 |
心得:為了必免 oracle / root 交換,建議全用 root 操作,並且注意 srvctl 指令的目錄應該為 CRS_HOME才對!!
引用URL
http://cgi.blog.roodo.com/trackback/8377519