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

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

The retention period of Oracle database logs depends on the log type and configuration, including: Redo logs: determined by the maximum size configured with the "LOG_ARCHIVE_DEST" parameter. Archived redo logs: Determined by the maximum size configured by the "DB_RECOVERY_FILE_DEST_SIZE" parameter. Online redo logs: not archived, lost when the database is restarted, and the retention period is consistent with the instance running time. Audit log: Configured by the "AUDIT_TRAIL" parameter, retained for 30 days by default.

The function in Oracle to calculate the number of days between two dates is DATEDIFF(). The specific usage is as follows: Specify the time interval unit: interval (such as day, month, year) Specify two date values: date1 and date2DATEDIFF(interval, date1, date2) Return the difference in days

The Oracle database startup sequence is: 1. Check the preconditions; 2. Start the listener; 3. Start the database instance; 4. Wait for the database to open; 5. Connect to the database; 6. Verify the database status; 7. Enable the service (if necessary ); 8. Test the connection.

The amount of memory required by Oracle depends on database size, activity level, and required performance level: for storing data buffers, index buffers, executing SQL statements, and managing the data dictionary cache. The exact amount is affected by database size, activity level, and required performance level. Best practices include setting the appropriate SGA size, sizing SGA components, using AMM, and monitoring memory usage.

The INTERVAL data type in Oracle is used to represent time intervals. The syntax is INTERVAL <precision> <unit>. You can use addition, subtraction, multiplication and division operations to operate INTERVAL, which is suitable for scenarios such as storing time data and calculating date differences.

To find the number of occurrences of a character in Oracle, perform the following steps: Get the total length of a string; Get the length of the substring in which a character occurs; Count the number of occurrences of a character by subtracting the substring length from the total length.

The method of replacing strings in Oracle is to use the REPLACE function. The syntax of this function is: REPLACE(string, search_string, replace_string). Usage steps: 1. Identify the substring to be replaced; 2. Determine the new string to replace the substring; 3. Use the REPLACE function to replace. Advanced usage includes: multiple replacements, case sensitivity, special character replacement, etc.

Oracle database server hardware configuration requirements: Processor: multi-core, with a main frequency of at least 2.5 GHz. For large databases, 32 cores or more are recommended. Memory: At least 8GB for small databases, 16-64GB for medium sizes, up to 512GB or more for large databases or heavy workloads. Storage: SSD or NVMe disks, RAID arrays for redundancy and performance. Network: High-speed network (10GbE or higher), dedicated network card, low-latency network. Others: Stable power supply, redundant components, compatible operating system and software, heat dissipation and cooling system.
