基本情況
資料庫版本:Oracle 10.2.0.4
節點數:2
一. 停止oracle相關的所有進程, 包括資料庫, asm, node application, crs本身.
1.1、關閉所有進程,
crs_stop -all
2.2、 關閉crs後台進程, 在作業系統一級中止啟動並執行crs後台進程, 必須在所有節點上運行.
[root@rac1 bin]# /etc/init.d/init.crs stop
Shutting down Oracle Cluster Ready Services (CRS):
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
Shutdown has begun. The daemons should exit soon.
[root@rac2 ~]# /etc/init.d/init.crs stop
Shutting down Oracle Cluster Ready Services (CRS):
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
Shutdown has begun. The daemons should exit soon.
1.3、驗證進程是否全部關閉
[root@rac2 ~]# crs_stat -t
二、修改作業系統的ip設定
2.1、修改 /etc/hosts檔案(所有的節點)
[root@rac1 ~]# vim /etc/hosts
127.0.0.1 rac1 localhost.localdomain localhost
172.20.225.91 rac1
172.20.225.92 rac2
10.73.5.91 rac1-priv
10.73.5.92 rac2-priv
172.20.225.81 rac1-vip
172.20.225.82 rac2-vip
[root@rac2 ~]# vim /etc/hosts
127.0.0.1 rac2 localhost.localdomain localhost
172.20.225.91 rac1
172.20.225.92 rac2
10.73.5.91 rac1-priv
10.73.5.92 rac2-priv
172.20.225.81 rac1-vip
172.20.225.82 rac2-vip
2.2、兩個節點上分別修改eth0和eth1地址,重啟使ip生效
三、修改儲存連結
3.1 清除之前的連結(兩個節點執行)
1)停止服務
service iscsi stop
2)去除掛載
iscsiadm -m node --op delete
3)重啟服務
[root@rac1 ]# service iscsi restart
Stopping iSCSI daemon:
iscsid is stopped [ OK ]
Starting iSCSI daemon: [ OK ]
[ OK ]
Setting up iSCSI targets: iscsiadm: No records found!
[ OK ]
3.2重新連結
1)正確配置openfiler,請一定要嚴格按照文檔,不要遺漏任何一步。
2)掃描
[root@100-201 ~]# iscsiadm -m discovery -t sendtargets -p 10.73.5.80
172.100.10.100:3260,1 iqn.2006-01.com.openfiler:LUN2
172.100.10.100:3260,1 iqn.2006-01.com.openfiler:LUN1
3)重啟服務
service iscsi restart
四、啟動crs,設定oracle中ip相關配置
3.1查看服務
[root@rac1 ~]# crs_stat -t
- Name Type Target State Host
- ------------------------------------------------------------
- ora.jscn.db application OFFLINE OFFLINE
- ora....n1.inst application OFFLINE OFFLINE
- ora....n2.inst application OFFLINE OFFLINE
- ora....SM1.asm application OFFLINE OFFLINE
- ora....C1.lsnr application OFFLINE OFFLINE
- ora.rac1.gsd application OFFLINE OFFLINE
- ora.rac1.ons application OFFLINE OFFLINE
- ora.rac1.vip application OFFLINE OFFLINE
- ora....SM2.asm application OFFLINE OFFLINE
- ora....C2.lsnr application OFFLINE OFFLINE
- ora.rac2.gsd application OFFLINE OFFLINE
- ora.rac2.ons application OFFLINE OFFLINE
- ora.rac2.vip application OFFLINE OFFLINE
3.2 在兩個節點啟動crs, 並關閉隨crs啟動的應用程式
[root@rac1 ~]# /etc/init.d/init.crs start
Startup will be queued to init within 90 seconds.
[root@rac2 ~]# /etc/init.d/init.crs start
Startup will be queued to init within 90 seconds.
3.3 使用oifcfg修改網卡設定, oifconfig可以用來設定和查看網卡使用的方式.
註: 如果修改的網段相同,可以不做這一步。
-- 查看當前配置:
[root@rac2 raw]# oifcfg getif -global
eth0 192.168.0.0 global public
eth1 10.10.10.0 global cluster_interconnect
-- 刪除當前配置
[root@rac2 raw]# oifcfg delif -global eth0
[root@rac2 raw]# oifcfg delif -global eth1
[root@rac2 raw]# oifcfg getif
[root@rac2 raw]#
--查看當前網段
[root@rac1 ~]# oifcfg iflist
eth0
172.20.0.0
eth1
10.72.0.0
-- 重新添加
[root@rac2 raw]# oifcfg setif -global eth0/
172.20.0.0:public
[root@rac2 raw]# oifcfg setif -global eth1/
10.72.0.0:cluster_interconnect
[root@rac2 raw]# oifcfg getif
eth0 172.20.0.0 global public
eth1 10.72.0.0 global cluster_interconnect
[root@rac2 raw]# oifcfg iflist
eth0 172.20.0.0
eth1 10.72.0.0
注意: 這裡IP 位址最一個為0. 代表的是一個網段。 修改的時候要切記。 否在在啟動OCR 時 會報如下錯誤:
[ CRSOCR][4054413904] OCR context init failure. Error: PROC-44: 網路地址和網路介面操作中出錯 網路地址和網路介面操作錯誤 [7]