Thursday, September 3, 2015

How to find which asm disk maps to which linux partition (ORACLE RAC)

How to find which asm disk maps to which linux partition

- Issue following command to list all asm disks 
# ls -ls /dev/oracleasm/disks/ASMDISK*
0 brw-rw—- 1 grid asmadmin 8, 17 Apr 12 18:43 /dev/oracleasm/disks/ASMDISK01
0 brw-rw—- 1 grid asmadmin 8, 18 Apr 12 18:43 /dev/oracleasm/disks/ASMDISK02
2 columns after group (asmadmin) refer to major/minor
e.g. for ASMDISK01 major = 8, minor = 17
– see the contents of /proc/partitions to find which partition is mapped to which major/minor
# cat /proc/partitions
major minor #blocks name
8 0 83886080 sda
8 1 104391 sda1
8 2 5116702 sda2
8 3 5116702 sda3
8 4 1 sda4
8 5 73545538 sda5
8 16 93487104 sdb
8 17 4008186 sdb1
8 18 4008217 sdb2
8 19 4008217 sdb3
8 20 1 sdb4

8 29 4008186 sdb13
8 30 4008186 sdb14
8 31 4008186 sdb15
Here sdb1 is mapped to major 8 and minor 17
Hence, partition /dev/sdb1 is mapped to ASMDISK01.

No comments: