1、 create a diskgroup for asm(no failure groups)
when you create a external diskgroup,the initial state of the diskgroup is dismount,you can query the view v$asm_diskgroup to see it.
Sql>CREATE DISKGROUP RAC_DISK2 ----execute on the ASM of ORACLE_SID
EXTERNAL REDUNDANCY
DISK '/dev/raw/raw5','/dev/raw/raw6';
Diskgroup created.
SQL> SELECT a.INST_ID,NAME,state,TYPE from gv$asm_diskgroup a;
INST_ID NAME STATE TYPE
---------- ------------------------------ ----------- ------
2 RAC_DISK1 MOUNTED EXTERN
2 RAC_DISK2 DISMOUNTED
1 RAC_DISK1 MOUNTED EXTERN
1 RAC_DISK2 MOUNTED EXTERN
Seeing that the new diskgroup has different state between rac node1 and node2.the create diskgroup statement is execute in rac node1.if you query v$asm_disk,you cann’t find any information of the new diskgroup.
If you want to mount the new diskgroup,you must execute the follow statement:
Sql>alter diskgroup RACDISK2 mount; ---execute on rac node2
The state of mounted means that the new diskgroup can be serviced now. if you want to use the new diskgroup,you just to create a tablespace on the new diskgroup.
Sql> CREATE TABLESPACE TEST ---execute on the db instance.
DATAFILE '+RAC_DISK2' SIZE 10M
Then,you query the view v$asm_diskgroup
SQL> SQL> SELECT a.INST_ID,NAME,state,TYPE from gv$asm_diskgroup a;
INST_ID NAME STATE TYPE
---------- ------------------------------ ----------- ------
2 RAC_DISK1 MOUNTED EXTERN
2 RAC_DISK2 connected EXTERN
1 RAC_DISK1 MOUNTED EXTERN
1 RAC_DISK2 connected EXTERN
Now,you can find the detail information by querying v$asm_disk.
2、 how to drop the diskgroup(no failure groups)
the recommended step is that:
a. drop the contents which is stored in diskgroup eg. Tablespace ….
b. Dismount the diskgroup except the node which you want to execute the drop statement of diskgroup(drop diskgroup RAC_DISK2 including contents)
Sql> alter diskgroup RAC_DISK2 dismount;
c. drop the diskgroup on the node which the diskgroup is still mounted.(the last mounted node)
the diskgroup must be droped in the state of mount.
Not so many records,continuing
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/14730395/viewspace-675192/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/14730395/viewspace-675192/