Oracle Notes‎ > ‎

ASM

ASM quries

Get Information at diskgroup level
sql> SELECT NAME,STATE,TOTAL_MB,FREE_MB,FREE_MB/TOTAL_MB*100 AS PCT_FREE FROM v$asm_diskgroup;

Relating each diskgroup and its disks
sql>
col name format a10
col path format a50
set lines 200
select a.name,a.group_number,b.path,b.TOTAL_MB from v$asm_diskgroup a, v$asm_disk b where a.group_number=b.group_number;


Current Status of disks
sql> col name format a15
select group_number, name, TOTAL_MB, FREE_MB from V$asm_disk_stat;

Remove / Drop Disk from Disk group.

Correctly identify the disk you need to remove using queries.

1. Drop the Disk from Diskgroup
sql> alter diskgroup fra_1 drop disk 'FRA_1_0000';

2. Check Whether the command is executed properly and disk is out of all diskgroups
sql> select group_number,name,path,TOTAL_MB, FREE_MB from V$asm_disk_stat;

3. Wait Until Rebalancing completes (below sql should retrun zero rows)
sql> select * from v$asm_operation;

4. Before reusing the disk, zero it out
dd if=/dev/null of=/u02/oradata/asm/data_lun12 bs=1024K