Oracle11g R2 RAC安裝

it_newbalance發表於2012-12-17
   安裝環境如下:VMWARE軟體:VMSERVER 2.0.2
作業系統: Redhat Enterprise Linux AS 5.4 x86-64
每個機器分配2G的記憶體(沒有2G的記憶體,建議就不要安裝11g R2 rac了),12G的磁碟空間(11G安裝作業系統和ORACLE,1G用作SWAP空間)。
折騰了2天終於搞好了,發現11g R2 RAC遠高於10g,比如啟動ASM的例項,系統強制要求memory_target最少是256M!
啟動dbconsole後,發現機器已經非常慢了,系統的load >20,經過觀察應該主要還是筆記本的磁碟IO太慢了,WAIT的cpu幾乎到50%,導致CPU很忙!
安裝過程網上有大把安裝文件就不詳細寫了,不過我這裡配置了GNS(網格命名服務),使用SCAN來管理群集的LISTENER,這樣以後新增或刪除節點的時候
客戶端不用修改連線串,只要寫一個GNS-NAME就可以連線到任何一個節點上面。
遇到了如下的問題:
1、作業系統空間不夠使用
       給系統12G的空間是肯定沒法安裝下11gR2的GRID INFRA和DB SOFTWARE的,我們可以計算下空間需求:
      作業系統需要3G
     SWAP空間需要1G
     GRID INFRA軟體需要3.5G
     DB SOFT需要4.5G
     以上合計:12G
  由於我係統分割槽如下
/dev/sda1   11G掛接到 /分割槽下
/dev/sda2    1G掛接到 swap下面
後來在VMWARE中把磁碟擴大到15G,但是要把這多出的3G空間分配給/,這個就很麻煩了,因為我沒有使用LVM來管理系統檔案,
因此需要通過安裝盤boot到linux rescue模式,把根分割槽和SWAP分割槽都 umount下來,然後刪除swap分割槽和根分割槽,再建立新的分割槽,
/dev/sda1  14G  根分割槽
/dev/sda2  1G    swap
然後再使用resize2fs把根分割槽resize到14G。
這樣搞有個好處就是不用重新安裝作業系統,檔案系統就完成擴充套件了。
 
2、GNS配置錯誤,導致GRID INFRA安裝後的root.sh執行出錯
      root.sh執行到最後提示如下錯誤:
Preparing packages for installation...
cvuqdisk-1.0.7-1
Configure Oracle Grid Infrastructure for a Cluster ... failed
Updating inventory properties for clusterware
Starting Oracle Universal Installer...
結果檢查發現由於如下錯誤,導致VIP不能啟動
2010-06-01 15:01:36: output for start nodeapps is  PRCR-1079 : Failed to start resource ora.node1-11gr2-rac.vip CRS-5015: Agent timed out waiting for a response from the DHCP server CRS-2674: Start of 'ora.node1-11gr2-rac.vip' on 'node1-11gr2-rac' failed CRS-2632: There are no more servers to try to place resource 'ora.node1-11gr2-rac.vip' on that would satisfy its placement policy
2010-06-01 15:01:36: output of startnodeapp after removing already started mesgs is PRCR-1079 : Failed to start resource ora.node1-11gr2-rac.vip CRS-5015: Agent timed out waiting for a response from the DHCP server CRS-2674: Start of 'ora.node1-11gr2-rac.vip' on 'node1-11gr2-rac' failed CRS-2632: There are no more servers to try to place resource 'ora.node1-11gr2-rac.vip' on that would satisfy its placement policy
2010-06-01 15:01:36: /u01/grid/bin/srvctl start nodeapps -n node1-11gr2-rac ... failed
2010-06-01 15:01:36: /u01/grid/bin/srvctl start nodeapps -n node1-11gr2-rac ... failed
2010-06-01 15:01:36: Install cvuqdisk rpm on Linux...
2010-06-01 15:01:36: New package to install is /u01/grid/cv/rpm/cvuqdisk-1.0.7-1.rpm
2010-06-01 15:01:36: Invoking "/bin/rpm -q cvuqdisk" command
2010-06-01 15:01:36: no existing cvuqdisk found
2010-06-01 15:01:36: removing old rpm
2010-06-01 15:01:36: installing/upgrading new rpm
2010-06-01 15:01:38: Configure Oracle Grid Infrastructure for a Cluster ... failed
好像是DHCP服務沒有給vip分配到地址導致vip不能啟動,唉搞GNS確實比較麻煩,因為需要配置DHCP、DNS等配置,經過檢查發現是DNS配置有問題,導致vip不能啟動
執行刪除配置
節點1執行[root@node1-11gr2-rac install]# /u01/grid/crs/install/roothas.pl -delete -force -verbose
節點2執行[root@node2-11gr2-rac install]# /u01/grid/crs/install/rootcrs.pl -verbose -deconfig -force -lastnode
這時11g R2一個做得比較好的地方,可以刪除crs的配置(關鍵是這個命令刪除得很乾淨,比手工刪除更完全),而不用刪除軟體,就可以重新配置,節省了不少時間。
配置好DNS後,
[root@node1-11gr2-rac bin]# nslookup rac-cluster-scan.us.oracle.com
Server:         10.10.10.221
Address:        10.10.10.221#53
Name:   rac-cluster-scan.us.oracle.com
Address: 10.10.10.213
Name:   rac-cluster-scan.us.oracle.com
Address: 10.10.10.211
Name:   rac-cluster-scan.us.oracle.com
Address: 10.10.10.212
[root@node1-11gr2-rac bin]#
再執行root.sh成功!
[root@node2-11gr2-rac ~]# /u01/grid/bin/crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS      
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.OCRVOTING1.dg
               ONLINE  ONLINE       node1-11gr2-rac                             
               ONLINE  ONLINE       node2-11gr2-rac                             
ora.asm
               ONLINE  ONLINE       node1-11gr2-rac          Started            
               ONLINE  ONLINE       node2-11gr2-rac          Started            
ora.eons
               ONLINE  ONLINE       node1-11gr2-rac                             
               ONLINE  ONLINE       node2-11gr2-rac                             
ora.gsd
               OFFLINE OFFLINE      node1-11gr2-rac                             
               OFFLINE OFFLINE      node2-11gr2-rac                             
ora.net1.network
               ONLINE  ONLINE       node1-11gr2-rac                             
               ONLINE  ONLINE       node2-11gr2-rac                             
ora.ons
               ONLINE  ONLINE       node1-11gr2-rac                             
               ONLINE  ONLINE       node2-11gr2-rac                             
ora.registry.acfs
               ONLINE  ONLINE       node1-11gr2-rac                             
               ONLINE  ONLINE       node2-11gr2-rac                             
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       node2-11gr2-rac                             
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       node1-11gr2-rac                             
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       node1-11gr2-rac                             
ora.node1-11gr2-rac.vip
      1        ONLINE  ONLINE       node1-11gr2-rac                             
ora.node2-11gr2-rac.vip
      1        ONLINE  ONLINE       node2-11gr2-rac                             
ora.oc4j
      1        OFFLINE OFFLINE                                                  
ora.scan1.vip
      1        ONLINE  ONLINE       node2-11gr2-rac                             
ora.scan2.vip
      1        ONLINE  ONLINE       node1-11gr2-rac                             
ora.scan3.vip
      1        ONLINE  ONLINE       node1-11gr2-rac                             
[root@node2-11gr2-rac ~]#
GNS給scan的3個VIP地址是通過DHCP服務給的,分別是
10.10.10.254
10.10.10.253
10.10.10.252

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24558279/viewspace-751232/,如需轉載,請註明出處,否則將追究法律責任。

相關文章