Oracle 10.2.0.4修改RAC的ip

來源:互聯網
上載者:User

基本情況

資料庫版本: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
  1. Name           Type           Target    State     Host  
  2. ------------------------------------------------------------   
  3. ora.jscn.db    application    OFFLINE   OFFLINE  
  4. ora....n1.inst application    OFFLINE   OFFLINE  
  5. ora....n2.inst application    OFFLINE   OFFLINE  
  6. ora....SM1.asm application    OFFLINE   OFFLINE  
  7. ora....C1.lsnr application    OFFLINE   OFFLINE  
  8. ora.rac1.gsd   application    OFFLINE   OFFLINE  
  9. ora.rac1.ons   application    OFFLINE   OFFLINE  
  10. ora.rac1.vip   application    OFFLINE   OFFLINE  
  11. ora....SM2.asm application    OFFLINE   OFFLINE  
  12. ora....C2.lsnr application    OFFLINE   OFFLINE  
  13. ora.rac2.gsd   application    OFFLINE   OFFLINE  
  14. ora.rac2.ons   application    OFFLINE   OFFLINE  
  15. 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]
  • 1
  • 2
  • 下一頁

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.