In Linux, ASMLib provides the wrapper for managing the ASM disks. To identify the underlying physical device that the ASM disk point to, you can use the oracleasm querydisk command. In this blog, we will teach you how to identify the ASM device from ASMLib.
The querydisk option will list the major and minor numbers that can be used to match the physical device.
The following example was run on a virtual server hosting ASM and an Oracle database.
[root@oraclevm ~]# oracleasm listdisks DATA1 [root@oraclevm ~]# oracleasm querydisk -d DATA1 Disk "DATA1" is a valid ASM disk on device [8,17] [root@oraclevm ~]# ls -ltr /dev/sd* brw-rw----. 1 root disk 8, 0 Dec 14 18:18 /dev/sda brw-rw----. 1 root disk 8, 2 Dec 14 18:18 /dev/sda2 brw-rw----. 1 root disk 8, 1 Dec 14 18:18 /dev/sda1 brw-rw----. 1 root disk 8, 16 Dec 14 18:18 /dev/sdb brw-rw----. 1 root disk 8, 17 Dec 14 18:18 /dev/sdb1 [root@oraclevm ~]#
In the above example, DATA1 disk is pointing to the /dev/sdb1. The major 8 is block based and refers to SCSI disk devices type.
Uncomplicate Your Oracle Data
Uncomplicating your Oracle data is a pivotal endeavor in today’s tech landscape, as it addresses a multitude of challenges that organizations often face. Firstly, simplifying the data structure and architecture within an Oracle database is essential for enhancing data accessibility and usability. The complexity of Oracle databases, especially in large enterprises, can lead to a maze of intertwined tables, stored procedures, and triggers, making it difficult for data professionals to extract meaningful insights efficiently. By streamlining this complexity, organizations can empower their data analysts and engineers to work more effectively, ultimately leading to better decision-making and competitive advantage.
Furthermore, simplifying Oracle data is paramount for data security and compliance. Complex data structures can inadvertently introduce vulnerabilities and risks into the system, making it challenging to identify and mitigate potential security breaches. Ensuring that Oracle data is straightforward and well-organized not only reduces the risk of data breaches but also simplifies the process of adhering to data governance and regulatory requirements, such as GDPR and HIPAA.
Identifying the Underlying Physical Device for an ASMLib ASM Disk
When Oracle ASM uses ASMLib for disk management on Linux, ASMLib maintains labels for ASM devices and provides utilities to work with them. You may find it useful to determine which physical block device corresponds to an ASM disk that is managed through ASMLib.
Oracle’s oracleasm utility includes commands that let you inspect the mapping between ASM labels and the underlying device nodes:
- List ASM disks managed by ASMLib.
Runoracleasm listdisksto show the names of ASM disks that ASMLib knows about. This gives you the labels assigned to each ASM disk. - Query a specific ASM disk.
Useoracleasm querydisk -d <ASM_LABEL>to retrieve information about the ASM disk named<ASM_LABEL>. The output includes major and minor device numbers for the device associated with that ASM label. - Match the major/minor numbers to a physical device.
Once you have the major and minor numbers, list block devices on the host with a command such asls -l /dev/sd*. The major and minor numbers shown in thelsoutput help you identify which/dev/<name>node corresponds to the ASM device.
Using these steps lets you trace an ASMLib-managed ASM disk label to the actual storage device path on the host operating system. This approach works whether ASM devices are partitioned or use whole disks, and it relies on standard ASMLib utilities that are included when ASMLib is installed and configured.
Get started today and check out our Solutions Brief on how to uncomplicate your Oracle data!
FAQ
Dive Deeper into Oracle
Already identified your ASM devices? Take the next step with a full walkthrough of installing, configuring, and operating Oracle ASMLib v3.1 on Oracle Linux 9, including io_uring and thin provisioning considerations.






