oracle 11gR2 修改DNS方式(SCAN IP)

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:211

oracle 11gR2 修改DNS方式(SCAN IP)

这篇文章介绍11gR2环境下如何修改dns环境下的scan ip
以下例子为将
192.168.3.231,192.168.3.232,192.168.3.233
改为
192.168.3.234,192.168.3.235,192.168.3.236

以下为具体实施过程:
[root@rac1 bin]# nslookup racnode-cluster-scan.racnode.com
Server: 192.168.3.32
Address: 192.168.3.32#53
Name: racnode-cluster-scan.racnode.com
Address: 192.168.3.231
Name: racnode-cluster-scan.racnode.com
Address: 192.168.3.232
Name: racnode-cluster-scan.racnode.com
Address: 192.168.3.233

1.检查目前scan ip环境
[root@rac1 bin]# nslookup racnode-cluster-scan.racnode.com
Server: 192.168.3.32
Address: 192.168.3.32#53
Name: racnode-cluster-scan.racnode.com
Address: 192.168.3.236
Name: racnode-cluster-scan.racnode.com
Address: 192.168.3.235
Name: racnode-cluster-scan.racnode.com
Address: 192.168.3.234

[grid@rac1 trace]$ srvctl config scan
SCAN name: racnode-cluster-scan.racnode.com, Network: 1/192.168.3.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /192.168.3.231/192.168.3.231
SCAN VIP name: scan2, IP: /192.168.3.233/192.168.3.233
SCAN VIP name: scan3, IP: /192.168.3.232/192.168.3.232
[grid@rac1 trace]$
srvctl config scan_listener
[root@rac1 bin]# ./srvctl modify scan -n racnode-cluster-scan.racnode.com
[root@rac1 bin]#
[grid@rac1 trace]$ srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521
[grid@rac1 trace]$

2.停止scan ip
[grid@rac1 trace]$ srvctl stop scan_listener
[grid@rac1 trace]$ srvctl stop scan
[grid@rac1 trace]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.ASM_DG.dg ora....up.type ONLINE ONLINE rac1
ora.DATA.dg ora....up.type ONLINE ONLINE rac1
ora....ER.lsnr ora....er.type ONLINE ONLINE rac1
ora....N1.lsnr ora....er.type OFFLINE OFFLINE
ora....N2.lsnr ora....er.type OFFLINE OFFLINE
ora....N3.lsnr ora....er.type OFFLINE OFFLINE
ora.TESTDG.dg ora....up.type ONLINE ONLINE rac1
ora.asm ora.asm.type ONLINE ONLINE rac1
ora.eons ora.eons.type ONLINE ONLINE rac1
ora.gsd ora.gsd.type ONLINE ONLINE rac1
ora....network ora....rk.type ONLINE ONLINE rac1
ora.oc4j ora.oc4j.type ONLINE ONLINE rac1
ora.ons ora.ons.type ONLINE ONLINE rac1
ora....SM1.asm application ONLINE ONLINE rac1
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip ora....t1.type ONLINE ONLINE rac1
ora....SM2.asm application ONLINE ONLINE rac2
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip ora....t1.type ONLINE ONLINE rac2
ora.racdb.db ora....se.type ONLINE ONLINE rac1
ora....est.svc ora....ce.type ONLINE ONLINE rac1
ora....ry.acfs ora....fs.type ONLINE ONLINE rac1
ora.scan1.vip ora....ip.type OFFLINE OFFLINE
ora.scan2.vip ora....ip.type OFFLINE OFFLINE
ora.scan3.vip ora....ip.type OFFLINE OFFLINE
[grid@rac1 trace]$
[grid@rac1 trace]$ crsctl status resource -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASM_DG.dg
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.DATA.dg
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.LISTENER.lsnr
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.TESTDG.dg
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.asm
ONLINE ONLINE rac1 Started
ONLINE ONLINE rac2 Started
ora.eons
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.gsd
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.net1.network
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.ons
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.registry.acfs
ONLINE ONLINE rac1
ONLINE ONLINE rac2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 OFFLINE OFFLINE
ora.LISTENER_SCAN2.lsnr
1 OFFLINE OFFLINE
ora.LISTENER_SCAN3.lsnr
1 OFFLINE OFFLINE
ora.oc4j
1 ONLINE ONLINE rac1
ora.rac1.vip
1 ONLINE ONLINE rac1
ora.rac2.vip
1 ONLINE ONLINE rac2
ora.racdb.db
1 ONLINE ONLINE rac1 Open
2 ONLINE ONLINE rac2 Open
ora.racdb.test.svc
1 ONLINE ONLINE rac1
2 ONLINE ONLINE rac2
ora.scan1.vip
1 OFFLINE OFFLINE
ora.scan2.vip
1 OFFLINE OFFLINE
ora.scan3.vip
1 OFFLINE OFFLINE
[grid@rac1 trace]$

3.检查scan ip 资源 是否停止
[grid@rac1 trace]$ 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@rac1 trace]$ 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
[grid@rac1 trace]$

4.root用户进行修改
[root@rac1 bin]# ./srvctl modify scan -n racnode-cluster-scan.racnode.com
[root@rac1 bin]#

5.修改dns服务器上的ip
1.dns 域名ip配置进行修改
2.dhcp ip范围段进行修改

6.确认结果和启动scan ip
[grid@rac1 trace]$ srvctl config scan
SCAN name: racnode-cluster-scan.racnode.com, Network: 1/192.168.3.0/255.255.255.0/eth0
[color=#0080ff]SCAN VIP name: scan1, IP: /racnode-cluster-scan.racnode.com/192.168.3.234
SCAN VIP name: scan2, IP: /racnode-cluster-scan.racnode.com/192.168.3.236
SCAN VIP name: scan3, IP: /racnode-cluster-scan.racnode.com/192.168.3.235
[grid@rac1 trace]$ srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521
[grid@rac1 trace]$ srvctl start scan
[grid@rac1 trace]$ srvctl start scan_listener
[grid@rac1 trace]$
[grid@rac1 trace]$
[grid@rac1 trace]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.ASM_DG.dg ora....up.type ONLINE ONLINE rac1
ora.DATA.dg ora....up.type ONLINE ONLINE rac1
ora....ER.lsnr ora....er.type ONLINE ONLINE rac1
ora....N1.lsnr ora....er.type ONLINE ONLINE rac2
ora....N2.lsnr ora....er.type ONLINE ONLINE rac1
ora....N3.lsnr ora....er.type ONLINE ONLINE rac1
ora.TESTDG.dg ora....up.type ONLINE ONLINE rac1
ora.asm ora.asm.type ONLINE ONLINE rac1
ora.eons ora.eons.type ONLINE ONLINE rac1
ora.gsd ora.gsd.type ONLINE ONLINE rac1
ora....network ora....rk.type ONLINE ONLINE rac1
ora.oc4j ora.oc4j.type ONLINE ONLINE rac1
ora.ons ora.ons.type ONLINE ONLINE rac1
ora....SM1.asm application ONLINE ONLINE rac1
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip ora....t1.type ONLINE ONLINE rac1
ora....SM2.asm application ONLINE ONLINE rac2
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip ora....t1.type ONLINE ONLINE rac2
ora.racdb.db ora....se.type ONLINE ONLINE rac1
ora....est.svc ora....ce.type ONLINE ONLINE rac1
ora....ry.acfs ora....fs.type ONLINE ONLINE rac1
ora.scan1.vip ora....ip.type ONLINE ONLINE rac2
ora.scan2.vip ora....ip.type ONLINE ONLINE rac1
ora.scan3.vip ora....ip.type ONLINE ONLINE rac1
[grid@rac1 trace]$ crsctl status res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASM_DG.dg
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.DATA.dg
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.LISTENER.lsnr
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.TESTDG.dg
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.asm
ONLINE ONLINE rac1 Started
ONLINE ONLINE rac2 Started
ora.eons
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.gsd
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.net1.network
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.ons
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.registry.acfs
ONLINE ONLINE rac1
ONLINE ONLINE rac2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE rac2
ora.LISTENER_SCAN2.lsnr
1 ONLINE ONLINE rac1
ora.LISTENER_SCAN3.lsnr
1 ONLINE ONLINE rac1
ora.oc4j
1 ONLINE ONLINE rac1
ora.rac1.vip
1 ONLINE ONLINE rac1
ora.rac2.vip
1 ONLINE ONLINE rac2
ora.racdb.db
1 ONLINE ONLINE rac1 Open
2 ONLINE ONLINE rac2 Open
ora.racdb.test.svc
1 ONLINE ONLINE rac1
2 ONLINE ONLINE rac2
ora.scan1.vip
1 ONLINE ONLINE rac2
ora.scan2.vip
1 ONLINE ONLINE rac1
ora.scan3.vip
1 ONLINE ONLINE rac1
[grid@rac1 trace]$
可以看到修改后192.168.3.234,192.168.3.235,192.168.3.236段的ip地址已经生效

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】