Translate

Search This Blog

identifying mapping of OS disks to ASM Disks when using ASMLIB

SQL> show parameter asm_diskstring
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
asm_diskstring                       string      /dev/asm*
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
[grid@node1 ~]$ ls -ltrh /dev/asm*
brw-rw----. 1 grid asmadmin 8, 65 Sep 21 14:02 /dev/asm-disk4
brw-rw----. 1 grid asmadmin 8, 49 Sep 21 14:02 /dev/asm-disk3
brw-rw----. 1 grid asmadmin 8, 33 Sep 21 14:02 /dev/asm-disk2
brw-rw----. 1 grid asmadmin 8, 17 Sep 21 14:04 /dev/asm-disk1
[grid@node1 ~]$ cat /proc/partitions
major minor  #blocks  name
   8       32    5242880 sdc
   8       33    5237158 sdc1   8       16    5242880 sdb
   8       17    5237158 sdb1   8        0   15178280 sda
   8        1      76800 sda1
   8        2    1048576 sda2
   8        3     524288 sda3
   8        4          1 sda4
   8        5   13526016 sda5
   8       48    5242880 sdd
   8       49    5237158 sdd1   8       64    5242880 sde
   8       65    5237158 sde1   8       80   15618560 sdf
   8       81   15615148 sdf1
Actually I'm using udev rules[see bottom in post] so I do not need this method neverthless it is useful

SQL> select a.name DiskGroup, b.disk_number Disk#, b.name DiskName, b.total_mb, b.path
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;

DISKGROUP    DISK#   DISKNAME                            TOTAL_MB PATH
------------------- ---------- ----------------------------------- ---------- ----------------------------------------
                                        1                                                             0 /dev/asm-disk3
                                        2                                                             0 /dev/asm-disk2
                                        3                                                             0 /dev/asm-disk4
DATA                             0 DATA_0000                                 5114 /dev/asm-disk1
[grid@node1 ~]$ cat /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB7144c211-011b06b1", NAME="asm-disk1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB6b224856-6ec55511", NAME="asm-disk2", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB5386bea3-5dbec50f", NAME="asm-disk3", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB27a05b79-e60cecc1", NAME="asm-disk4", OWNER="grid", GROUP="asmadmin", MODE="0660"