Ask The Real Tom

July 30, 2010



Oracle ASM Disk Overview

Filed under: oracle — Tags: , , , , — tkalo @ 3:38 pm

I’ve wrote a simple SQL script to list all ASM disks with state, size and their diskgroups, if any.

set pages 5000 lines 180
set heading on
set feedback off
set serveroutput on

col LABEL for a28
col DISKGROUP for a9
col STATUS for a9
col TOTAL for a11
col MOUNT_STATE for a11

exec dbms_output.put_line('---');
exec dbms_output.put_line('--- DISK OVERVIEW');
exec dbms_output.put_line('---');

SELECT
        D.LABEL||' ('||D.NAME||')' LABEL,
        (SELECT
          NAME
         FROM
          V$ASM_DISKGROUP
         WHERE
          GROUP_NUMBER=D.GROUP_NUMBER)
        DISKGROUP,
        D.STATE STATUS,
        lpad(D.TOTAL_MB/1024,6)||' GB' TOTAL,
        D.MOUNT_STATUS MOUNT_STATE
FROM
        V$ASM_DISK D
ORDER BY 2;

exec dbms_output.put_line('---');
set feedback on

The output looks as follow:

---
--- DISK OVERVIEW
---

LABEL                        DISKGROUP STATUS    TOTAL       MOUNT_STATE
---------------------------- --------- --------- ----------- -----------
ORAASM1 (ORAASM1)            DG1       NORMAL    99.984 GB   CACHED
ORAASM3 (ORAASM3)            DG1       NORMAL    99.984 GB   CACHED
ORAASM5 (ORAASM5)            DG1       NORMAL    99.984 GB   CACHED
ORAASM4 (ORAASM4)            DG1       NORMAL    99.984 GB   CACHED
ORAASM2 (ORAASM2)            FRA1      NORMAL    99.984 GB   CACHED
ORAASM6 ()                             NORMAL         0 GB   CLOSED
---

April 14, 2010



How do I find the device for a ASMLIB disk

Filed under: oracle — Tags: , , — admin @ 10:00 am

Just lookup the minor, major id.


oracle@server1:/u00/app/oracle/ [grid11201] ll /dev/oracleasm/disks/
total 0
drwxr-xr-x 1 root root 0 2009-12-18 14:31 .
drwxr-xr-x 4 root root 0 2009-12-18 14:31 ..
brw-rw---- 1 oracle dba 253, 19 2009-12-18 14:31 ORAASM1
brw-rw---- 1 oracle dba 253, 20 2009-12-18 14:31 ORAASM2

oracle@server1:/u00/app/oracle/ [grid11201] ll /dev/dm-*|grep '253, 19'
brw-r----- 1 root disk 253, 19 2009-12-18 14:31 /dev/dm-19

oracle@server1:/u00/app/oracle/ [grid11201] ll /dev/disk/by-id/ |grep dm-19
lrwxrwxrwx 1 root root 11 2009-12-18 14:31 scsi-sanvg-oraasm01 -> ../../dm-19

December 8, 2009



Just a hint for ASM on Oracle 11.2

Filed under: oracle — Tags: , , , — admin @ 12:51 pm

Until 11.1 the oracle ASM binaries have been on the Oracle Database CD.

With 11.2 the ASM binaries are on the Oracle Grid Infrastructure CD. (Search about 2 houers to find that)
Does anyone know if its stated cleary on the oracle documentation? I could not find it.

Powered by WordPress