今天配置手动配置asm遇到一个问题,在启动asm实例的时候提示:

ORA-29701 :unable to connect to Cluster Manager
我在oracle的官方论坛找到一种方法:
Please run the following batch files in the $ORACLE_HOME/bin directory
cd $ORACLE_HOME/bin
localconfig delete (根据提示在root下执行/u01/app/oracle/product/10.2/db_1/bin/localconfig add命令)
localconfig add
This will help you to solve your problem
第一个问题解决了,启动asm实例却报了ORA-15110: no diskgroups mounted 错误
【注】启动实例的时候出现ORA-15110错误非常正常,因为我们还没有创建diskgroup
SQL> select path,mount_status from v$asm_disk order by disk_number;
    PATH
——————————————————————————–
MOUNT_S
——-
ORCL:MYVOL1
    CLOSED
    ORCL:MYVOL2
    CLOSED
【注】此时查询 v$asm_disk,可以看到我们之前创建的ASM磁盘MYVOL1和MYVOL2,如果没有看到,则是设置的asm_diskstring参数不正确,需要调整。
– 开始创建磁盘组
SQL> create diskgroup diskgrp1 normal redundancy
2     failgroup failgrp1 disk ‘ORCL:MYVOL1′
3     failgroup failgrp2 disk ‘ORCL:MYVOL2′;
Diskgroup created.
SQL> select path,mount_status from v$asm_disk order by disk_number;
PATH
——————————————————————————–
MOUNT_S
——-
ORCL:MYVOL1
    CACHED
ORCL:MYVOL2
    CACHED
【注】创建磁盘组后,再次查询v$asm_disk视图,发现ASM磁盘的状态由closed变成cached    
9. 创建spfile,重启实例
– 创建spfile    
SQL> create spfile from pfile;
File created.
SQL> shut immediate
ASM diskgroups dismounted
ASM instance shutdown
SQL> startup
ASM instance started
Total System Global Area 130023424 bytes
Fixed Size                  2082208 bytes
Variable Size             102775392 bytes
ASM Cache                  25165824 bytes
    ORA-15110: no diskgroups mounted
【注】非常奇怪,这个地方有提示没有磁盘组mounted,决定手动mount看看
SQL> alter diskgroup all mount;
alter diskgroup all mount
*
ERROR at line 1:
ORA-15110: no diskgroups mounted
【注】手动mount失败,继续提示没有磁盘组,参考oracle错误信息,看一下asm的参数设置,发现asm_diskgroups 没有值,设置上,手动mount成功,再次重启成功。
ORA-15110: no diskgroups mounted
Cause:          No diskgroups were specified in the ASM_DISKGROUPS parameter, so instance startup or the ALTER DISKGROUP ALL MOUNT command did not mount any diskgroups.
Action:           Specify valid diskgroups in the ASM_DISKGROUPS parameter or ignore the error.
SQL> show parameter asm
NAME                                 TYPE        VALUE
———————————— ———– ——————————
    asm_diskgroups                       string
asm_diskstring                       string      ORCL:MYVOL*
asm_power_limit                      integer     1
SQL> alter system set asm_diskgroups=”diskgrp1″ scope=both;
System altered.
SQL> alter diskgroup all mount;
Diskgroup altered.
SQL> shut immediate
ASM diskgroups dismounted
ASM instance shutdown
SQL> startup
ASM instance started
Total System Global Area 130023424 bytes
Fixed Size                  2082208 bytes
Variable Size             102775392 bytes
ASM Cache                  25165824 bytes
ASM diskgroups mounted
SQL>
自此ASM磁盘组创建成功!