9、 启动ASM
[Oracle@shiyueasm~]$ sqlplus / as sysdba
SQL*Plus:Release 10.2.0.1.0 - Production on Mon Aug 8 11:39:22 2011
Copyright(c) 1982, 2005, Oracle. All rightsreserved.
Connectedto an idle instance.
SQL>startup
ORA-29701: unable to connect toCluster Manager
[注]出现错误,该错误是由于没有添加CSS服务所致,所以下一步我们来添加CSS服务。
10、 添加CSS服务
[root@shiyueasm~]# /u01/app/oracle/product/10.2/db_1/bin/localconfig add
/etc/oracledoes not exist. Creating it now.
Successfullyaccumulated necessary OCR keys.
CreatingOCR keys for user 'root', privgrp 'root'..
Operationsuccessful.
Configurationfor local CSS has been initialized
Adding toinittab
Startupwill be queued to init within 90 seconds.
Checkingthe status of new Oracle init process...
Expectingthe CRS daemons to be up within 600 seconds.
CSS isactive on these nodes.
shiyueasm
CSS isactive on all nodes.
Oracle CSS service is installed andrunning under init(1M)
11、 重新启动ASM
[oracle@shiyueasm~]$ sqlplus / as sysdba
SQL*Plus:Release 10.2.0.1.0 - Production on Mon Aug 8 11:44:46 2011
Copyright(c) 1982, 2005, Oracle. All rightsreserved.
Connectedto an idle instance.
SQL>startup
ASMinstance started
TotalSystem Global Area 92274688 bytes
FixedSize 1217884 bytes
VariableSize 65890980 bytes
ASMCache 25165824 bytes
ORA-15110: no diskgroups mounted
【注】出现ORA-15110的错误是正常的,因为我们还没有创建磁盘组呢。
12、创建ASM磁盘组
(1)external冗余方式
SQL> creatediskgroup shiyueasm external redundancy disk 'ORCL:VOL01';
Diskgroupcreated.
SQL> alterdiskgroup shiyueasm add disk 'ORCL:VOL02';
Diskgroupaltered.
SQL> selectname ,state from v$asm_diskgroup;
NAME STATE
------------------------------ -----------
SHIYUEASM MOUNTED
(2)normal冗余方式
SQL>create diskgroup shiyueasm normal redundancy
2 failgroup shiyueasm_1 disk 'ORCL:VOL01'
3 failgroup shiyueasm_2 disk 'ORCL:VOL02';
Diskgroupcreated.
SQL> selectname,block_size,free_mb,state from v$asm_diskgroup;
NAME BLOCK_SIZE FREE_MB STATE
------------------------------ ---------- ---------- -----------
SHIYUEASM 4096 10126 MOUNTED
【注】我们可以看到使用normal方式的冗余10G的空间我们只能使用50%,在生产环境下一班会选择external这样一种外部冗余方式
