DBA GENESIS
Courses
Contact
Members
More
I want to manage the ASM disk and check the space allocated and free percentage.
Check the Size and free space in ASM Diskgroup
col name for a10 col percentage 999.99 SELECT name, free_mb, total_mb, free_mb/total_mb*100 as percentage FROM v$asm_diskgroup;
Check the ASM Disk stats
select * from V$ASM_DISK_IOSTAT;
Mount and Dismount ASM Disk group
--Mount the diskgroup
SQL>alter diskgroup DATA mount;
or
asmcmd>mount DATA
--Unmount the diskgroup
SQL>alter diskgroup DATA dismount;
OR
asmcmd>umount DATA
-- To mount/Dismount all the diskgroups
SQL>alter diskgroup ALL mount; SQL>alter diskgroup ALL dismount;
Drop the ASM Disk
-----Dropping one disk:
alter diskgroup data drop disk DATA01;
-----Dropping multiple disk:
alter diskgroup data drop disk DATA01,DATA02, DATA03 rebalance power 10;
---- Monitoring the rebalance operation:
select * from v$asm_operation;
Monitor the Rebalance operation
select GROUP_NUMBER,OPERATION,STATE,POWER, ACTUAL,ACTUAL,EST_MINUTES from gv$asm_operation;
--Change power of rebalance
alter diskgroup DATA rebalance power 10;
Drop ASM Disgroup
drop diskgroup DATA including contents;
Create ASM Disk in Linux
-- Check the asm disk is used
#/etc/init.d/oracleasm querydisk /dev/sdb1 Device "/dev/sdb1" is not marked as an ASM disk
-- Create asm disk
# /etc/init.d/oracleasm createdisk DATA /dev/sdb1 Marking disk "DATA" as an ASM disk: [ OK ]
-- Check the asm disk labelling
# /etc/init.d/oracleasm querydisk /dev/sdb1 Device "/dev/sdb1" is marked an ASM disk with the label "DATA"
-- List the asm disks present
# /etc/init.d/oracleasm listdisks DATA Create Diskgroup in SQLPLUS CREATE DISKGROUP DATA EXTERNAL REDUNDANCY DISK '/dev/sdb*';
Check the Size and free space in ASM Diskgroup
col name for a10 col percentage 999.99 SELECT name, free_mb, total_mb, free_mb/total_mb*100 as percentage FROM v$asm_diskgroup;
Check the ASM Disk stats
select * from V$ASM_DISK_IOSTAT;
Mount and Dismount ASM Disk group
--Mount the diskgroup
SQL>alter diskgroup DATA mount;
or
asmcmd>mount DATA
--Unmount the diskgroup
SQL>alter diskgroup DATA dismount;
OR
asmcmd>umount DATA
-- To mount/Dismount all the diskgroups
SQL>alter diskgroup ALL mount; SQL>alter diskgroup ALL dismount;
Drop the ASM Disk
-----Dropping one disk:
alter diskgroup data drop disk DATA01;
-----Dropping multiple disk:
alter diskgroup data drop disk DATA01,DATA02, DATA03 rebalance power 10;
---- Monitoring the rebalance operation:
select * from v$asm_operation;
Monitor the Rebalance operation
select GROUP_NUMBER,OPERATION,STATE,POWER, ACTUAL,ACTUAL,EST_MINUTES from gv$asm_operation;
--Change power of rebalance
alter diskgroup DATA rebalance power 10;
Drop ASM Disgroup
drop diskgroup DATA including contents;
Create ASM Disk in Linux
-- Check the asm disk is used
#/etc/init.d/oracleasm querydisk /dev/sdb1 Device "/dev/sdb1" is not marked as an ASM disk
-- Create asm disk
# /etc/init.d/oracleasm createdisk DATA /dev/sdb1 Marking disk "DATA" as an ASM disk: [ OK ]
-- Check the asm disk labelling
# /etc/init.d/oracleasm querydisk /dev/sdb1 Device "/dev/sdb1" is marked an ASM disk with the label "DATA"
-- List the asm disks present
# /etc/init.d/oracleasm listdisks DATA Create Diskgroup in SQLPLUS CREATE DISKGROUP DATA EXTERNAL REDUNDANCY DISK '/dev/sdb*';