You are on page 1of 5

ASM-Cheat-sheet

Filed under: oracle — sunilbugger @ 10:51 am
Display disk-groups
set lines 100
col name format a10
col path format a30
select name
, group_number
, disk_number
, mount_status
, state
, path
from v$asm_disk
order by group_number
/
set lines 100
col name format a10
col path format a30
select name
, group_number
, disk_number
, mount_status
, state
, path
from v$asm_disk
order by group_number
/

note. A group number of zero his indicates that a disk is available but hasn’t yet been assigned
to a disk group.

disk_number . group_number . total_mb . disk_number . free_mb from v$asm_disk order by group_number / Create a disk group create diskgroup data1 external redundancy disk ‘/dev/raw/raw1’ / create diskgroup data1 external redundancy disk ‘/dev/raw/raw1’ / or with multiple raw partitions… multiple disks create diskgroup data2 external redundancy . free_mb from v$asm_disk order by group_number / select name . total_mb .Show disk space usage select name . group_number .

‘/dev/raw/raw3’ / multiple disks create diskgroup data2 external redundancy disk ‘/dev/raw/raw2’ . ‘/dev/raw/raw3’ / or with multiple fail groups… create diskgroup data3 normal redundancy failgroup controller1 disk ‘/dev/raw/raw4’ failgroup controller2 disk ‘/dev/raw/raw6’ / create diskgroup data3 normal redundancy failgroup controller1 disk ‘/dev/raw/raw4’ failgroup controller2 disk ‘/dev/raw/raw6’ / Add a disk to a group alter diskgroup data1 add disk ‘/dev/raw/raw4’ / alter diskgroup data1 add disk ‘/dev/raw/raw4’ / Wildcards can be used for raw device names (eg. raw*) .disk ‘/dev/raw/raw2’ .

Drop a disk group drop diskgroup ‘<name>’ / drop diskgroup ‘<name>’ / Is ASM performing a balancing operation select * from v$asm_operation / select * from v$asm_operation / Mount/dismount disk groups alter diskgroup all mount / alter diskgroup all mount / alter diskgroup data1 mount / alter diskgroup data1 mount / alter diskgroup all dismount / alter diskgroup all dismount / alter diskgroup data1 dismount / .

alter diskgroup data1 dismount / Check the internal consistency of a diskgroup alter diskgroup data1 check all / .