oracle 19c集群切换IP

[oracle@rac01 ~]$ srvctl stop database -d racdb

[oracle@rac01 ~]$ srvctl status database -d racdb
实例 racdb1 没有在 rac01 节点上运行
实例 racdb2 没有在 rac02 节点上运行


[root@rac01 bin]# ./crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac01                    STABLE
               ONLINE  ONLINE       rac02                    STABLE
ora.chad
               ONLINE  ONLINE       rac01                    STABLE
               ONLINE  ONLINE       rac02                    STABLE
ora.net1.network
               ONLINE  ONLINE       rac01                    STABLE
               ONLINE  ONLINE       rac02                    STABLE
ora.ons
               ONLINE  ONLINE       rac01                    STABLE
               ONLINE  ONLINE       rac02                    STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ARC.dg(ora.asmgroup)
      1        ONLINE  ONLINE       rac01                    STABLE
      2        ONLINE  ONLINE       rac02                    STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
      1        ONLINE  ONLINE       rac01                    STABLE
      2        ONLINE  ONLINE       rac02                    STABLE
      3        ONLINE  OFFLINE                               STABLE
ora.DATA.dg(ora.asmgroup)
      1        ONLINE  ONLINE       rac01                    STABLE
      2        ONLINE  ONLINE       rac02                    STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac02                    STABLE
ora.OCR.dg(ora.asmgroup)
      1        ONLINE  ONLINE       rac01                    STABLE
      2        ONLINE  ONLINE       rac02                    STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.asm(ora.asmgroup)
      1        ONLINE  ONLINE       rac01                    Started,STABLE
      2        ONLINE  ONLINE       rac02                    Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
      1        ONLINE  ONLINE       rac01                    STABLE
      2        ONLINE  ONLINE       rac02                    STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       rac02                    STABLE
ora.racdb.db
      1        OFFLINE OFFLINE                               Instance Shutdown,ST
                                                             ABLE
      2        OFFLINE OFFLINE                               Instance Shutdown,ST
                                                             ABLE
ora.qosmserver
      1        ONLINE  ONLINE       rac02                    STABLE
ora.rac01.vip
      1        ONLINE  ONLINE       rac01                    STABLE
ora.rac02.vip
      1        ONLINE  ONLINE       rac02                    STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       rac02                    STABLE
--------------------------------------------------------------------------------


[root@rac01 bin]# ./oifcfg getif
eth0  192.168.0.0  global  public
eth1  200.200.200.0  global  cluster_interconnect,asm


[root@rac01 bin]# ./crsctl stop crs
[root@rac02 bin]# ./crsctl stop crs


[root@rac01 bin]# vim /etc/sysconfig/network-scripts/ifcfg-eth0
TYPE=Bond
DEVICE=eth0
BOOTPROTO=static
DEFROUTE=yes
ONBOOT=yes
IPADDR=192.168.162.30
NETMASK=255.255.0.0
GATEWAY=192.168.255.254
BROADCAST=192.168.255.255
USERCTL=no
IPV6INIT=no
PEERDNS=yes
NAME=麓public麓
BONDING_OPTS=麓mode=0麓
BONDING_MASTER=yes

[root@rac02 bin]# vim /etc/sysconfig/network-scripts/ifcfg-eth0
TYPE=Bond
DEVICE=eth0
BOOTPROTO=static
DEFROUTE=yes
ONBOOT=yes
IPADDR=192.168.162.31
NETMASK=255.255.0.0
GATEWAY=192.168.255.254
BROADCAST=192.168.255.255
USERCTL=no
IPV6INIT=no
PEERDNS=yes
NAME=麓public麓
BONDING_OPTS=麓mode=0麓
BONDING_MASTER=yes


[root@rac01 bin]# ifdown eth0 && ifup eth0
[root@rac02 bin]# ifdown eth0 && ifup eth0


[root@rac01 ~]# vim /etc/hosts
192.168.162.30	rac01
192.168.162.31	rac02

192.168.162.32  rac01-vip
192.168.162.33  rac02-vip

200.200.200.193 rac01-priv
200.200.200.194 rac02-priv

192.168.162.34  rac-scan

[root@rac02 ~]# vim /etc/hosts
192.168.162.30	rac01
192.168.162.31	rac02

192.168.162.32  rac01-vip
192.168.162.33  rac02-vip

200.200.200.193 rac01-priv
200.200.200.194 rac02-priv

192.168.162.34  rac-scan



[root@rac01 bin]# ./crsctl start crs
[root@rac02 bin]# ./crsctl start crs


[root@rac01 bin]# ./crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac01                    STABLE
               ONLINE  ONLINE       rac02                    STABLE
ora.chad
               ONLINE  ONLINE       rac01                    STABLE
               ONLINE  ONLINE       rac02                    STABLE
ora.net1.network
               ONLINE  ONLINE       rac01                    STABLE
               ONLINE  ONLINE       rac02                    STABLE
ora.ons
               ONLINE  ONLINE       rac01                    STABLE
               ONLINE  ONLINE       rac02                    STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ARC.dg(ora.asmgroup)
      1        ONLINE  ONLINE       rac01                    STABLE
      2        ONLINE  ONLINE       rac02                    STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
      1        ONLINE  ONLINE       rac01                    STABLE
      2        ONLINE  ONLINE       rac02                    STABLE
      3        ONLINE  OFFLINE                               STABLE
ora.DATA.dg(ora.asmgroup)
      1        ONLINE  ONLINE       rac01                    STABLE
      2        ONLINE  ONLINE       rac02                    STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac01                    STABLE
ora.OCR.dg(ora.asmgroup)
      1        ONLINE  ONLINE       rac01                    STABLE
      2        ONLINE  ONLINE       rac02                    STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.asm(ora.asmgroup)
      1        ONLINE  ONLINE       rac01                    Started,STABLE
      2        ONLINE  ONLINE       rac02                    Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
      1        ONLINE  ONLINE       rac01                    STABLE
      2        ONLINE  ONLINE       rac02                    STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       rac01                    STABLE
ora.racdb.db
      1        OFFLINE OFFLINE                               Instance Shutdown,ST
                                                             ABLE
      2        OFFLINE OFFLINE                               Instance Shutdown,ST
                                                             ABLE
ora.qosmserver
      1        ONLINE  ONLINE       rac01                    STABLE
ora.rac01.vip
      1        ONLINE  ONLINE       rac01                    STABLE
ora.rac02.vip
      1        ONLINE  ONLINE       rac02                    STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       rac01                    STABLE
--------------------------------------------------------------------------------


[root@rac01 bin]# ./oifcfg delif -global eth0
[root@rac01 bin]# ./oifcfg setif -global eth0/192.168.162.0:public
[root@rac01 bin]# ./oifcfg getif
eth1  200.200.200.0  global  cluster_interconnect,asm
eth0  192.168.162.0  global  public


[root@rac01 bin]# ./srvctl config nodeapps -a
网络1存在
子网 IPv4: 192.168.0.0/255.255.0.0/eth0, static
子网 IPv6: 
试通目标: 
网络已启用
网络已在以下节点上分别启用: 
网络已在以下节点上分别禁用: 
VIP 存在: 网络编号 1, 托管节点 rac01
VIP 名称: rac01-vip
VIP IPv4 地址: 192.168.66.195
VIP IPv6 地址: 
VIP 已启用。
VIP 已在以下节点上分别启用: 
VIP 已在以下节点上分别禁用: 
VIP 存在: 网络编号 1, 托管节点 rac02
VIP 名称: rac02-vip
VIP IPv4 地址: 192.168.66.196
VIP IPv6 地址: 
VIP 已启用。
VIP 已在以下节点上分别启用: 
VIP 已在以下节点上分别禁用: 

[root@rac01 bin]# ./srvctl stop listener
[root@rac01 bin]# 
[root@rac01 bin]# 
[root@rac01 bin]# ./srvctl status listener
监听程序 LISTENER 已启用
监听程序 LISTENER 未运行
[root@rac01 bin]# 
[root@rac01 bin]# 
[root@rac01 bin]# 
[root@rac01 bin]# 
[root@rac01 bin]# ./srvctl stop vip -n rac01
[root@rac01 bin]# ./srvctl stop vip -n rac02

[root@rac01 bin]# ./srvctl modify nodeapps -A 192.168.162.32/255.255.0.0/eth0 -n rac01
[root@rac01 bin]# ./srvctl modify nodeapps -A 192.168.162.33/255.255.0.0/eth0 -n rac02
[root@rac01 bin]# ./srvctl start vip -n rac01
[root@rac01 bin]# ./srvctl start vip -n rac02
[root@rac01 bin]# ./srvctl start listener

[root@rac01 bin]# ./srvctl config scan
SCAN ?3? rac-scan, θ?: 1
?θ IPv4: 192.168.0.0/255.255.0.0/eth0, static
?θ IPv6: 
SCAN 1 IPv4 VIP: 192.168.162.34
SCAN VIP ????£
[root@rac01 bin]# ./srvctl stop scan_listener
[root@rac01 bin]# ./srvctl stop scan
[root@rac01 bin]# 
[root@rac01 bin]# 
[root@rac01 bin]# ./srvctl modify scan -n rac-scan
[root@rac01 bin]# 
[root@rac01 bin]# 
[root@rac01 bin]# 
[root@rac01 bin]# ./srvctl start scan
[root@rac01 bin]# ./srvctl start scan_listener
[root@rac01 bin]# 
[root@rac01 bin]# 
[root@rac01 bin]# 
[root@rac01 bin]# ./crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac01                    STABLE
               ONLINE  ONLINE       rac02                    STABLE
ora.chad
               ONLINE  ONLINE       rac01                    STABLE
               ONLINE  ONLINE       rac02                    STABLE
ora.net1.network
               ONLINE  ONLINE       rac01                    STABLE
               ONLINE  ONLINE       rac02                    STABLE
ora.ons
               ONLINE  ONLINE       rac01                    STABLE
               ONLINE  ONLINE       rac02                    STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ARC.dg(ora.asmgroup)
      1        ONLINE  ONLINE       rac01                    STABLE
      2        ONLINE  ONLINE       rac02                    STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
      1        ONLINE  ONLINE       rac01                    STABLE
      2        ONLINE  ONLINE       rac02                    STABLE
      3        ONLINE  OFFLINE                               STABLE
ora.DATA.dg(ora.asmgroup)
      1        ONLINE  ONLINE       rac01                    STABLE
      2        ONLINE  ONLINE       rac02                    STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac02                    STABLE
ora.OCR.dg(ora.asmgroup)
      1        ONLINE  ONLINE       rac01                    STABLE
      2        ONLINE  ONLINE       rac02                    STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.asm(ora.asmgroup)
      1        ONLINE  ONLINE       rac01                    Started,STABLE
      2        ONLINE  ONLINE       rac02                    Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
      1        ONLINE  ONLINE       rac01                    STABLE
      2        ONLINE  ONLINE       rac02                    STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       rac01                    STABLE
ora.racdb.db
      1        OFFLINE OFFLINE                               Instance Shutdown,ST
                                                             ABLE
      2        OFFLINE OFFLINE                               Instance Shutdown,ST
                                                             ABLE
ora.qosmserver
      1        ONLINE  ONLINE       rac01                    STABLE
ora.rac01.vip
      1        ONLINE  ONLINE       rac01                    STABLE
ora.rac02.vip
      1        ONLINE  ONLINE       rac02                    STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       rac02                    STABLE
--------------------------------------------------------------------------------
[root@rac01 bin]# 
[root@rac01 bin]# 
[root@rac01 bin]# 
[root@rac01 bin]# 
[root@rac01 bin]# ./srvctl config scan
SCAN ?3? rac-scan, θ?: 1
?θ IPv4: 192.168.0.0/255.255.0.0/eth0, static
?θ IPv6: 
SCAN 1 IPv4 VIP: 192.168.162.34
SCAN VIP ????£

[root@rac01 bin]#  ./srvctl start database -d racdb

  

posted @ 2022-05-18 20:21  orcl  阅读(110)  评论(0编辑  收藏  举报