ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 转:the record of learning asm

转:the record of learning asm

原创 Linux操作系统 作者:kathryn_kong 时间:2010-11-09 15:52:29 0 删除 编辑

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' SIZE10M

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 diskgroupeg.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 ofmount.

 
Not  so many records,continuing

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/22598114/viewspace-677798/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 转:1Z0-043记录(四)
请登录后发表评论 登录
全部评论

注册时间:2009-09-25

  • 博文量
    9
  • 访问量
    9192