Home > Workload Solutions > Oracle > White Papers > Dell PowerMax 2500 and 8500 Best Practices for Mission Critical Oracle Databases > Consistent device names across hosts for RAC
This section describes how to set aliases and match device names across cluster nodes with Linux Device Mapper (DM), Dell PowerPath, and VMware native multipathing. When Oracle RAC is used, the same storage devices are shared across the cluster nodes. ASM places its own labels on the devices in the ASM disk group. Therefore, matching their host device SCSI presentation is not necessary to ASM[3]. However, it often makes storage management operations easier for the user.
By default, Device Mapper (DM) uses a WWID to identify devices uniquely and consistently across hosts. While using WWID is sufficient, users often prefer user-friendly names (such as, /dev/mapper/ora_data1, /dev/mapper/ora_data2).
The following example shows how to set the /etc/multipath.conf DM configuration file with aliases. To find the device WWN, use the scsi_id -g /dev/sdXX Linux command. If the command is not already installed, add it by installing the sg3_utils Linux package.
# /usr/lib/udev/scsi_id -g /dev/sdb
360000970000198700067533030314633
# vi /etc/multipath.conf
multipaths {
multipath {
wwid 360000970000198700067533030314633
alias ora_data1
}
multipath {
wwid 360000970000198700067533030314634
alias ora_data2
}
...
}
To match user-friendly names or aliases across cluster nodes, copy the multipath.conf configuration file to the other nodes and reboot. To avoid a reboot, follow these steps:
# service multipathd stop
# service multipath -F
# service multipathd start
To match PowerPath pseudo device names between cluster nodes, follow these steps:
# emcpadm export_mappings -f /tmp/emcp_mappings.xml
# emcpadm import_mappings -f /tmp/emcp_mappings.xml
Note: The PowerPath database is kept in the /etc/emcp_devicesDB.idx and /etc/emcp_devicesDB.dat files. These files can be copied from one of the servers to the others, followed by a reboot. It is recommended that the emcpadm export/import method is used to match PowerPath device names across hosts. This is where the file copy is a shortcut that can overwrite existing PowerPath mapping on the other hosts.
When running Oracle in a VMware virtual machine (VM), VMware ESXi at the datastore level handles multipathing. The VM devices appear as /dev/sdXX. To match device names across hosts and maintain their permissions, use ASMlib or ASM Filter Driver (AFD), as both label the devices. However, if ASMlib or AFD are not used, use udev rules to create device aliases and maintain device permissions.
There are multiple ways to achieve device aliases. The following is one such example that assigns device /dev/sdb1 an alias of /dev/ora-data1. The ASM disk string will be /dev/ora*. The alias creates a symbolic link such as /dev/ora-data1 --> /dev/sdb1.
# /lib/udev/scsi_id -g -u -d /dev/sdb
36000c29127c3ae0670242b058e863393
# cd /etc/udev/rules.d/
# vi 99-oracle-asmdevices.rules
KERNEL=="sd*1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36000c29127c3ae0670242b058e863393", SYMLINK+="ora-data1", OWNER="oracle", GROUP="dba", MODE="0660"
Note: In Red Hat Enterprise Linux 7 and later releases, the scsi_id command is in /lib/udev/scsi_id. In previous releases, it was in /sbin/scsi_id.