对于网络的管理可以采用oifcfg和srvctl命令进行管理
针对19C RAC数据库集群总结:
1 IPV4--->IPV6双站
-添加新的网络network信息。
./srvctl modify network -subnet 2309:8002:5A06:0120:0010:0000:0002:D000/116/eno3 -
--需改oifcfg信息
oifcfg setif eno3/2309:8002:5A06:0120:0010:0000:0002:D000:::public
--调整VIP信息
./srvctl remove vip -vip orcldb1-vip
Please confirm that you intend to remove the VIPs eomsdb1-vip (y/[n]) y
./srvctl remove vip -vip orcldb2-vip
Please confirm that you intend to remove the VIPs eomsdb2-vip (y/[n]) y
./srvctl config vip -n eomsdb1
./srvctl add vip -node orcldb1 -netnum 1 -address 10.221.224.16/255.255.255.192/eno3
./srvctl add vip -node orcldb2 -netnum 1 -address 10.221.224.17/255.255.255.192/eno3
./srvctl modify vip -node orcldb1 -netnum 1 -address 2309:8002:5A06:0120:0010:0000:0002:D010/116/eno3
./srvctl modify vip -node orcldb2 -netnum 1 -address 2309:8002:5A06:0120:0010:0000:0002:D011/116/eno3
./srvctl config vip -n orcldb1
./srvctl modify network -netnum 1 -iptype both --修改network 1 属性。
[root@orcl1 bin]# ./srvctl config network
Network 1 exists
Subnet IPv4: 10.221.224.0/255.255.255.192/eno3, static
Subnet IPv6: 2309:8002:5a06:120:10:0:2:d000/116/eno3, static
Ping Targets:
Network is enabled
Network is individually enabled on nodes:
2 priv
3 asm network (一般为priv asm选项)
1 oifcfg修改地址类型信息 --修改网卡if是干啥用的。
1.1 查看当前配置:
修改之前一定要备份OCR由于oracle所有应用设置为自动启动, 所以在crs启动时会试图启动所有的服务, 但是在对oracle相关的ip地址进行设置时需要crs处于运行状态. 但是数据库, asm和node application处于停止状态, 在一个节点执行以下命令:
# ./srvctl stop database -d node
# ./srvctl stop asm -n node1
# ./srvctl stop asm -n node2
# ./srvctl stop nodeapps -n node1
# ./srvctl stop nodeapps -n node2
---对ocr和olr进行备份。
ocrconfig -manualbackup
ocrconfig -manualbackup -local
# ./oifcfg getif -global
eth0 10.85.10.0 global public
eth1 192.168.1.0 global cluster_interconnect
1.2 删除当前配置
# ./oifcfg delif -global eth0
# ./oifcfg delif -global eth1
# ./oifcfg getif
1.3 重新添加
# ./oifcfg setif -global eth0/10.85.10.0:public
# ./oifcfg setif -global eth1/192.168.1.0:cluster_interconnect
# ./oifcfg getif
eth0 10.85.10.0 global public
eth1 192.168.1.0 global cluster_interconnect
# ./oifcfg iflist
eth0 192.168.86.0
eth1 192.168.0.0
eth2 192.168.200.0
eth3 192.168.200.0
eth4 192.168.200.0
eth5 192.168.200.0
注意: 这里IP 地址最一个为0. 代表的是一个网段。 修改的时候要切记。 否在在启动OCR 时 会报如下错误:
[ CRSOCR][4054413904] OCR context init failure. Error: PROC-44: 网络地址和网络接口操作中出错 网络地址和网络接口操作错误 [7]
1 对network的管理 --修改netnum1 的属性
srvctl remove network -all
srvctl remove network -all -force
srvctl add network -subnet 10.228.224.0/255.255.255.192/eno3
srvctl modify network -subnet 2409:8002:5A06:0120:0010:0000:0002:D000/116/eno3
srvctl config network
整个network1的属性为 :
10.228.224.0/255.255.255.192/eno3
2409:8002:5A06:0120:0010:0000:0002:D000/116/eno3
2 对vip的管理
--在不关闭ASM和数据库的条件下 修改 VIP
srvctl stop service -d orcl -s orcl -n node1
srvctl stop vip -n node1
srvctl modify vip -node edb2 -netnum 1 -address 10.228.22.17/255.255.255.192/eno3或者
srvctl modify nodeapps -n node1 -A vipaddress/netmask/interface_name
--重新添加
./srvctl remove vip -vip edb1-vip
Please confirm that you intend to remove the VIPs edb1-vip (y/[n]) y
./srvctl remove vip -vip edb2-vip
Please confirm that you intend to remove the VIPs edb2-vip (y/[n]) y
./srvctl config vip -n edb1./srvctl add vip -node edb1 -netnum 1 -address 10.228.24.16/255.255.255.192/eno3
./srvctl add vip -node edb2 -netnum 1 -address 10.228.24.17/255.255.255.192/eno3
./srvctl modify vip -node edb1 -netnum 1 -address 10.228.24.16/255.255.255.192/eno3
./srvctl modify vip -node edb2 -netnum 1 -address 10.228.22.17/255.255.255.192/eno3
./srvctl config vip -n edb1VIP EXISTS,NETWORK NUMBER 1 HOSTNAME NODE1.
1 在/etc/hosts文件中修改vip地址
2 使用srvctl 命令修改ocr
srvctl modify nodeapps -n node1 -A vipaddress/netmask/interface_name
nodeapps
network 1+vip +ons
3 对SCAN VIP的管理
不需要关闭ASM和数据库,重启SCAN即可。
关于scan的资源有 1 scan vip 2 scan_listener
srvctl status scan -i 1
srvctl stop scan -i 1
srvctl remove scan -i 1
srvctl add scan -n scan-name
srvctl modify scan -n scan_name
srvctl relocate scan_listener -i 1 -n rac01
4 对asmnet的管理