I have a ASM dism "mounted" I want to change the name and use it for datafiles and Archives

LindaC
LindaC used Ask the Experts™
on
I have a ASM diks "mounted" I want to change the name and use it for datafiles and Archives.
The new name would be DATA2:
ORacle Rac - Version 10.2.0.3

SQL> select name, state, type, total_mb, free_mb from v$asm_diskgroup;

NAME                           STATE       TYPE     TOTAL_MB    FREE_MB
------------------------------ ----------- ------ ---------- ----------
DATA                           CONNECTED   EXTERN     245760       3636
FRA                            MOUNTED     EXTERN      61440      61336
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
johnsoneSenior Oracle DBA

Commented:
I have never done it, but according to the doc, there seems to be a utility rename.

http://docs.oracle.com/cd/E11882_01/server.112/e18951/asmdiskgrps.htm#sthref421

Seems pretty straightforward.

Author

Commented:
Is this for oracle 10.2.0.3 also?
johnsoneSenior Oracle DBA

Commented:
Sorry, I missed the version in your original post.

I don't see a way in the documentation for 10.2 to rename a disk group.  Seems the only way would be to drop and re-add.

http://docs.oracle.com/cd/B19306_01/server.102/b14231/storeman.htm#sthref1747
Success in ‘20 With a Profitable Pricing Strategy

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Commented:
This was the answer:

1- The disk was in mounted state not connected.
2- The disk had inside some old backups, not important.
3- Check the name of the disk via asm log. In my case this was the disk used as seen in the asm log:  /u01/app/oracle/admin/+ASM/bdump

Sun Oct 17 03:15:34 2010
NOTE: cache mounting group 1/0xFA11FD5C (DATA) succeeded
SUCCESS: diskgroup DATA was mounted
...
NOTE: cache opening disk 0 of grp 2: ASM_FRA_DISK1 path:/dev/rdisk/oracle/asm_data_disk4 ---> Only one disk for FRA diskgroup
NOTE: F1X0 found on disk 0 fcn 0.822509
NOTE: cache mounting (not first) group 2/0xFA21FD5D (FRA)
...
Sun Oct 17 03:15:35 2010
NOTE: cache mounting group 2/0xFA21FD5D (FRA) succeeded
SUCCESS: diskgroup FRA was mounted

4- The following will read the "header of the disk" count=1 4096:
dd if=/dev/rdisk/oracle/asm_data_disk4 bs=4096 count=1 | od -c
The result was the following:  Ignore the DATA2, because it is still mounted and it was renamed after this posting:

1+0 records in
1+0 records out
0000000  \0 202 001 001  \0  \0  \0  \0 200  \0  \0  \0   L   - 265  \f
0000020  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000040   O   R   C   L   D   I   S   K  \0  \0  \0  \0  \0  \0  \0  \0
0000060  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000100  \n 020  \0  \0  \0  \0 002 004   D   A   T   A   2   _   0   0
0000120   0   0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000140  \0  \0  \0  \0  \0  \0  \0  \0   D   A   T   A   2  \0  \0  \0

The following will "erase" the header :  I think adding "zeros'.

dd if=/dev/zero of=/dev/rdisk/oracle/asm_data_disk4 bs=4096 count=1

The following verifies the header:

dd if=/dev/rdisk/oracle/asm_data_disk4 bs=4096 count=1 | od -c

Now I add this disk to the diskgroup data:
 
alter diskgroup data add disk '/dev/rdisk/oracle/asm_data_disk4';

When I use it for archives, Asm automatically assign/creates a directory ARCHIVELOG for this, I don't have to do anything.

Now my disk has 65049 MB instead of 3 gb available that had before:

SQL> select name, state, type, total_mb, free_mb from v$asm_diskgroup;

NAME                           STATE       TYPE     TOTAL_MB    FREE_MB
------------------------------ ----------- ------ ---------- ----------
DATA                           CONNECTED   EXTERN     307200      65049

SQL> select path,total_mb,header_status,group_number from v$asm_disk
  2  ;

PATH
--------------------------------------------------------------------------------
  TOTAL_MB HEADER_STATU GROUP_NUMBER
---------- ------------ ------------
/dev/rdisk/oracle/asm_data_disk1
     61440 UNKNOWN                 1

/dev/rdisk/oracle/asm_data_disk2
     61440 UNKNOWN                 1

/dev/rdisk/oracle/asm_data_disk3
     61440 UNKNOWN                 1


PATH
--------------------------------------------------------------------------------
  TOTAL_MB HEADER_STATU GROUP_NUMBER
---------- ------------ ------------
/dev/rdisk/oracle/asm_data_disk5
     61440 UNKNOWN                 1

/dev/rdisk/oracle/asm_data_disk4
     61440 UNKNOWN                 1



This was before this posting:

select name, state, type, total_mb, free_mb from v$asm_diskgroup;

NAME STATE TYPE TOTAL_MB FREE_MB
------------------------------ ----------- ------ ---------- ----------
DATA CONNECTED EXTERN 245760 3636
FRA MOUNTED EXTERN 61440 61336

Author

Commented:
No oracle services needed to be shutdown for this.
ORacle Rac version 10.2.0.3

Author

Commented:
I found the correct answer.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial