1.当前实验环境
[root@rac01 ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.56.200 rac01
172.168.56.200 rac01-priv
192.168.56.202 rac01-vip
192.168.56.201 rac02
172.168.56.201 rac02-priv
192.168.56.203 rac02-vip
192.168.56.204 rac-scan
2.期望修改为
[root@rac01 ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.56.250 rac01
172.168.56.250 rac01-priv
192.168.56.252 rac01-vip
192.168.56.251 rac02
172.168.56.251 rac02-priv
192.168.56.253 rac02-vip
192.168.56.254 rac-scan
3.这里先正常immediate关闭数据库,然后关闭监听,最后关闭两个节点的crs:
使用oracle用户(在Oracle 19C RAC集群的其中一个节点操作):
在RAC01节点操作:
[oracle@rac01 ~]$ cd /u01/app/oracle/product/19.3.0/db_1/bin/
[oracle@rac01 bin]$ ./srvctl stop database -d cxmtdb
[oracle@rac01 bin]$ exit
logout
[root@rac01 ~]# /u01/app/19.3.0/grid/bin/crsctl stop crs
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rac01'
CRS-2673: Attempting to stop 'ora.crsd' on 'rac01'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on server 'rac01'
CRS-2673: Attempting to stop 'ora.chad' on 'rac01'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'rac01'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'rac01'
CRS-2673: Attempting to stop 'ora.qosmserver' on 'rac01'
CRS-2673: Attempting to stop 'ora.cvu' on 'rac01'
CRS-33673: Attempting to stop resource group 'ora.asmgroup' on server 'rac01'
CRS-2673: Attempting to stop 'ora.OCR.dg' on 'rac01'
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'rac01'
CRS-2673: Attempting to stop 'ora.MGMT.dg' on 'rac01'
CRS-2677: Stop of 'ora.OCR.dg' on 'rac01' succeeded
CRS-2677: Stop of 'ora.MGMT.dg' on 'rac01' succeeded
CRS-2677: Stop of 'ora.DATA.dg' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'rac01'
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'rac01' succeeded
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'rac01' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.ASMNET1LSNR_ASM.lsnr' on 'rac01'
CRS-2673: Attempting to stop 'ora.rac01.vip' on 'rac01'
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'rac01'
CRS-2677: Stop of 'ora.cvu' on 'rac01' succeeded
CRS-2677: Stop of 'ora.rac01.vip' on 'rac01' succeeded
CRS-2677: Stop of 'ora.scan1.vip' on 'rac01' succeeded
CRS-2677: Stop of 'ora.ASMNET1LSNR_ASM.lsnr' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.asmnet1.asmnetwork' on 'rac01'
CRS-2677: Stop of 'ora.asmnet1.asmnetwork' on 'rac01' succeeded
CRS-33677: Stop of resource group 'ora.asmgroup' on server 'rac01' succeeded.
CRS-2677: Stop of 'ora.qosmserver' on 'rac01' succeeded
CRS-2677: Stop of 'ora.chad' on 'rac01' succeeded
CRS-2672: Attempting to start 'ora.qosmserver' on 'rac02'
CRS-2672: Attempting to start 'ora.scan1.vip' on 'rac02'
CRS-2672: Attempting to start 'ora.cvu' on 'rac02'
CRS-2672: Attempting to start 'ora.rac01.vip' on 'rac02'
CRS-2676: Start of 'ora.rac01.vip' on 'rac02' succeeded
CRS-2676: Start of 'ora.scan1.vip' on 'rac02' succeeded
CRS-2676: Start of 'ora.cvu' on 'rac02' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'rac02'
CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'rac02' succeeded
CRS-2676: Start of 'ora.qosmserver' on 'rac02' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'rac01'
CRS-2677: Stop of 'ora.ons' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'rac01'
CRS-2677: Stop of 'ora.net1.network' on 'rac01' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'rac01' has completed
CRS-2677: Stop of 'ora.crsd' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.storage' on 'rac01'
CRS-2673: Attempting to stop 'ora.crf' on 'rac01'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'rac01'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'rac01'
CRS-2677: Stop of 'ora.drivers.acfs' on 'rac01' succeeded
CRS-2677: Stop of 'ora.crf' on 'rac01' succeeded
CRS-2677: Stop of 'ora.storage' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'rac01'
CRS-2677: Stop of 'ora.mdnsd' on 'rac01' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'rac01'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'rac01'
CRS-2673: Attempting to stop 'ora.evmd' on 'rac01'
CRS-2677: Stop of 'ora.ctssd' on 'rac01' succeeded
CRS-2677: Stop of 'ora.evmd' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'rac01'
CRS-2677: Stop of 'ora.cssd' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.driver.afd' on 'rac01'
CRS-2673: Attempting to stop 'ora.gipcd' on 'rac01'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'rac01'
CRS-2677: Stop of 'ora.driver.afd' on 'rac01' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'rac01' succeeded
CRS-2677: Stop of 'ora.gipcd' on 'rac01' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac01' has completed
CRS-4133: Oracle High Availability Services has been stopped.
在RAC02节点操作:
[root@rac02 ~]# /u01/app/19.3.0/grid/bin/crsctl stop crs
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rac02'
CRS-2673: Attempting to stop 'ora.crsd' on 'rac02'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on server 'rac02'
CRS-2673: Attempting to stop 'ora.chad' on 'rac02'
CRS-33673: Attempting to stop resource group 'ora.asmgroup' on server 'rac02'
CRS-2673: Attempting to stop 'ora.OCR.dg' on 'rac02'
CRS-2673: Attempting to stop 'ora.MGMT.dg' on 'rac02'
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'rac02'
CRS-2673: Attempting to stop 'ora.rac01.vip' on 'rac02'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'rac02'
CRS-2673: Attempting to stop 'ora.cvu' on 'rac02'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'rac02'
CRS-2673: Attempting to stop 'ora.qosmserver' on 'rac02'
CRS-2677: Stop of 'ora.MGMT.dg' on 'rac02' succeeded
CRS-2677: Stop of 'ora.OCR.dg' on 'rac02' succeeded
CRS-2677: Stop of 'ora.DATA.dg' on 'rac02' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'rac02'
CRS-2677: Stop of 'ora.rac01.vip' on 'rac02' succeeded
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'rac02' succeeded
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'rac02' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'rac02'
CRS-2673: Attempting to stop 'ora.rac02.vip' on 'rac02'
CRS-2677: Stop of 'ora.scan1.vip' on 'rac02' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac02' succeeded
CRS-2673: Attempting to stop 'ora.ASMNET1LSNR_ASM.lsnr' on 'rac02'
CRS-2677: Stop of 'ora.rac02.vip' on 'rac02' succeeded
CRS-2677: Stop of 'ora.cvu' on 'rac02' succeeded
CRS-2677: Stop of 'ora.qosmserver' on 'rac02' succeeded
CRS-2677: Stop of 'ora.ASMNET1LSNR_ASM.lsnr' on 'rac02' succeeded
CRS-2673: Attempting to stop 'ora.asmnet1.asmnetwork' on 'rac02'
CRS-2677: Stop of 'ora.asmnet1.asmnetwork' on 'rac02' succeeded
CRS-33677: Stop of resource group 'ora.asmgroup' on server 'rac02' succeeded.
CRS-2677: Stop of 'ora.chad' on 'rac02' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'rac02'
CRS-2677: Stop of 'ora.ons' on 'rac02' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'rac02'
CRS-2677: Stop of 'ora.net1.network' on 'rac02' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'rac02' has completed
CRS-2677: Stop of 'ora.crsd' on 'rac02' succeeded
CRS-2673: Attempting to stop 'ora.storage' on 'rac02'
CRS-2673: Attempting to stop 'ora.crf' on 'rac02'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'rac02'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'rac02'
CRS-2677: Stop of 'ora.drivers.acfs' on 'rac02' succeeded
CRS-2677: Stop of 'ora.crf' on 'rac02' succeeded
CRS-2677: Stop of 'ora.storage' on 'rac02' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'rac02'
CRS-2677: Stop of 'ora.mdnsd' on 'rac02' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac02' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'rac02'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'rac02' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'rac02'
CRS-2673: Attempting to stop 'ora.evmd' on 'rac02'
CRS-2677: Stop of 'ora.ctssd' on 'rac02' succeeded
CRS-2677: Stop of 'ora.evmd' on 'rac02' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'rac02'
CRS-2677: Stop of 'ora.cssd' on 'rac02' succeeded
CRS-2673: Attempting to stop 'ora.driver.afd' on 'rac02'
CRS-2673: Attempting to stop 'ora.gipcd' on 'rac02'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'rac02'
CRS-2677: Stop of 'ora.driver.afd' on 'rac02' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'rac02' succeeded
CRS-2677: Stop of 'ora.gipcd' on 'rac02' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac02' has completed
CRS-4133: Oracle High Availability Services has been stopped.
4.验证crsctl是否关闭
[root@rac01 ~]# /u01/app/19.3.0/grid/bin/crsctl stat res -t
CRS-4535: Cannot communicate with Cluster Ready Services
CRS-4000: Command Status failed, or completed with errors.
[root@rac02 ~]# /u01/app/19.3.0/grid/bin/crsctl stat res -t
CRS-4535: Cannot communicate with Cluster Ready Services
CRS-4000: Command Status failed, or completed with errors.
5.启动crsctl
[root@rac01 ~]# /u01/app/19.3.0/grid/bin/crsctl start crs
CRS-4123: Oracle High Availability Services has been started.
[root@rac02 ~]# /u01/app/19.3.0/grid/bin/crsctl start crs
CRS-4123: Oracle High Availability Services has been started.
6.修改public IP
[root@rac01 network-scripts]# /u01/app/19.3.0/grid/bin/oifcfg getif
enp0s3 192.168.56.0 global public
enp0s8 172.168.56.0 global cluster_interconnect,asm
[root@rac01 network-scripts]# /u01/app/19.3.0/grid/bin/oifcfg delif -global enp0s3
[root@rac01 network-scripts]# /u01/app/19.3.0/grid/bin/oifcfg setif -global enp0s3/192.168.56.0:public
[root@rac01 network-scripts]# /u01/app/19.3.0/grid/bin/oifcfg getif
enp0s8 172.168.56.0 global cluster_interconnect,asm
enp0s3 192.168.56.0 global public
[root@rac02 network-scripts]# /u01/app/19.3.0/grid/bin/oifcfg getif
enp0s8 172.168.56.0 global cluster_interconnect,asm
enp0s3 192.168.56.0 global public
7.修改Public网卡对应的IP
[root@rac01 ~]# cd /etc/sysconfig/network-scripts/
[root@rac01 network-scripts]# cat ifcfg-enp0s3
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp0s3
DEVICE=enp0s3
ONBOOT=yes
IPADDR=192.168.56.250
NETMASK=255.255.255.0
GATEWAY=192.168.56.1
[root@rac02 ~]# cd /etc/sysconfig/network-scripts/
[root@rac02 network-scripts]# cat ifcfg-enp0s3
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp0s3
DEVICE=enp0s3
ONBOOT=yes
IPADDR=192.168.56.251
NETMASK=255.255.255.0
GATEWAY=192.168.56.1
修改两边节点的/etc/hosts文件
[root@rac01 /]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.56.250 rac01
172.168.56.200 rac01-priv
192.168.56.202 rac01-vip
192.168.56.251 rac02
172.168.56.201 rac02-priv
192.168.56.203 rac02-vip
192.168.56.204 rac-scan
[root@rac02 network-scripts]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.56.250 rac01
172.168.56.200 rac01-priv
192.168.56.202 rac01-vip
192.168.56.251 rac02
172.168.56.201 rac02-priv
192.168.56.203 rac02-vip
192.168.56.204 rac-scan
重启两个节点enp0s3网卡
[root@rac01 /]# ifdown enp0s3 && ifup enp0s3
[root@rac02 /]# ifdown enp0s3 && ifup enp0s3
实验新的IP 192.168.56.250,192.168.56.251登录两节点
8.修改VIP
需要停止数据库、监听和VIP,如果按照之前操作,目前数据库和监听已经是停止状态
1) 停止节点1的实例和vip资源
[root@rac01 network-scripts]# /u01/app/19.3.0/grid/bin/srvctl stop vip -n rac01 -f
2)查看原始vip资源配置
[root@rac01 /]# /u01/app/19.3.0/grid/bin/srvctl config nodeapps -a
Network 1 exists
Subnet IPv4: 192.168.56.0/255.255.255.0/enp0s3, static
Subnet IPv6:
Ping Targets:
Network is enabled
Network is individually enabled on nodes:
Network is individually disabled on nodes:
VIP exists: network number 1, hosting node rac01
VIP Name: rac01-vip
VIP IPv4 Address: 192.168.56.202
VIP IPv6 Address:
VIP is enabled.
VIP is individually enabled on nodes:
VIP is individually disabled on nodes:
VIP exists: network number 1, hosting node rac02
VIP Name: rac02-vip
VIP IPv4 Address: 192.168.56.203
VIP IPv6 Address:
VIP is enabled.
VIP is individually enabled on nodes:
VIP is individually disabled on nodes:
3) 修改/etc/hosts文件中的 vip
[root@rac01 ~]# cat /etc/hosts | grep -i vip
192.168.56.252 rac01-vip
192.168.56.253 rac02-vip
4) 使用root用户修改vip资源
[root@rac01 ~]# /u01/app/19.3.0/grid/bin/srvctl modify nodeapps -n rac01 -A 192.168.56.252/255.255.255.0/enp0s3
5) 启动服务
[root@rac01 ~]# /u01/app/19.3.0/grid/bin/srvctl start vip -n rac01
[root@rac01 ~]# /u01/app/19.3.0/grid/bin/srvctl start listener -n rac01
[root@rac01 ~]# /u01/app/19.3.0/grid/bin/srvctl start instance -d cxmtdb -n rac01
在RAC02节点操作
6)停止节点2的实例和vip资源
[root@rac02 ~]# /u01/app/19.3.0/grid/bin/srvctl stop vip -n rac02 -f
7)查看原始vip资源配置
[root@rac02 ~]# /u01/app/19.3.0/grid/bin/srvctl config nodeapps -a
Network 1 exists
Subnet IPv4: 192.168.56.0/255.255.255.0/enp0s3, static
Subnet IPv6:
Ping Targets:
Network is enabled
Network is individually enabled on nodes:
Network is individually disabled on nodes:
VIP exists: network number 1, hosting node rac01
VIP Name: rac01-vip
VIP IPv4 Address: 192.168.56.252
VIP IPv6 Address:
VIP is enabled.
VIP is individually enabled on nodes:
VIP is individually disabled on nodes:
VIP exists: network number 1, hosting node rac02
VIP Name: rac02-vip
VIP IPv4 Address: 192.168.56.253
VIP IPv6 Address:
VIP is enabled.
VIP is individually enabled on nodes:
VIP is individually disabled on nodes:
8) 修改/etc/hosts文件中的 vip
[root@rac02 ~]# cat /etc/hosts | grep -i vip
192.168.56.252 rac01-vip
192.168.56.253 rac02-vip
9) 使用root用户修改vip资源
[root@rac02 ~]# /u01/app/19.3.0/grid/bin/srvctl modify nodeapps -n rac02 -A 192.168.56.253/255.255.255.0/enp0s3
10) 启动服务
[root@rac02 ~]# /u01/app/19.3.0/grid/bin/srvctl start vip -n rac02
[root@rac02 ~]# /u01/app/19.3.0/grid/bin/srvctl start listener -n rac02
[root@rac02 ~]# /u01/app/19.3.0/grid/bin/srvctl start instance -d cxmtdb -n rac02
9.修改SCAN IP
1) 以grid用户停止资源
[root@rac01 ~]# /u01/app/19.3.0/grid/bin/srvctl stop scan_listener
[root@rac01 ~]# /u01/app/19.3.0/grid/bin/srvctl stop scan
2) 修改/etc/hosts文件中的SCAN IP
[root@rac01 ~]# cat /etc/hosts | grep -i scan
192.168.56.254 rac-scan
[root@rac02 ~]# cat /etc/hosts | grep -i scan
192.168.56.254 rac-scan
3) 以root用户更改SCAN IP
[root@rac01 ~]# /u01/app/19.3.0/grid/bin/srvctl modify scan -n 192.168.56.254
4) 以grid用户更改及启动资源
[root@rac01 ~]# /u01/app/19.3.0/grid/bin/srvctl modify scan_listener -u
[root@rac01 ~]# /u01/app/19.3.0/grid/bin/srvctl start scan_listener
5) 确认更改
[root@rac01 ~]# /u01/app/19.3.0/grid/bin/srvctl config scan
SCAN name: 192.168.56.254, Network: 1
Subnet IPv4: 192.168.56.0/255.255.255.0/enp0s3, static
Subnet IPv6:
SCAN 1 IPv4 VIP: 192.168.56.254
SCAN VIP is enabled.
[root@rac01 ~]# /u01/app/19.3.0/grid/bin/srvctl config scan_listener
SCAN Listeners for network 1:
Registration invited nodes:
Registration invited subnets:
Endpoints: TCP:1521
SCAN Listener LISTENER_SCAN1 exists
SCAN Listener is enabled.
10.修改Private IP
1)在对集群中所有节点操作之前,请先备份 profile.xml 配置文件。
[root@rac01 ~]# cd /u01/app/19.3.0/grid/gpnp/rac01/profiles/peer/
[root@rac01 peer]# cp -p profile.xml profile.xml.bak
[root@rac02 ~]# cd /u01/app/19.3.0/grid/gpnp/rac02/profiles/peer/
[root@rac02 peer]# cp -p profile.xml profile.xml.bak
2)查看Private IP信息
[root@rac02 peer]# /u01/app/19.3.0/grid/bin/oifcfg getif
enp0s8 172.168.56.0 global cluster_interconnect,asm
enp0s3 192.168.56.0 global public
3)加入新的Private IP信息
[root@rac01 peer]# /u01/app/19.3.0/grid/bin/oifcfg setif -global enp0s8/192.168.56.0:cluster_interconnect
[root@rac01 peer]# /u01/app/19.3.0/grid/bin/oifcfg getif
enp0s8 172.168.56.0 global cluster_interconnect,asm
enp0s3 192.168.56.0 global public
enp0s8 192.168.56.0 global cluster_interconnect
4) 使用root用户关闭集群中所有节点并禁用集群(每个节点)
[root@rac01 peer]# /u01/app/19.3.0/grid/bin/crsctl stop crs
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rac01'
CRS-2673: Attempting to stop 'ora.crsd' on 'rac01'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on server 'rac01'
CRS-2673: Attempting to stop 'ora.cxmtdb.db' on 'rac01'
CRS-2673: Attempting to stop 'ora.qosmserver' on 'rac01'
CRS-2673: Attempting to stop 'ora.chad' on 'rac01'
CRS-2677: Stop of 'ora.cxmtdb.db' on 'rac01' succeeded
CRS-33673: Attempting to stop resource group 'ora.asmgroup' on server 'rac01'
CRS-2673: Attempting to stop 'ora.OCR.dg' on 'rac01'
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'rac01'
CRS-2673: Attempting to stop 'ora.MGMT.dg' on 'rac01'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'rac01'
CRS-2673: Attempting to stop 'ora.cvu' on 'rac01'
CRS-2677: Stop of 'ora.OCR.dg' on 'rac01' succeeded
CRS-2677: Stop of 'ora.DATA.dg' on 'rac01' succeeded
CRS-2677: Stop of 'ora.MGMT.dg' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'rac01'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.rac01.vip' on 'rac01'
CRS-2677: Stop of 'ora.rac01.vip' on 'rac01' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.ASMNET1LSNR_ASM.lsnr' on 'rac01'
CRS-2677: Stop of 'ora.qosmserver' on 'rac01' succeeded
CRS-2677: Stop of 'ora.cvu' on 'rac01' succeeded
CRS-2677: Stop of 'ora.ASMNET1LSNR_ASM.lsnr' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.asmnet1.asmnetwork' on 'rac01'
CRS-2677: Stop of 'ora.asmnet1.asmnetwork' on 'rac01' succeeded
CRS-33677: Stop of resource group 'ora.asmgroup' on server 'rac01' succeeded.
CRS-2677: Stop of 'ora.chad' on 'rac01' succeeded
CRS-2672: Attempting to start 'ora.qosmserver' on 'rac02'
CRS-2672: Attempting to start 'ora.cvu' on 'rac02'
CRS-2672: Attempting to start 'ora.rac01.vip' on 'rac02'
CRS-2676: Start of 'ora.cvu' on 'rac02' succeeded
CRS-2676: Start of 'ora.rac01.vip' on 'rac02' succeeded
CRS-2676: Start of 'ora.qosmserver' on 'rac02' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'rac01'
CRS-2677: Stop of 'ora.ons' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'rac01'
CRS-2677: Stop of 'ora.net1.network' on 'rac01' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'rac01' has completed
CRS-2677: Stop of 'ora.crsd' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.storage' on 'rac01'
CRS-2673: Attempting to stop 'ora.crf' on 'rac01'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'rac01'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'rac01'
CRS-2677: Stop of 'ora.drivers.acfs' on 'rac01' succeeded
CRS-2677: Stop of 'ora.crf' on 'rac01' succeeded
CRS-2677: Stop of 'ora.storage' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'rac01'
CRS-2677: Stop of 'ora.mdnsd' on 'rac01' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'rac01'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'rac01'
CRS-2673: Attempting to stop 'ora.evmd' on 'rac01'
CRS-2677: Stop of 'ora.evmd' on 'rac01' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'rac01'
CRS-2677: Stop of 'ora.cssd' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.driver.afd' on 'rac01'
CRS-2673: Attempting to stop 'ora.gipcd' on 'rac01'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'rac01'
CRS-2677: Stop of 'ora.driver.afd' on 'rac01' succeeded
CRS-2677: Stop of 'ora.gipcd' on 'rac01' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'rac01' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac01' has completed
CRS-4133: Oracle High Availability Services has been stopped.
[root@rac02 peer]# /u01/app/19.3.0/grid/bin/crsctl stop crs
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rac02'
CRS-2673: Attempting to stop 'ora.crsd' on 'rac02'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on server 'rac02'
CRS-2673: Attempting to stop 'ora.qosmserver' on 'rac02'
CRS-2673: Attempting to stop 'ora.cxmtdb.db' on 'rac02'
CRS-2673: Attempting to stop 'ora.chad' on 'rac02'
CRS-2677: Stop of 'ora.cxmtdb.db' on 'rac02' succeeded
CRS-33673: Attempting to stop resource group 'ora.asmgroup' on server 'rac02'
CRS-2673: Attempting to stop 'ora.OCR.dg' on 'rac02'
CRS-2673: Attempting to stop 'ora.MGMT.dg' on 'rac02'
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'rac02'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'rac02'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'rac02'
CRS-2673: Attempting to stop 'ora.cvu' on 'rac02'
CRS-2673: Attempting to stop 'ora.rac01.vip' on 'rac02'
CRS-2677: Stop of 'ora.MGMT.dg' on 'rac02' succeeded
CRS-2677: Stop of 'ora.DATA.dg' on 'rac02' succeeded
CRS-2677: Stop of 'ora.rac01.vip' on 'rac02' succeeded
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'rac02' succeeded
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'rac02' succeeded
CRS-2677: Stop of 'ora.OCR.dg' on 'rac02' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'rac02'
CRS-2673: Attempting to stop 'ora.rac02.vip' on 'rac02'
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'rac02'
CRS-2677: Stop of 'ora.rac02.vip' on 'rac02' succeeded
CRS-2677: Stop of 'ora.scan1.vip' on 'rac02' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac02' succeeded
CRS-2673: Attempting to stop 'ora.ASMNET1LSNR_ASM.lsnr' on 'rac02'
CRS-2677: Stop of 'ora.cvu' on 'rac02' succeeded
CRS-2677: Stop of 'ora.qosmserver' on 'rac02' succeeded
CRS-2677: Stop of 'ora.ASMNET1LSNR_ASM.lsnr' on 'rac02' succeeded
CRS-2673: Attempting to stop 'ora.asmnet1.asmnetwork' on 'rac02'
CRS-2677: Stop of 'ora.asmnet1.asmnetwork' on 'rac02' succeeded
CRS-33677: Stop of resource group 'ora.asmgroup' on server 'rac02' succeeded.
CRS-2677: Stop of 'ora.chad' on 'rac02' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'rac02'
CRS-2677: Stop of 'ora.ons' on 'rac02' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'rac02'
CRS-2677: Stop of 'ora.net1.network' on 'rac02' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'rac02' has completed
CRS-2677: Stop of 'ora.crsd' on 'rac02' succeeded
CRS-2673: Attempting to stop 'ora.storage' on 'rac02'
CRS-2673: Attempting to stop 'ora.crf' on 'rac02'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'rac02'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'rac02'
CRS-2677: Stop of 'ora.drivers.acfs' on 'rac02' succeeded
CRS-2677: Stop of 'ora.crf' on 'rac02' succeeded
CRS-2677: Stop of 'ora.storage' on 'rac02' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'rac02'
CRS-2677: Stop of 'ora.mdnsd' on 'rac02' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac02' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'rac02'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'rac02' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'rac02'
CRS-2673: Attempting to stop 'ora.evmd' on 'rac02'
CRS-2677: Stop of 'ora.ctssd' on 'rac02' succeeded
CRS-2677: Stop of 'ora.evmd' on 'rac02' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'rac02'
CRS-2677: Stop of 'ora.cssd' on 'rac02' succeeded
CRS-2673: Attempting to stop 'ora.driver.afd' on 'rac02'
CRS-2673: Attempting to stop 'ora.gipcd' on 'rac02'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'rac02'
CRS-2677: Stop of 'ora.driver.afd' on 'rac02' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'rac02' succeeded
CRS-2677: Stop of 'ora.gipcd' on 'rac02' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac02' has completed
CRS-4133: Oracle High Availability Services has been stopped.
[root@rac01 peer]# /u01/app/19.3.0/grid/bin/crsctl disable crs
CRS-4621: Oracle High Availability Services autostart is disabled.
[root@rac02 peer]# /u01/app/19.3.0/grid/bin/crsctl disable crs
CRS-4621: Oracle High Availability Services autostart is disabled.
5).修改两节点IP
RAC01节点
[root@rac01 peer]# cd /etc/sysconfig/network-scripts/
[root@rac01 network-scripts]# cat ifcfg-enp0s8
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp0s8
DEVICE=enp0s8
ONBOOT=yes
IPADDR=172.168.56.250
NETMASK=255.255.255.0
GATEWAY=172.168.56.1
[root@rac02 peer]# cd /etc/sysconfig/network-scripts/
[root@rac02 network-scripts]# cat ifcfg-enp0s8
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp0s8
DEVICE=enp0s8
ONBOOT=yes
IPADDR=172.168.56.251
NETMASK=255.255.255.0
GATEWAY=172.168.56.1
6)修改/etc/hosts文件
[root@rac01 network-scripts]# cat /etc/hosts | grep -i priv
172.168.56.250 rac01-priv
172.168.56.251 rac02-priv
[root@rac02 network-scripts]# cat /etc/hosts | grep -i priv
172.168.56.250 rac01-priv
172.168.56.251 rac02-priv
7)重启网卡
[root@rac01 network-scripts]# ifdown enp0s8 && ifup enp0s
[root@rac02 network-scripts]# ifdown enp0s8 && ifup enp0s
8)使用root用户激活集群并重新启动集群中所有节点(每个节点)
[root@rac01 network-scripts]# /u01/app/19.3.0/grid/bin/crsctl enable crs
CRS-4622: Oracle High Availability Services autostart is enabled.
[root@rac01 network-scripts]# /u01/app/19.3.0/grid/bin/crsctl start crs
CRS-4123: Oracle High Availability Services has been started.
[root@rac02 network-scripts]# /u01/app/19.3.0/grid/bin/crsctl enable crs
CRS-4622: Oracle High Availability Services autostart is enabled.
[root@rac02 network-scripts]# /u01/app/19.3.0/grid/bin/crsctl start crs
CRS-4123: Oracle High Availability Services has been started.
8)删除旧的private ip
[root@rac01 network-scripts]# /u01/app/19.3.0/grid/bin/oifcfg getif
enp0s8 172.168.56.0 global cluster_interconnect,asm
enp0s3 192.168.56.0 global public
enp0s8 192.168.56.0 global cluster_interconnect
[root@rac01 network-scripts]# /u01/app/19.3.0/grid/bin/oifcfg delif -global enp0s8/192.168.56.0
[root@rac01 network-scripts]# /u01/app/19.3.0/grid/bin/oifcfg getif
enp0s8 172.168.56.0 global cluster_interconnect,asm
enp0s3 192.168.56.0 global public
[root@rac02 network-scripts]# /u01/app/19.3.0/grid/bin/oifcfg getif
enp0s8 172.168.56.0 global cluster_interconnect,asm
enp0s3 192.168.56.0 global public
11.登录数据库查看
[oracle@rac01 ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Sat Nov 6 17:03:33 2021
Version 19.12.0.0.0
Copyright (c) 1982, 2021, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.12.0.0.0
SQL> select inst_id, name, open_mode from gv$database;
INST_ID NAME OPEN_MODE
---------- ------------------ ----------------------------------------
1 CXMTDB READ WRITE
2 CXMTDB READ WRITE
版权声明:本文为博主原创文章,未经博主允许不得转载。
Linux,oracle