RAC先關後啟過程與在虛擬機器上更換IP過程
rac1-> emctl stop dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
Stopping Oracle Enterprise Manager 10g Database Control ...
... Stopped.
rac1-> srvctl stop service -d snowdb -s portdb
rac1-> srvctl stop database -d snowdb
rac1-> srvctl stop instance -d snowdb -i snowdb1
rac1-> srvctl stop instance -d snowdb -i snowdb2
rac1-> srvctl stop asm -n rac1
rac1-> srvctl stop asm -n rac2
rac1-> srvctl stop nodeapps -n rac1
rac1-> srvctl stop nodeapps -n rac2
rac1-> srvctl start nodeapps -n rac2
rac1-> srvctl start nodeapps -n rac1
rac1-> srvctl start asm -n rac2
rac1-> srvctl start asm -n rac1
rac1-> srvctl start instance -d snowdb -i snowdb1
rac1-> srvctl start instance -d snowdb -i snowdb2
rac1-> srvctl start database -d snowdb
rac1-> srvctl start service -d snowdb -s portdb
rac1-> emctl start dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
Starting Oracle Enterprise Manager 10g Database Control ................. started.
------------------------------------------------------------------
Logs are generated in directory /u01/oracle/product/10.2.0/dbs/rac1_snowdb1/sysman/log
====================================================================]
IP 地址更改問題;
1. /etc/hosts
127.0.0.1 rac1 localhost.localdomain localhost
#Pubilic
192.168.1.195 rac1.fastrise.com rac1
192.168.1.196 rac2.fastrise.com rac2
#Private
192.168.2.195 rac1-priv.fastrise.com rac1-priv
192.168.2.196 rac2-priv.fastrise.com rac2-priv
#Virtual
192.168.1.205 rac1-vip.fastrise.com rac1-vip
192.168.1.206 rac2-vip.fastrise.com rac2-vip
2. cd /etc/sysconfig/network-scripts/ 更改IP及其MAC (建議圖形化)
ifcfg-eth0
ifcfg-eth1
3. 更改VIP地址:
/u01/oracle/product/10.2.0/crs/bin/srvctl modify nodeapps -n rac1 -A 192.168.1.205/255.255.255.0/eth0
/u01/oracle/product/10.2.0/crs/bin/srvctl modify nodeapps -n rac2 -A 192.168.1.206/255.255.255.0/eth0
4. 重新配置兩機相通
分別在兩臺機器上先刪除後加配
rm-Rf ~/.ssh
mkdir ~/.ssh
chmod 700 ~/.ssh
ssh-keygen -t rsa
ssh-keygen -t dsa
在RAC1執行:
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
ssh rac2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ssh rac2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
scp ~/.ssh/authorized_keys rac2:~/.ssh/authorized_keys
5.在啟動ASM2時有發現,啟動不了,於是去看log後,發現有如下錯誤
------------------------------------------------------------------------------------------------------------------------------------
rac2-> srvctl start nodeapps -n rac1
rac2-> srvctl start nodeapps -n rac2
rac2-> srvctl start asm -n rac1
rac2-> srvctl start asm -n rac2
PRKS-1009 : Failed to start ASM instance "+ASM2" on node "rac2", [PRKS-1009 : Failed to start ASM instance "+ASM2" on node "rac2", [rac2:ora.rac2.ASM2.asm:
rac2:ora.rac2.ASM2.asm:SQL*Plus: Release 10.2.0.1.0 - Production on Tue Oct 6 10:11:07 2009
rac2:ora.rac2.ASM2.asm:
rac2:ora.rac2.ASM2.asm:Copyright (c) 1982, 2005, Oracle. All rights reserved.
rac2:ora.rac2.ASM2.asm:
rac2:ora.rac2.ASM2.asm:Enter user-name: Connected to an idle instance.
rac2:ora.rac2.ASM2.asm:
rac2:ora.rac2.ASM2.asm:SQL> ORA-03113: end-of-file on communication channel
rac2:ora.rac2.ASM2.asm:SQL> Disconnected
rac2:ora.rac2.ASM2.asm:
CRS-0215: Could not start resource 'ora.rac2.ASM2.asm'.]]
[PRKS-1009 : Failed to start ASM instance "+ASM2" on node "rac2", [rac2:ora.rac2.ASM2.asm:
rac2:ora.rac2.ASM2.asm:SQL*Plus: Release 10.2.0.1.0 - Production on Tue Oct 6 10:11:07 2009
rac2:ora.rac2.ASM2.asm:
rac2:ora.rac2.ASM2.asm:Copyright (c) 1982, 2005, Oracle. All rights reserved.
rac2:ora.rac2.ASM2.asm:
rac2:ora.rac2.ASM2.asm:Enter user-name: Connected to an idle instance.
rac2:ora.rac2.ASM2.asm:
rac2:ora.rac2.ASM2.asm:SQL> ORA-03113: end-of-file on communication channel
rac2:ora.rac2.ASM2.asm:SQL> Disconnected
rac2:ora.rac2.ASM2.asm:
CRS-0215: Could not start resource 'ora.rac2.ASM2.asm'.]]
發現啟動不了,就用startup來
rac2-> export ORACLE_SID=+ASM2
rac2-> sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Oct 6 10:20:17 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ASM instance started
Total System Global Area 92274688 bytes
Fixed Size 1217884 bytes
Variable Size 65890980 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
SQL> exit
還能啟動起來,再查下
rac2-> crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....SM1.asm application ONLINE OFFLINE
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
ora.snowdb.db application OFFLINE OFFLINE
ora....rtdb.cs application OFFLINE OFFLINE
ora....db1.srv application OFFLINE OFFLINE
ora....b1.inst application OFFLINE OFFLINE
ora....b2.inst application OFFLINE OFFLINE
把節點1上,給OFFLINE了,有點奇怪啊!不爽,再用startup去開啟節點1上,報錯
rac1-> export ORACLE_SID=+ASM1
rac1-> sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Oct 6 10:25:46 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected.
SQL> startup
ORA-10997: another startup/shutdown operation of this instance inprogress
ORA-09968: unable to lock file
Linux Error: 11: Resource temporarily unavailable
Additional information: 7911
SQL> exit
看來怪事多多啊,按自己想的思路行不通,檢視ASM的alert_+ASM2.log
Interface type 1 eth1 172.16.100.0 configured from OCR for use as a cluster interconnect
WARNING 172.16.100.0 could not be translated to a network address error 1
Interface type 1 eth0 172.16.99.0 configured from OCR for use as a public interface
WARNING 172.16.99.0 could not be translated to a network address
WARNING: No cluster interconnect has been specified. Depending on
the communication driver configured Oracle cluster traffic
may be directed to the public interface of this machine.
Oracle recommends that RAC clustered databases be configured
with a private interconnect for enhanced security and
performance.
Picked latch-free SCN scheme 2
原來還有IP地址沒更改掉啊,就是公網IP與私網IP的設定問題。
rac1-> oifcfg
Name:
oifcfg - Oracle Interface Configuration Tool.
Usage: oifcfg iflist [-p [-n]]
oifcfg setif {-node
oifcfg getif [-node
oifcfg delif [-node
oifcfg [-help]
rac2-> oifcfg getif
eth0 172.16.99.0 global public
eth1 172.16.100.0 global cluster_interconnect
rac1-> oifcfg setif -global eth0/192.168.1.0:public //增加 eth0
rac1-> oifcfg setif -global eth1/192.168.2.0:cluster_interconnect //增加 eth1
rac2-> oifcfg getif
eth0 172.16.99.0 global public
eth0 192.168.1.0 global public
eth1 172.16.100.0 global cluster_interconnect
eth1 192.168.2.0 global cluster_interconnect
rac1-> oifcfg delif -global eth0/172.16.99.0 //刪除 eth0
rac1-> oifcfg delif -global eth0/172.16.100.0 //刪除 eth1
rac2-> oifcfg getif
eth0 192.168.1.0 global public
eth1 192.168.2.0 global cluster_interconnect
---------------------------------------------------------------------------------------------------------------------------------------
6.再次去開啟後,一切正常。若發現有哪項啟動不了,一定要先關再開原則。
rac2-> srvctl start asm -n rac1
rac2-> srvctl start asm -n rac2
rac2-> srvctl start instance -d snowdb -i snowdb1
rac2-> srvctl start instance -d snowdb -i snowdb2
rac2-> srvctl start database -d snowdb
rac2-> srvctl start service -d snowdb -s portdb
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/15242702/viewspace-1027690/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 用虛擬機器做RAC的全過程虛擬機
- Java虛擬機器啟動過程解析Java虛擬機
- BigBlueButton安裝過程(在虛擬機器中)虛擬機
- 虛擬機器實現dataguard配置過程虛擬機
- Java虛擬機器類載入的過程Java虛擬機
- 弄清Java虛擬機器GC的執行過程Java虛擬機GC
- vsan儲存資料恢復過程—虛擬機器故障恢復過程資料恢復虛擬機
- ovftool匯出虛擬機器報錯處理過程!虛擬機
- 虛擬機器類載入機制_類載入的過程虛擬機
- 深入理解JVM(③)虛擬機器的類載入過程JVM虛擬機
- 虛擬機器資料丟失恢復過程記錄虛擬機
- 通過rman在同一臺機器上搭建standby大致過程!
- Oracle10g RAC開啟關閉過程Oracle
- 伺服器癱瘓導致虛擬機器丟失恢復過程伺服器虛擬機
- IP欺騙原理與過程分析
- 一次虛擬機器 (virtual box + vagrant + homestead) 崩潰與 debug 的過程虛擬機
- RS6000 更換硬碟的過程(轉)硬碟
- 整理:RAC搭建過程
- EMC Isilon儲存誤刪除虛擬機器的恢復過程虛擬機
- centos6虛擬機器安裝到開始使用過程指引&LAMPCentOS虛擬機LAMP
- Oracle RAC+ASM 關閉全過程OracleASM
- 計算機啟動過程計算機
- 阻塞(block)過程模擬與分析!BloC
- 11gR2 RAC ASM啟動過程ASM
- KVM宿主機上檢視虛擬機器ip虛擬機
- Dalvik虛擬機器為新建立物件分配記憶體的過程分析虛擬機物件記憶體
- [深入理解Java虛擬機器]第七章 類載入的過程Java虛擬機
- oracle rac vip 漂移過程Oracle
- Samza在YARN上的啟動過程 =》 之二 submitApplicationYarnMITAPP
- 在ubuntu虛擬機器上通過tomcat部署react的build專案Ubuntu虛擬機TomcatReactUI
- Windows啟動過程(MBR引導過程分析)Windows
- 虛擬機器(三)虛擬機器配置靜態Ip虛擬機
- [IDE工具篇]windows下安裝虛擬機器和Ubuntu的詳細過程IDEWindows虛擬機Ubuntu
- 深入理解 Python 虛擬機器:協程初探——不過是生成器而已Python虛擬機
- 記錄VMware虛擬機器安裝winXP時踩坑並解決的過程虛擬機
- 虛擬機器去虛擬化過魯大師教程虛擬機
- 在Linux中,開機啟動過程是什麼?Linux
- Windows 啟動過程Windows