in Uncategorized

Getting Partition Information Behind the Oracleasm Label

In RHEL, there is option to use oracleasm library to label ASM disk. When ASM labelling is used, we may 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

Write a Comment

Comment