CentOS 5中改造RAC的private ip實現雙網路卡繫結
CentOS 5.4上安裝的10G RAC,原來的心跳是單網路卡的,需要修改為雙網路卡。
原來的環境如下:
eth0 192.168.2.x public ip
eth1 192.168.0.x private ip
增加了一塊網路卡,介面名為eth2,需要將eth1與新增加的eth2實現繫結,並使用原來的IP。
修改過程主要涉及到兩個問題:
1、實現雙網路卡繫結
2、修改RAC Interconnect interface name
實現過程如下:
1、實現CentOS5的雙網路卡繫結
在每個節點上以root使用者身份進入/etc/sysconfig/network-scripts/目錄,修改ifcfg-eth1、ifcfg-eth2檔案,然後建立ifcfg-bond0檔案,各個檔案內容如下:
ifcfg-eth1
[root@rac2 network-scripts]# cat ifcfg-eth1 DEVICE=eth1 USERCTL=no ONBOOT=yes MASTER=bond0 SLAVE=yes BOOTPROTO=none |
ifcfg-eth2
[root@rac2 network-scripts]# cat ifcfg-eth2 DEVICE=eth2 USERCTL=no ONBOOT=yes MASTER=bond0 SLAVE=yes BOOTPROTO=none |
ifcfg-bond0
需要注意的地方是,在CentOS5中,與CentOS4實現繫結的方式不同,需要將繫結引數(下面標記為綠色的一行)寫入ifcfg-bond0檔案中,而不是寫入/etc/modprobe.conf檔案中
[root@rac2 network-scripts]# cat ifcfg-bond0 DEVICE=bond0 ONBOOT=yes BOOTPROTO=none USERCTL=no IPADDR=192.168.0.102 NETMASK=255.255.255.0 GATEWAY=192.168.0.1 BONDING_OPTS="mode=0 miimon=100" |
修改/etc/modprobe.conf檔案,在檔案最後增加一行,內容為"alias bond0 bonding",與CentOS4不同的是,這裡不增加繫結引數的內容,因為繫結引數的內容已經配置在上面的ifcfg-bond0檔案中配置了
[root@rac2 network-scripts]# cat /etc/modprobe.conf alias scsi_hostadapter mptbase alias scsi_hostadapter1 mptspi alias scsi_hostadapter2 ata_piix options snd-ens1371 index=0 remove snd-ens1371 { /usr/sbin/alsactl store 0 >/dev/null 2>&1 || : ; }; /sbin/modprobe -r --ignore-remove snd-ens1371 options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180 # Added by VMware Tools install pciehp /sbin/modprobe -q --ignore-install acpiphp; /bin/true install pcnet32 (/sbin/modprobe -q --ignore-install vmxnet || /sbin/modprobe -q --ignore-install pcnet32 $CMDLINE_OPTS);/bin/true alias eth0 vmxnet alias eth1 vmxnet alias eth2 vmxnet alias bond0 bonding |
修改/etc/rc.d/rc.local檔案,在檔案中增加一行,內容為"ifenslave bond0 eth1 eth2"
[root@rac2 network-scripts]# cat /etc/rc.d/rc.local #!/bin/sh # # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don't # want to do the full Sys V style init stuff. touch /var/lock/subsys/local ifenslave bond0 eth1 eth2 chown oracle:oinstall /dev/raw/raw1 chown oracle:oinstall /dev/raw/raw2 chown oracle:oinstall /dev/raw/raw3 chown oracle:oinstall /dev/raw/raw4 chown oracle:oinstall /dev/raw/raw5 chmod 600 /dev/raw/raw1 chmod 600 /dev/raw/raw2 chmod 600 /dev/raw/raw3 chmod 600 /dev/raw/raw4 chmod 600 /dev/raw/raw5 |
不需要重啟主機,使用如下兩個命令使繫結生效:
[root@rac2 network-scripts]# ldconfig [root@rac2 ~]# /etc/init.d/network restart Shutting down interface bond0: [ OK ] Shutting down interface eth0: [ OK ] Shutting down loopback interface: [ OK ] Bringing up loopback interface: [ OK ] Bringing up interface bond0: [ OK ] Bringing up interface eth0: [ OK ] |
使用如下命令檢查繫結情況
[root@rac2 ~]# cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.4.0 (October 7, 2008) Bonding Mode: load balancing (round-robin) MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0 Slave Interface: eth1 MII Status: up Link Failure Count: 0 Permanent HW addr: 00:0c:29:a4:8a:8d Slave Interface: eth2 MII Status: up Link Failure Count: 0 Permanent HW addr: 00:0c:29:a4:8a:97 |
2、修改RAC Interconnect interface name
修改Interconnect interface name或ip主要使用oifcfg命令,這個命令需要保持crs開啟狀態。
修改的操作只需要在一個節點上完成。
檢查crs狀態
[root@rac1 ~]# crs_stat -t Name Type Target State Host ------------------------------------------------------------ ora....SM1.asm application ONLINE ONLINE rac1 ora....C1.lsnr application ONLINE ONLINE rac1 ora.rac1.gsd application ONLINE ONLINE rac1 ora.rac1.ons application ONLINE ONLINE rac1 ora.rac1.vip application ONLINE ONLINE rac1 ora....SM2.asm application ONLINE ONLINE rac2 ora....C2.lsnr application ONLINE ONLINE rac2 ora.rac2.gsd application ONLINE ONLINE rac2 ora.rac2.ons application ONLINE ONLINE rac2 ora.rac2.vip application ONLINE ONLINE rac2 [root@rac1 ~]# |
檢查CRS的public ip和private ip配置情況
[root@rac1 ~]# oifcfg getif eth0 192.168.2.0 global public eth1 192.168.0.0 global cluster_interconnect [root@rac1 ~]# |
這裡要修改的是cluster_interconnect的介面名,由eth1修改為bond0
修改的過程很簡單,首先刪除,然後再設定
[root@rac1 ~]# oifcfg delif -global eth1 [root@rac1 ~]# [root@rac1 ~]# oifcfg setif -global bond0/192.168.0.0:cluster_interconnect [root@rac1 ~]# |
修改完成之後,檢查修改是否生效
[root@rac1 ~]# oifcfg getif eth0 192.168.2.0 global public bond0 192.168.0.0 global cluster_interconnect [root@rac1 ~]# [root@rac1 ~]# oifcfg iflist eth0 192.168.2.0 bond0 192.168.0.0 [root@rac1 ~]# |
在兩個節點上重啟crs
[root@rac1 ~]# crsctl stop crs Stopping resources. Successfully stopped CRS resources Stopping CSSD. Shutting down CSS daemon. Shutdown request successfully issued. [root@rac1 ~]# crs_stat -t CRS-0184: Cannot communicate with the CRS daemon. [root@rac1 ~]# crsctl start crs Attempting to start CRS stack The CRS stack will be started shortly [root@rac1 ~]# crs_stat -t Name Type Target State Host ------------------------------------------------------------ ora....SM1.asm application ONLINE ONLINE rac1 ora....C1.lsnr application ONLINE ONLINE rac1 ora.rac1.gsd application ONLINE ONLINE rac1 ora.rac1.ons application ONLINE ONLINE rac1 ora.rac1.vip application ONLINE ONLINE rac1 ora....SM2.asm application ONLINE ONLINE rac2 ora....C2.lsnr application ONLINE ONLINE rac2 ora.rac2.gsd application ONLINE ONLINE rac2 ora.rac2.ons application ONLINE ONLINE rac2 ora.rac2.vip application ONLINE ONLINE rac2 |
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22049049/viewspace-1029339/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- centos 6.5 雙網路卡繫結CentOS
- CentOS 5.4上雙網路卡(多網路卡)繫結CentOS
- rac更改public and private的網路卡和ip
- 雙網路卡繫結
- CentOS6.x實現單網路卡雙IP的方法CentOS
- SUSE linux雙網路卡繫結一個IPLinux
- Redhat linux雙網路卡繫結一個IPRedhatLinux
- Linux 雙網路卡繫結實踐Linux
- Oracle 11gR2 RAC 單網路卡轉雙網路卡繫結配置Oracle
- Linux雙網路卡繫結單個IP之(team)Linux
- 華為server centos 6.5雙網路卡繫結操作步驟ServerCentOS
- Oracle RAC 與 網路卡繫結Oracle
- linux rac 網路卡繫結Linux
- linux雙網路卡繫結Linux
- redhat 6.3 雙網路卡繫結Redhat
- Linux 繫結雙網路卡Linux
- Linux 雙網路卡繫結Linux
- Redhat AS 5.4 雙網路卡繫結Redhat
- 【轉】redhat 雙網路卡繫結Redhat
- liunx下雙網路卡繫結
- RHEL6 雙網路卡繫結
- 關於AIX雙網路卡繫結AI
- linux redhat 雙網路卡繫結LinuxRedhat
- NIC bonding 雙網路卡繫結
- Linux單網路卡繫結多IP與多網路卡共用單IPLinux
- 虛擬機器雙網路卡繫結虛擬機
- linux6.5 雙網路卡繫結Linux
- Linux 雙網路卡繫結技術Linux
- RedHat Linux 5 雙網路卡繫結RedhatLinux
- Solaris下網路卡繫結多個IP
- Linux雙網路卡繫結實現負載均衡和失效保護Linux負載
- Linux雙網路卡聚合改造Linux
- 【Linux伺服器雙IP配置】如何實現不同IP的雙網路卡同時上網?Linux伺服器
- Linux網路卡繫結實現頻寬翻倍Linux
- OEL6.4(BOND)雙網路卡繫結實戰—附加說明
- Linux下雙網路卡繫結bond0Linux
- 多塊網路卡繫結IP在linux下Linux
- Windows下單網路卡繫結多個IP地址Windows