您的位置:首页 > 数据库 > Oracle

Modify the VIP or VIP Hostname for a 10g Oracle Clusterware

2010-10-12 10:14 513 查看
Modify the VIP or VIP Hostname for a 10g Oracle Clusterware,有时候我们可能需要修改vip地址或对应的vip

主机名,而我这次在安装rac过程中,运行vipca时,把私有IP当成VIP来使用,导致在启动vip服务时启动不了

hosts里面内容如下:

[oracle@RAC1 ~]$ more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost
138.30.0.101 rac1
138.30.0.102 rac2
138.30.0.201 rac1-vip
138.30.0.202 rac2-vip
100.100.1.1 rac1-priv
100.100.1.2 rac2-priv

在vipca安装过程中日志提示

2009-05-31 14:33:44.212: [ RACG][3067446976] [2411][3067446976][ora.rac1.vip]: IP:100.100.1.1 is already up in the network (host=RAC1)

[oracle@RAC1 ~]$ crs_stat -t
Name Type Target State Host
----------------------------------------------------------
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE OFFLINE
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE OFFLINE

可以看到vip服务资源offline

从metalink上找到一篇文章,可以用srvctl工具来修改vip地址的,下面是具体测试过程

Changing VIP Addresses
Use the following procedure to change a VIP address:
1. Stop all database and ASM instances.
2. Stop the Listeners, and node applications using the srvctl stop nodeapps
command.
3. Run the following command to verify node connectivity between all of the nodes
for which your cluster is configured. This command discovers all of the network
interfaces available on the cluster nodes and verifies the connectivity between all
of the nodes by way of the discovered interfaces. This command also lists all of the
interfaces available on the nodes which are suitable for use as VIPs.
cluvfy comp nodecon -n all [-verbose]
4. Run the srvctl modify nodeapps command with the -A option as described
in Appendix E. Use the crs_stat command to identify all active node
applications.
5. Restart all of the instances and node applications that you stopped in Step 1 and 2.

[oracle@RAC1 ~]$ srvctl stop nodeapps -n rac1

[oracle@RAC1 ~]$ srvctl stop nodeapps -n rac2

[root@RAC1 bin]#./srvctl modify nodeapps -n rac1 -A 138.30.0.201/255.255.255.0/eth0
[root@RAC1 bin]#./srvctl modify nodeapps -n rac2 -A 138.30.0.202/255.255.255.0/eth0

[root@RAC1 bin]# su - oracle
[oracle@RAC1 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.rac1.gsd application OFFLINE OFFLINE
ora.rac1.ons application OFFLINE OFFLINE
ora.rac1.vip application OFFLINE OFFLINE
ora.rac2.gsd application OFFLINE OFFLINE
ora.rac2.ons application OFFLINE OFFLINE
ora.rac2.vip application OFFLINE OFFLINE
[oracle@RAC1 ~]$ srvctl start nodeapps -n rac1
[oracle@RAC1 ~]$ srvctl start nodeapps -n rac2
[oracle@RAC1 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2

[root@RAC1 db_1]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:59:C5:40
inet addr:138.30.0.101 Bcast:138.30.0.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe59:c540/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:367945 errors:0 dropped:0 overruns:0 frame.:0
TX packets:1788789 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:25845604 (24.6 MiB) TX bytes:2599705197 (2.4 GiB)
Interrupt:185 Base address:0x1480

eth0:1 Link encap:Ethernet HWaddr 00:0C:29:59:C5:40
inet addr:138.30.0.201 Bcast:138.30.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:185 Base address:0x1480

eth1 Link encap:Ethernet HWaddr 00:0C:29:59:C5:4A
inet addr:100.100.1.1 Bcast:100.100.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe59:c54a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
-Boc/X:E;qU7u0 RX packets:32104 errors:0 dropped:0 overruns:0 frame.:0I
TX packets:34955 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:11024742 (10.5 MiB) TX bytes:17588443 (16.7 MiB)
Interrupt:193 Base address:0x1800

可以看到vip地址已经修改成功。

from:http://space.itpub.net/7199859/viewspace-604545
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐