PowerPath: How to configure with Oracle ASM for clustered Oracle RAC servers
Summary: PowerPath for Linux: How to configure and use Dell PowerPath with Oracle ASM for clustered Oracle RAC servers running on RHEL 6.4 or later servers.
Instructions
Oracle Automatic Storage Management (ASM) ensures consistent naming of devices across Real Application Clusters (RAC). It also maintains permissions on devices across reboots. This feature was important until UDEV rules were added to Linux with the 2.5 kernel.
A feature of ASM is that devices stamped for ASM are assigned an alias. Each disk is added to the /dev/oracleasm/disks/ device directory, and presented to ASM using the alias ORCL:diskname.
When Linux sees multiple paths to the same disk or LUN, it creates an entry in the SCSI device table for each path. Therefore, a single LUN with two paths may appear to Linux as both /dev/sdg and /dev/sdh, for example.
This is problematic for ASM, since ASM cannot handle two or more devices mapping to the same LUN.
Like ASM, Dell PowerPath also creates aliases: these are our pseudo-devices (/dev/emcpowerX where X is the device letter).
Process
One of the main issues to address with RHEL servers in a cluster is that Dell pseudo names must match. The pseudo names are seen by running the powermt display dev=all command.
Pseudo name=emcpowera
Symmetrix ID=000195123456
Logical device ID=1B79
Device WWN=60000970000195123456533031423739
state=alive; policy=SymmOpt; queued-IOs=0
==============================================================================
Host Stor I/O Path Stats
### HW Path I/O Paths Interf. Mode State Q-IOs Errors
==============================================================================
1 lpfc sde FA 7e:00 active alive 0 0
1 lpfc sdd FA 5e:00 active alive 0 0
0 lpfc sdc FA 10e:00 active alive 0 0
0 lpfc sdb FA 12e:00 active alive 0 0
Pseudo name=emcpowerb
Symmetrix ID=000195123456
Logical device ID=1B8A
Device WWN=60000970000195123456533031423841
state=alive; policy=SymmOpt; queued-IOs=0
==============================================================================
Host Stor I/O Path Stats
### HW Path I/O Paths Interf. Mode State Q-IOs Errors
==============================================================================
1 lpfc sdm FA 7e:00 active alive 0 0
1 lpfc sdk FA 5e:00 active alive 0 0
0 lpfc sdi FA 10e:00 active alive 0 0
0 lpfc sdg FA 12e:00 active alive 0 0
(Note: The S/N of the array is modified for security purposes)
If the command is run on both hosts, notice that the pseudo names are different.
An article found on the Internet suggests the following:
"Shutdown PowerPath on one of the clustered nodes. $ sudo /etc/init.d/PowerPath stop Now that PowerPath is stopped, copy PowerPath configuration files from node one to node two. Copy /etc/emcp_devicesDB.dat and /etc/emcp_devicesDB.idx to the /etc directory on the node. Once the copy is complete, start PowerPath up (sudo /etc/init.d/PowerPath start) and run the powermt display dev=all command and the pseudo names will match."
Dell suggests using an "emcpadm export_mappings -f <pseudo_mapping>" on one node.
This saves the mapping between the array devices and the pseudo-devices.
Use "emcpadm import_mappings -f <pseudo_mappings>" on the other nodes.
<pseudo_mapping> is the file which contains the mapping between the pseudo-devices and the array devices.
Once this step is complete, update /etc/sysconfig/oracleasm. The directives ORACLEASM_SCANORDER and ORACLEASM_SCANEXCLUDE must be modified as follows:
ORACLEASM_ENABLED=true
# ORACLEASM_UID: Default user owning the /dev/oracleasm mount point.
ORACLEASM_UID=grid
# ORACLEASM_GID: Default group owning the /dev/oracleasm mount point.
ORACLEASM_GID=oinstall
# ORACLEASM_SCANBOOT: true means scan for ASM disks on boot.
ORACLEASM_SCANBOOT=true
# ORACLEASM_SCANORDER: Matching patterns to order disk scanning
ORACLEASM_SCANORDER= emcpower
# ORACLEASM_SCANEXCLUDE: Matching patterns to exclude disks from scan
ORACLEASM_SCANEXCLUDE= sd
Now, when ASMLib starts, it scans for ASM disks among the PowerPath pseudo-devices instead of the SCSI devices.