Oracle Rac 修改vip scan ip

本文详细介绍Oracle RAC环境中公共IP、VIP及SCAN IP的修改流程,包括停启集群资源、修改网络配置、DNS更新等关键步骤,确保迁移过程顺利进行。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

方案:选择同一网段,不同ip地址

需求:需要网络工程师规划两组ip(一组用于备库rac,另一组用于修改ip时,将报表库的ip替换出来,本次迁移建议不做私有ip的修改)

-------------------------------------------------------------------以一节点修改public ip实验测试------------------------------------------------------------------------
源:192.168.56.20 rc1

将现有ip:192.168.56.20替换成ip:192.168.56.51

参考metalink 文档 ID 276434.1
If the change is only public IP or VIP address and the new ones are still in the same subnet, same interface, or if the change is only for public IP MAC address, IP/interface/subnet/netmask all remain the same, nothing needs to be done at clusterware layer, all changes need to be done at OS layer to reflect the change.

  1. Shutdown Oracle Clusterware stack
  2. Modify the IP address at network layer, DNS and /etc/hosts file to reflect the change or modify the MAC address at network layer
  3. Restart Oracle Clusterware stack

操作:
1、crsctl stop crs
2、/etc/hosts
3、修改物理网卡的ip地址
####setup设置网卡网络:/etc/sysconfig/network-scripts/ifcfg-eth0
4、修改ip后需要重新连接打开新的窗口

测试结果:成功,风险小

------------------------------------------------------------------修改 VIP-----------------------------------------------------------------------------------------------
参考文档:metalink ID 276434.1
测试:192.168.56.21 替换成192.168.56.28
1、获取vip配置信息(Grid Infrastructure owner:)

$ srvctl config nodeapps -a

2、确认vip状态是 ONLINE
$ crsctl stat res -t

3、Stop the nodeapps resources
as Grid Infrastructure owner:

$ srvctl stop instance -d RACDB -n racnode1 —确认db以切换到另一节点
$ srvctl stop vip -n racnode1 -f
4、Verify VIP is now OFFLINE
$crs_stat -t

5、确认新的vip地址,并提前将vip信息更新的/etc/hosts内(Determine the new VIP IP/subnet/netmask or VIP hostname, make the network change on OS first, ensure the new VIP is registered in DNS or modified in /etc/hosts)

6、修改vip as root user(以grid环境变量,root执行)
srvctl modify nodeapps -n racnode1 -A racnode1-nvip/255.255.255.0/eth2

7、验证是否修改成功
$ srvctl config nodeapps -n racnode1 -a

Restarting Resources
8. Start the nodeapps and the other resources
eg,
$ srvctl start vip -n racnode1
$ srvctl start listener -n racnode1
$ srvctl start instance -d RACDB -n racnode1

  1. Verify the new VIP is ONLINE
    $ crs_stat -t

10、同样的步骤修改其他节点

  1. 修改listener.ora, tnsnames.ora and LOCAL_LISTENER/REMOTE_LISTENER parameter to reflect the VIP change if necessary)

------------------------------------------------------------------修改 scan ip-----------------------------------------------------------------------------------------------

参考文档:metalink 文档 ID 952903.1

A lookup of the SCAN on the DNS server shows that the entry has already been updated with the new IP addresses:

$ nslookup sales-scan.example.com
Server: dns1.example.com
Address: 10.100.10.70#53

Name: sales-scan.example.com
Address: 10.100.10.123
Name: sales-scan.example.com
Address: 10.100.10.122
Name: sales-scan.example.com
Address: 10.100.10.121

Stop the SCAN listener and the SCAN VIP resources:

$GRID_HOME/bin/srvctl stop scan_listener

$GRID_HOME/bin/srvctl stop scan

$GRID_HOME/bin/srvctl status scan

SCAN VIP scan1 is enabled
SCAN VIP scan1 is not running
SCAN VIP scan2 is enabled
SCAN VIP scan2 is not running
SCAN VIP scan3 is enabled
SCAN VIP scan3 is not running

$GRID_HOME/bin/srvctl status scan_listener

SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is not running
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is not running
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is not running

The SCAN VIP resources still show the old IP addresses:

$GRID_HOME/bin/srvctl config scan

SCAN name: sales-scan, Network: 1/10.100.10.0/255.255.255.0/eth1
SCAN VIP name: scan1, IP: /sales-scan.example.com/10.100.10.81
SCAN VIP name: scan2, IP: /sales-scan.example.com/10.100.10.82
SCAN VIP name: scan3, IP: /sales-scan.example.com/10.100.10.83

Now tell CRS to update the SCAN VIP resources:

$GRID_HOME/bin/srvctl modify scan -n sales-scan.example.com

To verify that the change was successful, check the SCAN configuration again:

$GRID_HOME/bin/srvctl config scan

SCAN name: sales-scan, Network: 1/10.100.10.0/255.255.255.0/eth1
SCAN VIP name: scan1, IP: /sales-scan.example.com/10.100.10.121
SCAN VIP name: scan2, IP: /sales-scan.example.com/10.100.10.122
SCAN VIP name: scan3, IP: /sales-scan.example.com/10.100.10.123

Start SCAN and the SCAN listener:

$GRID_HOME/bin/srvctl start scan

$GRID_HOME/bin/srvctl start scan_listener

<think>我们正在处理一个关于Oracle RAC环境中查看SCAN名称的问题。根据用户提供的引用内容,我们可以找到相关的命令。 引用[1]中给出了一个命令示例:`srvctl config scan`,这个命令可以查看SCAN的配置,包括SCAN name。 同样,引用[3]中也提到了使用`srvctl config scan`来查看scan ip。 因此,我们可以确定,在Oracle RAC环境中,要查看SCAN名称,可以使用`srvctl config scan`命令。 步骤: 1. 以grid用户(或安装Grid Infrastructure的用户)登录到RAC集群中的任意一个节点。 2. 在命令行中执行:`srvctl config scan` 这个命令会输出SCAN的配置信息,其中就包括SCAN名称(SCAN name)。 例如,在引用[1]中,执行命令后显示: SCAN name: nxyddb-scan.us.oracle.com, Network: 1/192.168.80.0/255.255.255.0/eth0 SCAN VIP name: scan1, IP: /nxyddb-scan.us.oracle.com/192.168.80.24 ... 这里,SCAN name就是“nxyddb-scan.us.oracle.com”。 注意:这个命令需要在Grid Infrastructure的主目录下执行,或者确保环境变量设置正确(通常grid用户的环境已经设置好)。 因此,回答用户:在Oracle RAC中查看SCAN名称的方法是使用命令`srvctl config scan`。 同时,根据系统指令,我们需要生成相关问题。</think>在Oracle RAC环境中查看SCAN名称的操作步骤如下: 1. **登录任意集群节点** 使用Grid Infrastructure安装用户(通常为`grid`用户)登录RAC集群中的任意节点。 2. **执行SCAN配置查询命令** 在终端运行以下命令: ```bash srvctl config scan ``` 输出示例: ``` SCAN name: nxyddb-scan.us.oracle.com, Network: 1/192.168.80.0/255.255.255.0/eth0 SCAN VIP name: scan1, IP: /nxyddb-scan.us.oracle.com/192.168.80.24 SCAN VIP name: scan2, IP: /nxyddb-scan.us.oracle.com/192.168.80.22 SCAN VIP name: scan3, IP: /nxyddb-scan.us.oracle.com/192.168.80.23 ``` **关键输出项**:第一行的`SCAN name`即为SCAN名称(示例中为`nxyddb-scan.us.oracle.com`)[^1][^3]。 3. **验证DNS解析(可选)** 通过`nslookup`验证SCAN名称的DNS解析: ```bash nslookup <SCAN_name> ``` 例如: ```bash nslookup nxyddb-scan.us.oracle.com ``` 应返回配置的多个SCAN VIP地址。 ### 注意事项 - **执行权限**:必须使用Grid用户(如`grid`)执行`srvctl`命令 - **环境要求**:确保`ORACLE_HOME`和`PATH`已正确指向Grid Infrastructure目录 - **集群状态**:命令可在集群任何状态下执行,无需停止服务[^1][^3]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值