How to get the ASM to Linux Partition Mapping information

27 Jul

Due to ASM labelling, sometimes we find it difficult to get  which disk is behind this ASM disk. we can use below asmtool library command to check whether that disk is already marked as ASM partition or not

oracleasm querydisk <device name>

.But to check which Linux Partition a ASM disk belong to, we need to do further checking.

$ ls -ltrh /dev/oracleasm/disks/ brw-rw---- 1 oracle dba 8, 144 Jul 27 16:07 DATA01

From above output, we can see that there are 2 numbers after the owner group. These two numbers reflect the Linux partition major/minor number. In this case, the major number is 8 and the minor number is 144.

We can check these two numbers belong to which partition from /proc/partitions file

$ cat /proc/partitions
...
 8 144 537120000 sdj
 8 160 537120000 sdk
...

From above output, we can see that partition with major number 8 and minor number 144 is sdj. Thus DATA01 is mapped to /dev/sdj in this environment

 

Hope this helps :)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>