Search This Blog

Total Pageviews

Thursday, 28 October 2010

Oracle ASM views info and command

v$asm_alias :Lists all aliases in all currently mounted diskgroups
v$asm_client :Lists all the databases currently accessing the diskgroups
v$asm_disk :Lists all the disks discovered by the ASM instance
v$asm_diskgroup :Lists all the diskgroups discovered by the ASM instance
v$asm_file :Lists all files that belong to diskgroups mounted by the ASM instance
v$asm_operation :Reports information about current active operations. Rebalance activity is reported in this view
v$asm_template :Lists all the templates currently mounted by the ASM instance
v$asm_diskgroup_stat :same as v$asm_diskgroup but does discover new diskgroups. Use this view instead of v$asm_diskgroup
v$asm_disk_stat :same as v$asm_disk but does not discover new disks. Use this view instead of v$asm_disk



break on inst_id skip 1

column inst_id format 9999999 heading "Instance ID" justify left
column name format a15 heading "Disk Group" justify left
column total_mb format 999,999,999 heading "Total (MB)" justify right
column free_mb format 999,999,999 heading "Free (MB)" justify right
column pct_free format 999.99 heading "% Free" justify right

select inst_id, name, total_mb, free_mb, round((free_mb/total_mb)*100,2) pct_free
from gv$asm_diskgroup
where total_mb != 0
order by inst_id, name;





/etc/init.d/oracleasm start
/etc/init.d/oracleasm stop
/etc/init.d/oracleasm restart
/etc/init.d/oracleasm configure
/etc/init.d/oracleasm status
/etc/init.d/oracleasm enable
/etc/init.d/oracleasm disable
/etc/init.d/oracleasm listdisks
/etc/init.d/oracleasm deletedisk
/etc/init.d/oracleasm scandisks
/etc/init.d/oracleasm querydisk /dev/sdd1
/etc/init.d/oracleasm createdisk VOL1 /dev/sdb1
/etc/init.d/oracleasm renamedisk /dev/sdb1 VOL1



ASM Specific Init.ora Parameters

.cluster_database= true
.asm_diskstring = ‘/dev/sd*1’
.instance_type=asm
.shared_pool_size=100M
.large_pool_size = 80M
.db_cache_size=60M
.asm_diskgroups = 'DATA','FRA'
.processes=128



$ ls -l /dev/asm
total 0
brwxrwx--- 1 root asmadmin 252, 153601 Nov 28 13:49 docsvol1-300
brwxrwx--- 1 root asmadmin 252, 153602 Nov 28 13:49 docsvol2-300
brwxrwx--- 1 root asmadmin 252, 153603 Nov 28 13:56 docsvol3-300

$ /sbin/mkfs -t acfs -b 4k /dev/asm/docsvol3-300 -n "DOCSVOL3"


/etc/init.d/oracleasm querydisk /dev/multipath/sdb2

srvctl status asm -n linux1


oracle@raclinux1 ~# srvctl status asm -a

No comments:

Oracle DBA

anuj blog Archive