How to re-create the ASM

oracle_ace發表於2008-05-15

These days i was attempting to install the RAC with openfiler(ISCSI), it is approached to finished.
The lastest step is to create database with DBCA and its datafiles was based on ASM.
i misconfigured the ASM diskgroups during the database creation,so the dropping diskgroup will be raised up later.

How to deal with this issue?

SQL> select name from v$asm_diskgroup
  2  ;

NAME
------------------------------
IRMDB_DISKGROUP1


SQL> drop diskgroup irmdb_diskgroup1 including contents
  2  ;
drop diskgroup irmdb_diskgroup1 including contents
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15073: diskgroup IRMDB_DISKGROUP1 is mounted by another ASM instance

Notice: We can't drop the existing diskgroup with having to dismount them first.


SQL> alter diskgroup IRMDB_DISKGROUP1 dismount;
alter diskgroup IRMDB_DISKGROUP1 dismount
*
ERROR at line 1:
ORA-01565: error in identifying file '/ocfs/irmdb/dbs/spfile+ASM.ora'
ORA-27046: file size is not a multiple of logical block size
Additional information: 1


The error is occurred because i just modify the spfile few minutes ago. How big mistake i have made!!!
So,have no idea to deal with it, i may as well to re-create the ASM again.


How to deal with the ASM Uninstall?

1.In the RAC1 node1:

rac1-> export ORACLE_SID=+ASM1
rac1-> sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on Thu May 15 14:29:23 2008

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

SQL> conn / as sysdba;
Connected.
SQL> shutdown immediate;
ORA-15100: invalid or missing diskgroup name


ASM instance shutdown

2.In the RAC2 node2:
The same operation with the RAC1

3.Unregister the CRS in RAC1

rac1-> crs_stat|grep asm
NAME=ora.rac1.ASM1.asm
NAME=ora.rac2.ASM2.asm
rac1-> crs_unregister ora.rac1.ASM1.asm
rac1-> crs_unregister ora.rac2.ASM2.asm

4.Remove the directory of $ORACLE_BASE/admin/+ASM in both two nodes:

5.Don't forget to remove the line for both ASM instance on two nodes recorded in /etc/oratab otherwise you may encounter sucn error message during the ASM instance creation:
"PRKS-1011:Failed to check status of ASM instance
"+ASM1" on node "node1",[CRS-0210:Could not find resource
ora.node1.ASM1.asm.]"

 

vi /etc/oratab

# This file is used by ORACLE utilities.  It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.

# A colon, ':', is used as the field terminator.  A new line terminates
# the entry.  Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form.:
#   $ORACLE_SID:$ORACLE_HOME::
#
# The first and second fields are the system identifier and home
# directory of the database respectively.  The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
--remove this line--
+ASM1:/opt/oracle/product/10.2.0/db_1:N

ok.now we can recreate the ASM instance by using DBCA on both two nodes.

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

相關文章