为RAC私有网络配置网卡Bonding
私有网络是RAC节点间通信的通道,包括节点间的网络心跳信息、Cache fusion传递数据块都需要通过私有网络。而很多的私有网络都仅仅
在RAC的安装部署过程中,并不仅仅是简单的安装完成了事,整个安装过程要考虑可能出现的单点问题,其中比较重要的是私有网络。
私有网络是RAC节点间通信的通道,包括节点间的网络心跳信息、Cache fusion传递数据块都需要通过私有网络。而很多的私有网络都仅仅是一块单独的网卡连接上交换机就完成了,更有甚者,直接使用服务器间网卡互连的方式配置私有网络。这种部署方式简单,但RAC投入使用后风险非常大,存在诸多单点如网卡、网线、交换机口、交换机。几乎每个组件发生故障都会导致RAC split,,所以建议为私有网络配置双网卡bonding。
Linux双网卡绑定实现负载均衡(Bonding双网卡绑定)
Linux Bonding的初始状态问题以及解决
多网卡绑定Bonding生产实战
多网卡负载均衡(双网卡做Bonding模式)
在CentOS 6.4下安装Oracle 11gR2(x64)
Oracle 11gR2 在VMWare虚拟机中安装步骤
Debian 下 安装 Oracle 11g XE R2
下面是我的配置步骤:
环境:
OS:CentOS release 6.4 (Final)
Oracle:11.2.0.4 RAC
网卡:4个 em1,em2,em3,em4,当前em1作为公有网卡,em3作为私有网卡已经启用了,em2和em4闲置。
配置bond模块并加载(在2个节点执行):
编辑/etc/modprobe.d/bonding.conf加入内容:
[root@node2 ~]# vi /etc/modprobe.d/bonding.conf
alias bond0 bonding
[root@node2 ~]# modprobe -a bond0
验证:
[root@node2 ~]# lsmod |grep bond
bonding 127331 0
8021q 25317 1 bonding
ipv6 321422 274 bonding,ip6t_REJECT,nf_conntrack_ipv6,nf_defrag_ipv6
编辑网卡配置文件,编辑成如下内容:
节点一:
Ifcfg-em2:
DEVICE=em2
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
Ifcfg-em4:
DEVICE=em4
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
Ifcfg-bond0:
DEVICE=bond0
MASTER=yes
BOOTPROTO=node
ONBOOT=yes
BONDING_OPTS="mode=1 miimon=100"
IPADDR=10.10.10.105
PREFIX=24
GATEWAY=10.10.10.1
节点二:
ifcfg-em2:
DEVICE=em2
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
ifcfg-em4:
DEVICE=em4
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
Ifcfg-bond0:
DEVICE=bond0
MASTER=yes
BOOTPROTO=node
ONBOOT=yes
BONDING_OPTS="mode=1 miimon=100"
IPADDR=10.10.10.106
PREFIX=24
GATEWAY=10.10.10.1
我这里使用的是mode=1的主备网卡模式,平时只激活一块网卡,一旦主网卡发生故障,会切换链路到备网卡,其他也可以考虑4,6两种mode。
修改完了配置文件之后,分别在2个节点启动bond0:ifup bond0。
此时可以看到:
[root@node1 ~]# ifconfig
bond0 Link encap:Ethernet HWaddr C8:1F:66:FB:6F:CB
inet addr:10.10.10.105 Bcast:10.10.10.255 Mask:255.255.255.0
inet6 addr: fe80::ca1f:66ff:fefb:6fcb/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:9844809 errors:0 dropped:0 overruns:0 frame:0
TX packets:7731078 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:9097132073 (8.4 GiB) TX bytes:6133004979 (5.7 GiB)
em2 Link encap:Ethernet HWaddr C8:1F:66:FB:6F:CB
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:9792915 errors:0 dropped:0 overruns:0 frame:0
TX packets:7731078 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9088278883 (8.4 GiB) TX bytes:6133004979 (5.7 GiB)
Interrupt:38
em4 Link encap:Ethernet HWaddr C8:1F:66:FB:6F:CB
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:51894 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8853190 (8.4 MiB) TX bytes:0 (0.0 b)
Interrupt:36
网卡的bonding已经配置成功了。
测试验证
此时可以测试分别断掉em2 em4,在一个节点长ping另一个节点的私有IP,并结合/proc/net/bonding/bond0的信息观察primary slave的变化,可以发现当down一个网卡时ping不会中断。
Bond0配置好之后,接下来一步就是把配置成RAC的私有网卡。
为了避免配置失败,首先要备份好原来的配置文件。
以grid用户在2个节点对$GRID_HOME/ grid/gpnp/noden/profiles/peer/profile.xml文件执行备份:
cd /u01/app/11.2.0/grid/gpnp/noden/profiles/peer
cp profile.xml profile.xml.bk
[root@node2 peer]# ls
pending.xml profile_orig.xml profile.xml profile.xml.bk、
查看目前的私有网络配置:
node2-> oifcfg getif
em1 192.168.10.0 global public
em3 10.10.10.0 global cluster_interconnect
先添加新的私有网络,在任一节点执行即可:
node1-> oifcfg setif -global bond0/10.10.10.0:cluster_interconnect
这一步在执行时可能会报错:
node1-> oifcfg setif -global bond0/10.10.10.0:cluster_interconnect
PRIF-33: Failed to set or delete interface because hosts could not be discovered
CRS-02307: No GPnP services on requested remote hosts.
PRIF-32: Error in checking for profile availability for host node2
CRS-02306: GPnP service on host "node2" not found.
这是因为gpnpd服务异常导致的。
解决方法:可以Kill掉gpnpd进程,GI会自动重新启动gpnpd服务。
在2个节点执行:
[root@node2 ~]# ps -ef| grep gpnp
grid 4927 1 0 Sep22 ? 00:26:38 /u01/app/11.2.0/grid/bin/gpnpd.bin
grid 48568 46762 0 17:26 pts/3 00:00:00 tail -f /u01/app/11.2.0/grid/log/node2/gpnpd/gpnpd.log
root 48648 48623 0 17:26 pts/4 00:00:00 grep gpnp
[root@node2 ~]# kill -9 4927
[root@node2 ~]#
参考gpnpd.log
添加私有网络之后,我们按照如下步骤将原来的私有网络删除:
首先停止并disable掉crs。
以root用户在2个节点分别执行以下命令:
停止crs
crsctl stop crs
禁用crs
crsctl disable crs
修改hosts文件,将私有IP地址改为新地址。
2个节点分别执行:
ping node1-priv
ping node2-priv
再启动crs。
[root@node2 ~]# crsctl enable crs
CRS-4622: Oracle High Availability Services autostart is enabled.
[root@node2 ~]# crsctl start crs
删除原来的私有网络:
node2-> oifcfg delif -global em3/10.10.10.0:cluster_interconnect
检查验证,配置成功了。
node2-> oifcfg getif
em1 192.168.10.0 global public
bond0 10.10.10.0 global cluster_interconnect
node2->
更多详情见请继续阅读下一页的精彩内容:

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

This article explores optimizing MySQL memory usage in Docker. It discusses monitoring techniques (Docker stats, Performance Schema, external tools) and configuration strategies. These include Docker memory limits, swapping, and cgroups, alongside

This article addresses MySQL's "unable to open shared library" error. The issue stems from MySQL's inability to locate necessary shared libraries (.so/.dll files). Solutions involve verifying library installation via the system's package m

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

This article compares installing MySQL on Linux directly versus using Podman containers, with/without phpMyAdmin. It details installation steps for each method, emphasizing Podman's advantages in isolation, portability, and reproducibility, but also

This article provides a comprehensive overview of SQLite, a self-contained, serverless relational database. It details SQLite's advantages (simplicity, portability, ease of use) and disadvantages (concurrency limitations, scalability challenges). C

This guide demonstrates installing and managing multiple MySQL versions on macOS using Homebrew. It emphasizes using Homebrew to isolate installations, preventing conflicts. The article details installation, starting/stopping services, and best pra

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]
