ASM commands & Queries
After installing grid software to check disk sizes and permission information
kfod status=TRUE asm_diskstring='/dev/asmdisk*' disks=ALL
output:
-----------------------------------------------------------------------------------------
DISK SIZE HEADER PATH USER GROUP
=====================================================
1: 204800 MB MEMBER /dev/asmdisk11 oraasm dba
2: 102400 MB CANDIDATE /dev/asmdisk12 oraasm dba
3: 51200 MB CANDIDATE /dev/asmdisk13 oraasm dba
4: 51200 MB CANDIDATE /dev/asmdisk14 oraasm dba
----------------------------------------------------------------------------------------
ORACLE_SID ORACLE_HOME
=======================================================
+ASM /opt/oracle/product/19.0.0.0
create diskgroup:
create diskgroup FRA external redundancy disk '/dev/asmdisk12' size 102400M attribute 'compatible.asm'='19.0.0.0','compatible.advm'='19.0.0.0','au_size'='4m';
create diskgroup RECO external redundancy disk '/dev/asmdisk13','/dev/asmdisk14' attribute 'compatible.asm'='19.0.0.0','compatible.advm'='19.0.0.0','au_size'='4m';
asmcmd lsattr -G DATA -l
Disk Space Query:
set lines 255
col path for a35
col Diskgroup for a15
col DiskName for a25
col disk# for 999
col total_mb for 999,999,999
col free_mb for 999,999,999
compute sum of total_mb on DiskGroup
compute sum of free_mb on DiskGroup
break on DiskGroup skip 1 on report -
set pages 255
select a.name DiskGroup, b.disk_number Disk#, b.name DiskName,
b.total_mb, b.free_mb,
-- b.path,
b.header_status
from v$asm_disk b, v$asm_diskgroup a
where a.group_number (+) =b.group_number
order by b.group_number, b.disk_number, b.name;
Comments
Post a Comment