the record of learning asm

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/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值