My Oracle Support Banner

How to Configure LUNs for ASM Disks using WWID, DM-Multipathing, and ASMLIB on RHEL 5/OL 5 and RHEL 6/OL 6 and RHEL7 (Doc ID 1365511.1)

Last updated on JULY 11, 2024

Applies to:

Oracle Database - Enterprise Edition - Version and later
Oracle Database - Standard Edition - Version and later
Oracle Database Cloud Schema Service - Version N/A and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Linux x86-64


This document details "how to" steps by using an example that creates devices for Automatic Storage Management (ASM) using World Wide Identifier (WWID), DM-Multipathing, and ASMLIB, utilizing a Hitachi Storage Sub-system.  The simplified "how to" steps are for Red Hat Enterprise Linux version 5 (RHEL 5) and Oracle Linux version 5 (OL5) and Red Hat Enterprise Linux version 6 (RHEL 6) and Oracle Linux version 6 (OL6) and Red Hat Enterprise Linux version 7 (RHEL 7)  on Linux x86-64 for preparing storage to use ASM.

Each multipath device has a World Wide Identifier (WWID), which is guaranteed to be globally unique and unchanging. By default, the name of a multipath device is set to its WWID. Alternately, you can set the user_friendly_names option in the multipath configuration file, which sets the alias to a node-unique name of the form mpathn.  When the user_friendly_names configuration option is set to yes, the name of the multipath device is set to /dev/mpath/mpathn. Configuring multipathing by modifying the multipath configuration file, /etc/multipath.conf, will not be addressed in this document.

The WWID is a persistent, system-independent ID that the Small Computer Storage Interface (SCSI) Standard requires from all SCSI devices.  Each disk attached to a Linux-based server has a unique SCSI ID. The WWID identifier is guaranteed to be unique for every storage device, and independent of the path that is used to access the device.  This identifier can be obtained by issuing a SCSI Inquiry to retrieve the Device Identification Vital Product Data (page 0x83) or Unit Serial Number (page 0x80). The mappings from these WWIDs to the current /dev/sd names can be seen in the symlinks maintained in the /dev/disk/by-id/ directory.    

In this document, the accessible disks are connected via a Host Bus Adapter Card (HBA) to a Storage Area Network (SAN) or switch. If the disks are attached via Hitachi SAN, the path and port information is also extracted.  Disk arrays that are grouped together as Logical Unit Number (LUN) storage in SANs can also present themselves as SCSI devices on Linux servers. The command, "fdisk -l", lists attached SCSI disk devices, including those from a SAN.   Multiple devices share common SCSI identifiers.

Automatic Storage Management Library (ASMLIB) driver is a support library for the Automatic Storage Management (ASM) feature of the Oracle Database and is available for the Linux operating system.  This document discusses usage with Red Hat Enterprise Linux version 5 (RHEL 5) and Oracle Linux version 5 (OL5) and Red Hat Enterprise Linux version 6 (RHEL 6) and Oracle Linux version 6 (OL6) and Red Hat Enterprise Linux version 7 (RHEL 7) on Linux x86-64.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document
 1.  Configure SCSI_ID to Return Unique Device Identifiers:
 1a.  Whitelist SCSI devices
 1b.  List all SCSI devices
 1c. Obtain Clusterware device unique SCSI identifiers:
 1d.  Run fdisk to create partitions for ASM disks:
 1e.  Run the fdisk(8) and/or 'cat /proc/partitions' commands to ensure devices are visible. (If Real Application Clusters (RAC), Clusterware devices are visible on each node.)  For example:
 2.  Configure LUNs for ASM:
 2a. Verify Multipath Devices:
 3a. Verify that ASMLIB has not been installed already before installing (If Real Application Clusters (RAC), run this command on each node):
 3c. Check status again:
 4.  Create ASM diskgroups:
 4a. Check prior to createdisk command:
 4b. After Check, do createdisk command:
 5.  To make the disk available enter the following commands:      
 5a.  Scan ASM disks:
 5b.  List ASM disks:
  6.  Check the ASM diskgroups:
 7.  Ensure that the allocated devices can be seen in /dev/mpath:
 8.  Ensure that the devices can be seen in /dev/mapper:
 9.  Check the device type:
 10.  Setup the ASM parameter (ORACLEASM_SCANORDER), in the file for ASMLIB configuration, /etc/sysconfig/oracleasm, for forcing ASM to bind with the multipath devices
 10a.  Check the file, /etc/sysconfig/oracleasm:
 10b. Make a backup of the original file, /etc/sysconfig/oracleasm-_dev_oracleasm
 10c.  Modify the ORACLEASM_SCANORDER and ORACLEASM_SCANEXCLUDE parameters in /etc/sysconfig/oracleasm:
 10d. save file
 10e. Restart oracleasm:
 10f. Check mulitpath device against /proc/partitions file:
 10g. Check mulitpath device against the file, /dev/oracleasm/disks:
 10f. Check oracleasm disks again:
 Additional Resources

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.