ASM: Dropping a newly created disk group [message #550171] |
Fri, 06 April 2012 08:21 |
|
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 #550185 is a reply to message #550181] |
Fri, 06 April 2012 10:57 |
John Watson
Messages: 8962 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.
|
|
|