【RAC】OIFCFG 工具的使用
工具 RAC 使用
2023-09-14 08:57:29 时间
The Oracle Interface Configuration Tool(OIFCFG) command-line interface 命令行工具可以用来定义和管理网卡信息配置:
1 Allocate and deallocate network interfaces to components
2 Direct components to use specific network interfaces
3 Retrieve component configuration information
grid@rac1:/home/grid oifcfg -h
Name:
oifcfg - Oracle Interface Configuration Tool.
Usage: oifcfg iflist [-p [-n]]
-p: Displays a heuristic assumption of the interface type (PRIVATE, PUBLIC, or UNKNOWN)
-n: Displays the netmask
oifcfg setif {-node | -global} {/:}...
oifcfg getif [-node | -global] [ -if [/] [-type ] ]
oifcfg delif {{-node | -global} [[/]] [-force] | -force}
oifcfg [-help]
-为通信网络所知的主机名 /etc/hosts里面的定义的hostname
- 系统中配置的接口的名称 比如 eth0,eth1
- 接口的子网地址
- 接口类型 { cluster_interconnect | public }
A network interface can be stored as a global interface (as reported by the iflist command) or as a node-specific interface:
An interface is stored as a global interface when all of the nodes of an Oracle Real Application Clusters (Oracle RAC) cluster have the same interface connected to the same subnet. The global interface (and configuring all nodes with the same network interface for each public subnet and the same network interface for each private subnet) is not only the recommended configuration, but it is also the default installation configuration.
An interface can be stored as a node-specific (local) interface.
Note:
oracle现在还不支持不同节点使用不同的网段。建议rac节点配置public ip和private ip时使用对应的相同的网段。
Oracle currently does not support having different network interfaces for each node in the cluster.
The best practice is to configure all nodes with the same network interface for each public subnet and the same network interface for each private subnet.
getif查看当前节点的网卡配置属性:
grid@rac1:/home/grid oifcfg getif
网卡名 子网 接口类型
eth0 10.250.7.0 global public 公网ip
eth1 10.250.7.0 global cluster_interconnect 私有ip
iflist显示网卡列表
grid@rac1:/home/grid oifcfg iflist
eth0 10.250.7.0
eth1 10.250.7.0
eth1 169.254.0.0
grid@rac1:/home/grid
setif 修改RAC的ip:
Note:
确保当使用setif 命令的时候,所有节点都是正常运行的,因为oracle 不能对down 机的节点的Grid Plug and Play profiles 进行更新
比如修改私有IP
grid@rac1:/home/grid oifcfg setif -global eth1/10.10.10.0:cluster_interconnect
grid@rac1:/home/grid oifcfg getif
eth0 10.250.7.0 global public
eth1 10.250.7.0 global cluster_interconnect
eth1 10.10.10.0 global cluster_interconnect
删除私有ip
Note:
Use the oifcfg delif command to delete the stored configuration for global or node-specific interfaces. A specific node-specific or global interface can be deleted by supplying the interface name, with an optional subnet, on the command line.
Note:
如果执行不带任何对象的oifcfg delif 命令,那么 OIFCFG 集群中所有的网卡配置信息(这个我就不做测试了)
grid@rac1:/home/grid oifcfg delif -global eth1
PRIF-31: Failed to delete the specified network interface because it is the last private interface
解决办法: Add new private interface first before deleting the old private interface.
对于重复的情况,要具体指定要删除的私有ip
grid@rac1:/home/grid oifcfg delif -global eth1/10.250.7.0:cluster_interconnect
grid@rac1:/home/grid oifcfg getif
eth0 10.250.7.0 global public
eth1 10.10.10.0 global cluster_interconnect
OIFCFG 使用注意事项:
1 Oracle Universal Installer使用OIFCFG来识别并显示可用的网卡。
2 修改网卡名称的影响视修改的类型(public,private)不同而不同,不论是否同时修改网卡对应ip。
比如:In cases where you change only the interface names, the ramifications are minor.
如果要修改public类型的网卡对应的name,注意此名称存储在OCR中,必须同时要修改所有节点中的nodeapps。因此必须重启nodeapps以便修改生效
3 当使用global参数修改的时候,必须重启集群中的所有节点;对于本地的修改,则只要重启本地节点就可以了。
Interconnect changes for the database occur at instance startup. However, the interconnect for Oracle Clusterware might be different.
4 因为内联心跳是在实例启动的时候被使用,在正在运行的系统上仅仅执行OIFCFG命令并不能立即生效。当且仅当受oifcfg 修改命令影响的组件重启之后,修改生效。
5 对Clusterware层的变更,需要整个集群处于正常运行状态,因为oracle 不能对down 机的节点的Grid Plug and Play profiles 进行更新
crs 没有起来的话会遇到:
grid@rac1:/home/grid oifcfg getif
PRIF-10: failed to initialize the cluster registry
相关文章
- WCE-hash注入工具使用
- 【工具】一款oracle rac 检查工具
- 【RAC】 oracleasm 工具对应的日志记录
- python打造漏洞数据导出工具
- Photoshop的绘图工具
- Veeam VBR 加固存储库一键配置工具
- 文件预览工具类
- OBS桌面视频直播软件/推流工具使用指南
- unity打成aar上传到maven库的工具
- TCPUDPDbg(TCP UDP 网络调试工具)
- Chrome 开发者工具 live expression 的用法
- yenv - 一个使用 JAML 文件管理环境的 Node.js 工具
- mac 蓝牙 串口调试 助手(工具)
- 前端工具webpack4.0各个击破——html部分
- 前端MVC Vue2学习总结(六)——axios与跨域HTTP请求、Lodash工具库
- Android动态禁用或开启屏幕旋转工具