ASM DISK MAPPING TO LINUX PARTITION

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.

 

I hope this post was useful!

References:

http://mdinh.wordpress.com/2013/11/24/playing-with-asm-online-migration/
http://wadhahdaouehi.tn/2016/02/list-of-linux-physical-devices-mapped-by-asm-disks-using-major-minor-number/
————————————————–

Related links:

Home

11G R2 RAC Index

                                            ———————-

4 thoughts on “ASM DISK MAPPING TO LINUX PARTITION

  1. Hi Mam,

    In linux platform blkid command (not sure with other platform) can be used to get the mapping

    [root@source ~]# /usr/sbin/oracleasm listdisks
    DATA1

    [root@source ~]# /sbin/blkid |grep asm
    /dev/sdb1: LABEL=”DATA1″ TYPE=”oracleasm”

    Same I get from your method as well

    [root@source disks]# ls -lr
    total 0
    brw-rw—- 1 oracle oinstall 8, 17 Jun 23 22:34 DATA1

    [root@source disks]# cat /proc/partitions |grep sdb
    8 17 7170672 sdb1

    Thanks
    Jamsher

    1. if you labeled it than it will show you with ” /sbin/blkid |grep asm ” this command , but if anyone who’s not going to label them ,than can’t work.

      like

      [oracle@rac1 bin]$ /sbin/blkid |grep asm
      [oracle@rac1 bin]$ /sbin/blkid
      /dev/sda5: LABEL=”/” UUID=”a564ecc4-ae86-4fec-bcec-5583a30fb5e4″ SEC_TYPE=”ext2″ TYPE=”ext3″
      /dev/sda1: LABEL=”/boot” UUID=”8c414a80-ab65-4e0b-ab3f-8df439cd8168″ SEC_TYPE=”ext2″ TYPE=”ext3″
      /dev/sda2: LABEL=”/tmp” UUID=”cf2e0dc4-075f-4fee-8708-d5e5aefc884b” SEC_TYPE=”ext2″ TYPE=”ext3″
      /dev/sda3: TYPE=”swap” LABEL=”SWAP-sda3″
      /dev/hdc: LABEL=”RHEL/5.1 i386 DVD” TYPE=”iso9660″

Your comments and suggestions are welcome!