SQL> column HEADER_STATUS format a20
SQL> set pages 100
SQL> col PATH format a25
SQL> SELECT name, header_status, path FROM V$ASM_DISK ;
NAME HEADER_STATUS PATH
------------------------------ -------------------- -------------------------
CANDIDATE /dev/asm-disk8
CANDIDATE /dev/asm-disk6
CANDIDATE /dev/asm-disk7
DATA_0000 MEMBER /dev/asm-disk1
DATA2_0000 MEMBER /dev/asm-disk4
DATA_0002 MEMBER /dev/asm-disk3
DATA2_0001 MEMBER /dev/asm-disk5
DATA_0001 MEMBER /dev/asm-disk2
DROP DISKGROUP DATA2 INCLUDING CONTENTS;
drop diskgroup DATA2 force including contents;
Rac-Node2
oracle@testdbrac2:/oracle:>grid_env
oracle@testdbrac2:/oracle:>sqlplus "/as sysasm"
SQL*Plus: Release 11.2.0.1.0 Production on Wed Aug 28 10:49:18 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
SQL> select GROUP_NUMBER, NAME, state from v$asm_diskgroup;
GROUP_NUMBER NAME STATE
------------ ------------------------------ -----------
1 DATA MOUNTED
2 DATA2 MOUNTED
SQL> alter diskgroup DATA2 dismount;
Diskgroup altered.
SQL> select GROUP_NUMBER, NAME, state from v$asm_diskgroup;
GROUP_NUMBER NAME STATE
------------ ------------------------------ -----------
1 DATA MOUNTED
0 DATA2 DISMOUNTED
Adding Disk to existing Diskgroup
SELECT MOUNT_STATUS,HEADER_STATUS,MODE_STATUS,STATE,TOTAL_MB,FREE_MB,NAME,PATH,LABEL FROM V$ASM_DISK;
MOUNT_S HEADER_STATUS MODE_ST STATE TOTAL_MB FREE_MB
------- -------------------- ------- -------- ---------- ----------
NAME PATH
------------------------------ -------------------------
LABEL
-------------------------------
CLOSED FORMER ONLINE NORMAL 0 0
/dev/asm-disk4
CLOSED FORMER ONLINE NORMAL 0 0
/dev/asm-disk5
CLOSED CANDIDATE ONLINE NORMAL 0 0
/dev/asm-disk8
CLOSED CANDIDATE ONLINE NORMAL 0 0
/dev/asm-disk6
CLOSED CANDIDATE ONLINE NORMAL 0 0
/dev/asm-disk7
CACHED MEMBER ONLINE NORMAL 10239 8526
DATA_0000 /dev/asm-disk1
CACHED MEMBER ONLINE NORMAL 10239 8524
DATA_0002 /dev/asm-disk3
CACHED MEMBER ONLINE NORMAL 10239 8527
DATA_0001 /dev/asm-disk2
SQL > ALTER DISKGROUP DATA ADD DISK '/dev/asm-disk4' NAME DATA_0004 SIZE 10239 M REBALANCE POWER 2; (Optional usage rebalance power )
Removing Disk from existing Diskgroup
SQL> select group_number, name, TOTAL_MB, FREE_MB
from V$asm_disk_stat;
GROUP_NUMBER NAME TOTAL_MB FREE_MB
------------ ------------------------------ ---------- ----------
1 DATA_0000 10239 8946
1 DATA_0004 10239 8982
1 DATA_0002 10239 8943
1 DATA_0001 10239 8943
SQL> alter diskgroup DATA drop disk DATA_0004;
Diskgroup altered.
To decrease the time of operation , you should increase asm_power_limit parameter in system level. This range is 0-11.
0 = Stop
11 = Maximum usage of resources
SQL> alter system set asm_power_limit=11;
System altered
SQL > select * from v$asm_operation;
GROUP_NUMBER OPERA STAT POWER ACTUAL SOFAR EST_WORK EST_RATE EST_MINUTES
------------ ----- ---- ----- ----- ------ ------- ---------- ----------
1 REBAL RUN 11 1 100 42234 1007 11
Remove Diskgroup Service from Cluster Resources
oracle@testdbrac2:/oracle/app/oracle/diag/asm/+asm/+ASM2/trace:>crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE testdbrac1
ONLINE ONLINE testdbrac2
ora.DATA2.dg
OFFLINE OFFLINE testdbrac1
OFFLINE OFFLINE testdbrac2
ora.LISTENER.lsnr
ONLINE ONLINE testdbrac1
ONLINE ONLINE testdbrac2
ora.asm
ONLINE ONLINE testdbrac1 Started
ONLINE ONLINE testdbrac2 Started
ora.eons
ONLINE ONLINE testdbrac1
ONLINE ONLINE testdbrac2
ora.gsd
OFFLINE OFFLINE testdbrac1
OFFLINE OFFLINE testdbrac2
ora.net1.network
ONLINE ONLINE testdbrac1
ONLINE ONLINE testdbrac2
ora.ons
ONLINE ONLINE testdbrac1
ONLINE ONLINE testdbrac2
--------------------------------------------------------------------------------
oracle@testdbrac2:/oracle/app/oracle/diag/asm/+asm/+ASM2/trace:>srvctl remove diskgroup -g DATA2
oracle@testdbrac2:/oracle/app/oracle/diag/asm/+asm/+ASM2/trace:>crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE testdbrac1
ONLINE ONLINE testdbrac2
ora.LISTENER.lsnr
ONLINE ONLINE testdbrac1
ONLINE ONLINE testdbrac2
ora.asm
ONLINE ONLINE testdbrac1 Started
ONLINE ONLINE testdbrac2 Started
ora.eons
ONLINE ONLINE testdbrac1
ONLINE ONLINE testdbrac2
ora.gsd
OFFLINE OFFLINE testdbrac1
OFFLINE OFFLINE testdbrac2
ora.net1.network
ONLINE ONLINE testdbrac1
ONLINE ONLINE testdbrac2
ora.ons
ONLINE ONLINE testdbrac1
ONLINE ONLINE testdbrac2
0 yorum:
Yorum Gönder