设为首页 加入收藏

TOP

10g下修改RAC地址(一)
2015-07-24 11:55:23 来源: 作者: 【 】 浏览:10
Tags:10g 修改 RAC 地址

本测试是基于oracle 10.2.0.5

SQL*Plus: Release 10.2.0.5.0 - Production on Tue Jul 29 20:45:16 2014

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> 
首先来看一下,使用到的命令
[root@node1 bin]# ./oifcfg -help

Name:
	oifcfg - Oracle Interface Configuration Tool.

Usage:  oifcfg iflist [-p [-n]]
	oifcfg setif {-node  | -global} {/:}...
	oifcfg getif [-node  | -global] [ -if [/] [-type ] ]
	oifcfg delif [-node  | -global] [[/]]
	oifcfg [-help]

	 - name of the host, as known to a communications network
	  - name by which the interface is configured in the system
	   - subnet address of the interface
	  - type of the interface { cluster_interconnect | public | storage }
使用范例
查看网口信息
$ oifcfg iflist
ce0 172.25.0.0
ce0 172.25.198.0
ce1 10.0.0.0
查看私有网口信息
$ oifcfg iflist -p
ce0 172.25.0.0 PRIVATE
ce0 172.25.198.0 PRIVATE
ce1 10.0.0.0 PRIVATE
查看私有网口信息并显示掩码
$ oifcfg iflist -p -n
ce0 172.25.0.0 PRIVATE 255.255.0.0
ce0 172.25.198.0 PRIVATE 255.255.255.0
ce1 10.0.0.0 PRIVATE 255.255.255.0
查看当前节点的网口信息
$ oifcfg getif
eth0 192.168.0.0 global cluster_interconnect
eth1 192.168.2.0 global public
查看public类型的网卡
$ oifcfg getif -type public
eth1 192.168.2.0 global public
查看eth0的网卡信息
$ oifcfg getif -if eth0
eth0 192.168.0.0 global cluster_interconnect
查看node类型的配置信息,没有输出说明没有配置node类型
$ oifcfg getif -node czmmiao1
$ oifcfg getif -node czmmiao2
删除接口配置,需要切换到root用户
# ./oifcfg delif–global
添加接口配置,需要切换到root用户
# ./oifcfg setif -global eth0/192.168.1.119:public

# ./oifcfg setif -global eth1/10.85.10.119:cluster_interconnect

修改RAC ip实例
RAC 修改IP 这个操作本身也只有几步操作, 但是它涉及到OCR。 所以要格外小心。一般来说,如果不是必须要修改的话,尽量不要去修改OCR 的东西。 稳定第一。 在做之前,要手动的OCR 进行一个备份, 这样即使修改失败,也能还原回来。 OCR的备份。另外,Public/Private对应的的主机名不能更改,如果确实需要更改主机名,需要重新安装CRS。
实验对IP 地址做如下修改:
Public IP 10.85.10.119/121 -- > 10.85.10.219/221
Privite IP 192.168.1.119/121 -- > 192.168.1.219/221
Virtual IP 10.85.10.122/123 -- > 10.85.10.222/223
修改 /etc/hosts 文件。 保持2个节点的一致
# vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost

10.85.10.219 raw1
10.85.10.221 raw2

192.168.1.219 raw1-priv
192.168.1.221 raw2-priv

10.85.10.222 raw1-vip
10.85.10.223 raw2-vip
在两个节点上分别修改eth0和eth1地址:
raw1
# more /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
IPADDR=10.85.10.219
NETMASK=255.255.255.0
ONBOOT=yes
GATEWAY=10.85.10.253

# more /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
IPADDR=10.85.10.221
NETMASK=255.255.255.0
ONBOOT=yes
GATEWAY=10.85.10.253

raw2
# more /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=static
IPADDR=192.168.1.219
NETMASK=255.255.255.0
ONBOOT=yes
GATEWAY=192.168.1.1

# more /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=static
IPADDR=192.168.1.221
NETMASK=255.255.255.0
ONBOOT=yes
GATEWAY=192.168.1.1
在两个节点上分别重启网络服务,是修改的IP生效。
raw1,raw2
# service network restart
启动crs, 设置oracle中ip地址相关的设置.
在两个节点启动crs, 并关闭随crs启动的应用程序
# /etc/init.d/init.crs start
Startup will be queued to init within 90 seconds.
# /etc/init.d/init.crs start
Startup will be qu
首页 上一页 1 2 3 下一页 尾页 1/3/3
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇干货分享:DBA专家门诊一期:索引.. 下一篇memcached状态分析

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·如何理解智能指针? (2025-12-24 12:48:26)
·c++是否应避免使用普 (2025-12-24 12:48:23)
·如何通俗易懂学会 C+ (2025-12-24 12:48:21)
·在 C 语言函数中,如 (2025-12-24 12:19:41)
·C盘里面的AppData文 (2025-12-24 12:19:38)