ORACLE 11GR2 RAC的网络规划解析
在ORACLE11gR2中,安装RAC发生了显著变化。在10g以及11gR1的时代,安装RAC的步骤是先安装CRS,再安装DB,而到了11gR2的时代,crs与asm被集成在一起,合称为GRID
在ORACLE 11gR2中,安装RAC发生了显著变化。在10g以及11gR1的时代,安装RAC的步骤是先安装CRS,再安装DB,而到了11gR2的时代,crs与asm被集成在一起,香港虚拟主机,合称为GRID,必须先安装GRID后,才能继续安装DB,网站空间,否则,你就跟11gR2的RAC无缘了,呵呵。下面我们说一下ORACLE 11g R2 RAC的网络规划,从ORACLE 11.2开始,对网络IP地址有特殊要求,增加SCAN IP,所以从11.2开始至少需要4种IP地址。
假设一个服务器上有4块网卡: eth0,eth1,eth2,eth3.
可以将eth0 和 eth2 绑定成 bond0。作为RAC的public-ip, 提供外部通信。
然后将eth1和eth3 绑定成bond1,作为RAC的private-ip,提供内部心跳通信。
服务器上的HBA卡通过光纤交换机与后端存储通信。
我们看一下/etc/hosts文件里的内容
10.18.12.140 S1P32 # RAC1 Public
10.18.12.142 S1P32-vip # RAC1 VIP
22.22.22.140 S1P32-priv # RAC1 Private
10.18.12.141 S1P33 # RAC2 Public
10.18.12.143 S1P33-vip # RAC2 VIP
22.22.22.141 S1P33-priv #RAC2 Private
10.18.12.144 catdb-scan # RAC SCAN
1、 我们先说一下PUBLIC和VIP
Oracle RAC中每个节点都有一个虚拟IP,简称VIP, 与公网PUBLIC IP在同一个网段。vip 附属在public网口接口。
VIP和PUBLIC IP最主要的不同之处在于:VIP是浮动的,而PUBLIC IP是固定的。在所有节点都正常运行时,香港虚拟主机,每个节点的VIP会被分配到public NIC上;在linux下ifconfig查看,public网卡上是2个IP地址;如果一个节点宕机,这个节点的VIP会被转移到还在运行的节点上。也就是幸存的节点的public NIC这个网卡上,会有3个IP地址。
从图上看PUBLIC IP地址是一个双网卡绑定的公有地址,外部用户通过交换机S1来进行访问。
2、 再看RAC中的 Private
RAC中的 Private私有IP用于心跳同步,这个对于用户层面,可以直接忽略。简单理解,这个Ip用来保证两台服务器同步数据用的,属于RAC内部之间通信。priv 与public 不应同属一个接口。
另外一个大家疑问的问题:做RAC时,用于两个node间互连的网卡是否可以用交叉线连接?
Metalink上的RAC文档是推荐使用交换机作为内部网卡的连接,而不使用交叉线,原因是避免因为对连节点关闭或重启而导致网卡检查到链接故障状态而删除绑定的协议。导致高速缓存合并网络将会变为不可用。
从图上看,两个节点间的内部通信通过交换机S2来进行交互。
3、 RAC中的SCAN IP
在11gR2中,SCAN IP是作为一个新增IP出现的, scan ip其实是oracle在客户端与数据库之间,新加的一个连接层,当有客户端访问时,连接到 SCAN IP LISTENER, 而SCAN IP LISTENER接收到连接请求时,会根据 LBA 算法将该客户端的连接请求,转发给对应的instance上的VIP LISTENER,从而完成了整个客户端与服务器的连接过程。简化如下:
client -> scan listener -> local listener -> local instance
也可以把scan理解为一个虚拟主机名,它对应的是整个RAC集群。客户端主机只需通过这个scan name即可访问数据库集群的任意节点。当然访问的节点是随机的,oracle强烈建议通过DNS Server的round robin模式配置解析SCAN,实现负载均衡(即轮换连接SCAN对应的IP地址)。这有点类似通过vip和listener loadbalance配置实现负载均衡的原理。
Oracle RAC本身比较复杂,在安装和管理中可能会遇到各种问题,涉及到OS、RDBMS、Cluster软件和网络、主机、存储等硬件,为了避免不必要的问题发生,在安装之前进行清晰的网络规划对于整个架构是非常重要的,愿与大家共同交流学习。
本文出自 “滴水穿石” 博客,请务必保留此出处

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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

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











Solutions to Oracle cannot be opened include: 1. Start the database service; 2. Start the listener; 3. Check port conflicts; 4. Set environment variables correctly; 5. Make sure the firewall or antivirus software does not block the connection; 6. Check whether the server is closed; 7. Use RMAN to recover corrupt files; 8. Check whether the TNS service name is correct; 9. Check network connection; 10. Reinstall Oracle software.

The method to solve the Oracle cursor closure problem includes: explicitly closing the cursor using the CLOSE statement. Declare the cursor in the FOR UPDATE clause so that it automatically closes after the scope is ended. Declare the cursor in the USING clause so that it automatically closes when the associated PL/SQL variable is closed. Use exception handling to ensure that the cursor is closed in any exception situation. Use the connection pool to automatically close the cursor. Disable automatic submission and delay cursor closing.

In Oracle, the FOR LOOP loop can create cursors dynamically. The steps are: 1. Define the cursor type; 2. Create the loop; 3. Create the cursor dynamically; 4. Execute the cursor; 5. Close the cursor. Example: A cursor can be created cycle-by-circuit to display the names and salaries of the top 10 employees.

Oracle views can be exported through the EXP utility: Log in to the Oracle database. Start the EXP utility, specifying the view name and export directory. Enter export parameters, including target mode, file format, and tablespace. Start exporting. Verify the export using the impdp utility.

When Oracle log files are full, the following solutions can be adopted: 1) Clean old log files; 2) Increase the log file size; 3) Increase the log file group; 4) Set up automatic log management; 5) Reinitialize the database. Before implementing any solution, it is recommended to back up the database to prevent data loss.

Building a Hadoop Distributed File System (HDFS) on a CentOS system requires multiple steps. This article provides a brief configuration guide. 1. Prepare to install JDK in the early stage: Install JavaDevelopmentKit (JDK) on all nodes, and the version must be compatible with Hadoop. The installation package can be downloaded from the Oracle official website. Environment variable configuration: Edit /etc/profile file, set Java and Hadoop environment variables, so that the system can find the installation path of JDK and Hadoop. 2. Security configuration: SSH password-free login to generate SSH key: Use the ssh-keygen command on each node

Oracle is not only a database company, but also a leader in cloud computing and ERP systems. 1. Oracle provides comprehensive solutions from database to cloud services and ERP systems. 2. OracleCloud challenges AWS and Azure, providing IaaS, PaaS and SaaS services. 3. Oracle's ERP systems such as E-BusinessSuite and FusionApplications help enterprises optimize operations.

To stop an Oracle database, perform the following steps: 1. Connect to the database; 2. Shutdown immediately; 3. Shutdown abort completely.
