Home » RDBMS Server » Server Administration » ASM: Dropping a newly created disk group (Solaris 2.10 Oracle 11203)
ASM: Dropping a newly created disk group [message #550171] Fri, 06 April 2012 08:21 Go to next message
BeefStu
Messages: 208
Registered: October 2011
Senior Member
All:

Just wanted to share the following information.

I was setting up disks groups and I accidently created one group (DATA) with "NORMAL" redundancy but wanted it to be "EXTERNAL". I tried using asmca to remove disks from the group, drop the group, change the reduncancy..... All of this failed because there was an spfile on the disk group.

I finally got it to work with using this procedure:


sqlplus '/ as sysasm'

SQL*Plus: Release 11.2.0.3.0 Production on Thu Apr 5 08:58:19 2012

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


SQL> drop diskgroup DATA;
drop diskgroup DATA
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15053: diskgroup "DATA" contains existing files



SQL> select group_number, file_number, bytes, permissions, type from V$ASM_FILE;

GROUP_NUMBER FILE_NUMBER      BYTES PERMISSIONS
------------ ----------- ---------- ----------------
TYPE
----------------------------------------------------------------
           2         253       1536 rw-rw-rw-
ASMPARAMETERFILE


ASMCMD> spget
+DATA/asm/asmparameterfile/registry.253.779721947


ASMCMD> spmove +DATA/asm/asmparameterfile/registry.253.779721947 

/u01/app/11.2.0/grid/dbs/spfile+ASM.ora

ASMCMD> spget
/u01/app/11.2.0/grid/dbs/spfile+ASM.ora

ASMCMD> shutdown
ASM diskgroups volume disabled
ASM diskgroups dismounted
ASM instance shutdown
Connected to an idle instance.


SMCMD> startup
ASM instance started

Total System Global Area  284008448 bytes
Fixed Size                  2158616 bytes
Variable Size             256684008 bytes
ASM Cache                  25165824 bytes
ASM diskgroups mounted
ASM diskgroups volume enabled


ASMCMD> spget
/u01/app/11.2.0/grid/dbs/spfile+ASM.ora


SQL> select group_number, file_number, bytes, permissions, type from V$ASM_FILE;

GROUP_NUMBER FILE_NUMBER      BYTES PERMISSIONS
------------ ----------- ---------- ----------------
TYPE
----------------------------------------------------------------
           2         253       1536 rw-rw-rw-
ASMPARAMETERFILE

SQL> select name, group_number from v$asm_diskgroup
  2  ;

NAME                           GROUP_NUMBER
------------------------------ ------------
FRA                                       1
DATA                                      2


SQL> alter diskgroup DATA drop file 

'+DATA/asm/asmparameterfile/registry.253.779721947';

Diskgroup altered.


SQL> select * from V$ASM_FILE;

no rows selected

SQL> drop diskgroup DATA;

Diskgroup dropped.


Go back into asmca and re-create the disk group.




In summary, I am not sure why chaning the redunancy would be so difficult if there is data on the disk group. Can somebody explain that?
Re: ASM: Dropping a newly created disk group [message #550174 is a reply to message #550171] Fri, 06 April 2012 08:27 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Did you try
drop diskgroup ... including contents;

Regards
Michel
Re: ASM: Dropping a newly created disk group [message #550181 is a reply to message #550174] Fri, 06 April 2012 09:19 Go to previous messageGo to next message
BeefStu
Messages: 208
Registered: October 2011
Senior Member
Yes I did and it gave me the same error as I reported above. Not sure why, but it did. That why I took this approach.
Re: ASM: Dropping a newly created disk group [message #550184 is a reply to message #550181] Fri, 06 April 2012 09:44 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
You are trying to drop spfile that is been used by the ASM instance itself.
ASM would not allow it.
Once you move the spfile out of ASM or start ASM with pfile (that resides out of ASM),
you can drop the disk.
This has nothing to do with "changing redundancy" as such.
Re: ASM: Dropping a newly created disk group [message #550185 is a reply to message #550181] Fri, 06 April 2012 10:57 Go to previous message
John Watson
Messages: 8929
Registered: January 2010
Location: Global Village
Senior Member
You could have taken a different approach to this.
Redundancy is applied per file, according to the file's template. When you specify redundancy at disc group creation time, all you are doing is setting up the default templates.
This (in asmcmd) will show you the templates currently available:
lstmpl -l -G data
You can change these later, with the chtmpl command or ALTER DISKGROUP MODIFY TEMPLATE. That way, you would not have had to drop and re-create the group.
Previous Topic: Oracle server shutdown
Next Topic: how to get the ddl of a view
Goto Forum:
  


Current Time: Fri Apr 19 13:44:01 CDT 2024