Linux+Oracle 10g RAC双网卡绑定和解除绑定
在虚拟机VMware GSX Server上安装两套redhet Enterprise-R4-U4系统rac1和rac2,虚拟共享存储, 在此基础上搭建的oracle10g RAC环
一、软硬件环境概述
在虚拟机VMware GSX Server上安装两套redhet Enterprise-R4-U4系统rac1和rac2,虚拟共享存储, 在此基础上搭建的Oracle10g RAC环境。
1、 rac1两块网卡eth0:192.168.2.111,eth1:10.10.10.11
2、 rac2两块网卡eth0:192.168.2.112,eth1:10.10.10.12
/etc/hosts文件:
127.0.0.1
localhost
192.168.2.111
rac1.mycorpdomain.com
rac1
192.168.2.13
rac1-vip.mycorpdomain.com
rac1-vip
10.10.10.11
rac1-priv.mycorpdomain.com
rac1-priv
192.168.2.112
rac2.mycorpdomain.com
rac2
192.168.2.14
rac2-vip.mycorpdomain.com
rac2-vip
10.10.10.12
rac2-priv.mycorpdomain.com
rac2-priv
二、添加网卡eth2
1、 在rac1和rac2上分别以host-only的模式添加一块网卡
a、 Edit virtual machine
b、 Add进入add hardware wizard,下一步
c、 选择ethernet adapter 下一步
d、 选择host-only,完成
2、启动虚拟机,此时ifconfig –a可以看见多出了一个网卡eth2,只是没有IP地址,在network configuration图形界面的hardware选项页可以看见eth2,status为OK。
三、在rac1和rac2上停数据库和crs#cd /u01/app/oracle/product/10.2.0/crs_1/bin
停数据库实例
#./srvctl stop instance –d devdb –i ora.devdb.devd1.inst
#./srvctl stop instance –d devdb –i ora.devdb.devd2.inst
停数据库
#./srvctl stop database –d devdb
停ASM实例
#./srvctl stop asm –n rac1
#./srvctl stop asm –n rac2
停vip,gsd,listener,ons
#./srvctl stop nodeapps –n rac1
#./srvctl stop nodeapps –n rac2
四、更改网卡配置绑定网卡更改eth0和eth2的配置文件,将eth0和eth2绑定为一块虚拟网卡bond0.
1、 首先在/etc/sysconfig/network-scripts/下创建虚拟网卡bond0的配置文件ifcfg-bond0
#cd /etc/sysconfig/network-scripts/
#vi ifcfg-bond0
DEVICE=bond0
BOOTPROTO=none
BROADCAST=192.168.2。255
IPADDR=192.168.2.111
NETMASK=255.255.255.0
NETWORK=192.168.2.0
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
PEERDNS=yes
GATEWAY=192.168.168.250
IPV6INIt=no
2、 更改eth0的配置文件ifcfg-eth0,更改后的内容如下
Vi ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
MASTER=bond0
SLAVE=yes
3、 添加eth2的配置文件ifcfg-eth2
Vi ifcfg-eth2
DEVICE=eth2
BOOTPROTO=none
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
MASTER=bond0
SLAVE=yes
4、 因为linux的虚拟网卡是在内核模块中实现的,所以需要安装的时候已经装好该module。在/etc/modules.conf文件中添加如下内容(如果没有该文件,则新建一个):
alias bond0 bonding
options bond0 miimon=100 mode=0 primary=eth0
其中miimon=100表示每100ms检查一次链路连接状态,如果不通则会切换物理网卡,mode=1表示主备模式,也就是只有一块网卡是active的,只提供失效保护。如果mode=0则是负载均衡模式的,所有的网卡都是active,还有其他一些模式很少用到,primary=eth0表示主备模式下eth0为默认的active网卡
5、 在/etc/rc.local中加入modprobe bonding miimon=100 mode=0
6、 在rac2上也进行同样的修改
7、 重启后生效,,ifconfig -a查看可以发现多了bond0这个网卡,配置了原来eth0的ip配置,在network configuration的图形界面可以发现也多了bond0

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



Full table scanning may be faster in MySQL than using indexes. Specific cases include: 1) the data volume is small; 2) when the query returns a large amount of data; 3) when the index column is not highly selective; 4) when the complex query. By analyzing query plans, optimizing indexes, avoiding over-index and regularly maintaining tables, you can make the best choices in practical applications.

InnoDB's full-text search capabilities are very powerful, which can significantly improve database query efficiency and ability to process large amounts of text data. 1) InnoDB implements full-text search through inverted indexing, supporting basic and advanced search queries. 2) Use MATCH and AGAINST keywords to search, support Boolean mode and phrase search. 3) Optimization methods include using word segmentation technology, periodic rebuilding of indexes and adjusting cache size to improve performance and accuracy.

Yes, MySQL can be installed on Windows 7, and although Microsoft has stopped supporting Windows 7, MySQL is still compatible with it. However, the following points should be noted during the installation process: Download the MySQL installer for Windows. Select the appropriate version of MySQL (community or enterprise). Select the appropriate installation directory and character set during the installation process. Set the root user password and keep it properly. Connect to the database for testing. Note the compatibility and security issues on Windows 7, and it is recommended to upgrade to a supported operating system.

The difference between clustered index and non-clustered index is: 1. Clustered index stores data rows in the index structure, which is suitable for querying by primary key and range. 2. The non-clustered index stores index key values and pointers to data rows, and is suitable for non-primary key column queries.

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

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

MySQL is an open source relational database management system. 1) Create database and tables: Use the CREATEDATABASE and CREATETABLE commands. 2) Basic operations: INSERT, UPDATE, DELETE and SELECT. 3) Advanced operations: JOIN, subquery and transaction processing. 4) Debugging skills: Check syntax, data type and permissions. 5) Optimization suggestions: Use indexes, avoid SELECT* and use transactions.

In MySQL database, the relationship between the user and the database is defined by permissions and tables. The user has a username and password to access the database. Permissions are granted through the GRANT command, while the table is created by the CREATE TABLE command. To establish a relationship between a user and a database, you need to create a database, create a user, and then grant permissions.
