" Comma separated node names
-f Force stop
-h Print usage
rac2-> srvctl stop diskgroup -g data -n rac2
rac2->
rac2->
rac2-> crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.DATA.dg ora....up.type ONLINE ONLINE rac1
ora....ER.lsnr ora....er.type ONLINE ONLINE rac1
ora....N1.lsnr ora....er.type ONLINE ONLINE rac1
ora....N2.lsnr ora....er.type ONLINE ONLINE rac2
ora....N3.lsnr ora....er.type ONLINE ONLINE rac2
ora.asm ora.asm.type ONLINE ONLINE rac1
ora.eons ora.eons.type ONLINE ONLINE rac1
ora.gsd ora.gsd.type ONLINE ONLINE rac1
ora....network ora....rk.type ONLINE ONLINE rac1
ora.oc4j ora.oc4j.type OFFLINE OFFLINE
ora.ons ora.ons.type ONLINE ONLINE rac1
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 ora....t1.type ONLINE ONLINE rac1
ora....SM2.asm application ONLINE ONLINE rac2
ora....C2.lsnr application OFFLINE OFFLINE
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip ora....t1.type ONLINE ONLINE rac2
ora.racdb.db ora....se.type ONLINE ONLINE rac1
ora.scan1.vip ora....ip.type ONLINE ONLINE rac1
ora.scan2.vip ora....ip.type ONLINE ONLINE rac2
ora.scan3.vip ora....ip.type ONLINE ONLINE rac2
rac2-> srvctl status diskgroup -g data
Disk Group data is running on rac1
rac2-> ps -ef|grep asm
grid 5153 1 0 08:57 ? 00:00:00 asm_pmon_+ASM2
grid 5157 1 0 08:57 ? 00:00:02 asm_vktm_+ASM2
grid 5163 1 0 08:57 ? 00:00:00 asm_gen0_+ASM2
grid 5167 1 0 08:57 ? 00:00:01 asm_diag_+ASM2
grid 5171 1 0 08:57 ? 00:00:00 asm_ping_+ASM2
grid 5175 1 0 08:57 ? 00:00:00 asm_psp0_+ASM2
grid 5179 1 0 08:57 ? 00:00:04 asm_dia0_+ASM2
grid 5184 1 0 08:57 ? 00:00:02 asm_lmon_+ASM2
grid 5188 1 0 08:57 ? 00:00:01 asm_lmd0_+ASM2
grid 5194 1 0 08:57 ? 00:00:01 asm_lms0_+ASM2
grid 5200 1 0 08:57 ? 00:00:00 asm_lmhb_+ASM2
grid 5204 1 0 08:57 ? 00:00:00 asm_mman_+ASM2
grid 5208 1 0 08:57 ? 00:00:00 asm_dbw0_+ASM2
grid 5212 1 0 08:57 ? 00:00:00 asm_lgwr_+ASM2
grid 5216 1 0 08:57 ? 00:00:00 asm_ckpt_+ASM2
grid 5220 1 0 08:57 ? 00:00:00 asm_smon_+ASM2
grid 5224 1 0 08:57 ? 00:00:00 asm_rbal_+ASM2
grid 5228 1 0 08:57 ? 00:00:00 asm_gmon_+ASM2
grid 5232 1 0 08:57 ? 00:00:00 asm_mmon_+ASM2
grid 5236 1 0 08:57 ? 00:00:00 asm_mmnl_+ASM2
grid 5245 1 0 08:57 ? 00:00:00 asm_lck0_+ASM2
grid 5299 1 0 08:58 ? 00:00:00 asm_asmb_+ASM2
grid 5304 1 0 08:58 ? 00:00:00oracle+ASM2_asmb_+asm2 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
grid 6584 6177 0 09:13 pts/2 00:00:00 grep asm
ORA-15097: cannot SHUTDOWN ASM instance with connected client
srvctl stop asm -n enode1 -f
PRCR-1014 : Failed to stop resource ora.asm
PRCR-1065 : Failed to stop resource ora.asm
CRS-2673: Attempting to stop 'ora.asm' on 'enode1'
ORA-15097: cannot SHUTDOWN ASM instance with connected client
CRS-2675: Stop of 'ora.asm' on 'enode1' failed
CRS-2675: Stop of 'ora.asm' on 'enode1' failed
RAC 环境是Oracle 11gR2。 在Metalink上搜了一下,明白咋回事了。 还是习惯的问题。
在Oracle 10g 环境下,我们停RAC的顺序是:
(1)数据库
(2)ASM
(3)CRS
但是在Oracle 11gR2下,如果是用OUI来安装的话,除了数据文件之外,OCR 也是放在ASM里的。 11gR2是支持RAW设备的,但是需要手动的安装。
所以这里就遇到了问题。 OCR也是放在ASM里的,这样CRSD 就会成为ASM的客户端。 如果我们像Oracle 10g里那样直接停ASM的时候,就会报上面的错误。 所以,在11gR2下面,要停ASM实例的话,只能和CRS一起停。
在root用户下执行:crsctl stop crs
注意:不要直接kill 掉ASM 进程,或者用shutdown abort 来关闭ASM 实例。 这样CRS 也会被挂掉。
[root@rac2 ~]# crsctl stop cluster -n rac2
CRS-2673: Attempting to stop 'ora.crsd' on 'rac2'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'rac2'
CRS-2673: Attempting to stop 'ora.asm' on 'rac2'
CRS-2677: Stop of 'ora.asm' on 'rac2' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'rac2' has completed
CRS-2677: Stop of 'ora.crsd' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'rac2'
CRS-2673: Attempting to stop 'ora.ctssd' on 'rac2'
CRS-2673: Attempting to stop 'ora.evmd' on 'rac2'
CRS-2673: Attempting to stop 'ora.asm' on 'rac2'
CRS-2677: Stop of 'ora.cssdmonitor' on 'rac2' succeeded
CRS-2677: Stop of 'ora.evmd' on 'rac2' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'rac2' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'rac2'
CRS-2677: Stop of 'ora.cssd' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.diskmon' on 'rac2'
CRS-2677: Stop of 'ora.diskmon' on 'rac2' succeeded
[root@rac2 ~]# crsctl start cluster -n rac2
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'rac2'
CRS-2676: Start of 'ora.cssdmonitor' on 'rac2' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'rac2'
CRS-2672: Attempting to start 'ora.diskmon' on 'rac2'
CRS-2676: Start of 'ora.diskmon' on 'rac2' succeeded
CRS-2676: Start of 'ora.cssd' on 'rac2' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'rac2'
CRS-2676: Start of 'ora.ctssd' on 'rac2' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'rac2'
CRS-2672: Attempting to start 'ora.evmd' on 'rac2'
CRS-2676: Start of 'ora.evmd' on 'rac2' succeeded
CRS-2676: Start of 'ora.asm' on 'rac2' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'rac2'
CRS-2676: Start of 'ora.crsd' on 'rac2' succeeded
[root@rac2 ~]# ps -ef|grep pmon
grid 7946 1 0 09:31 ? 00:00:00 asm_pmon_+ASM2
root 8477 4642 0 09:32 pts/2 00:00:00 grep pmon
rac2-> srvctl modify listener -p 1522
rac2-> srvctl stop listener -n rac2
rac2-> srvctl start listener -n rac2
SQL> conn / as sysdba
Connected.
SQL> alter system set local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=rac2-vip)(PORT=1521))))' sid='+ASM2';
System altered.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Real Application Clusters and Automatic Storage Management options
rac2-> srvctl modify listener -p 1521
rac2-> lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 01-AUG-2014 10:02:32
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 01-AUG-2014 09:57:21
Uptime 0 days 0 hr. 5 min. 11 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/rac2/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.32)(PORT=1522)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.52)(PORT=1522)))
The listener supports no services
The command completed successfully
rac2-> srvctl stop listener -n rac2
rac2-> srvctl start listener -n rac2
本文原创发布php中文网,转载请注明出处,感谢您的尊重!