Tuesday, November 18, 2008

EMC Powerpath Software

I am having a lot of servers actually connected to various EMC storages like Symmetrix, Clariion. As with all storage softwares, the biggest challenge is to manage the multi-path devices and to ensure that devices remain on OS even in case of a Service processor failure or an HBA card failure.

As with all other storages like HP, SUN etc. EMC provides a software known as EMC Powerpath. This software allows one to map the OS devices to a pseudo block device without having to worry about the device paths.

For e.g. on a Linux system, HBA card 1 can give a device name as /dev/sda and the same device via HBA card 2 could have /dev/sdf or some other name. This setup can be really confusing if someone decides to use the devices on the basis of there SCSI device IDs. Lets say someone uses /dev/sda and due to power outage or service processor failure on SAN switch, the paths gets reversed. In that case,

/dev/sda will no longer be primary.
/dev/sdf will become primary.

But due to this path change, /etc/vfstab (Solaris) and /etc/fstab (Linux) configs would go foo-bar.

To save us from this hassel, EMC powerpath maps the OS block devices with the pseudo /dev/emcpower[a-z] devices.

This mapping can be checked using the command:-

powermt display dev=all


Powerpath software saves the device mapping info in a file /etc/opt/emcpower/emcpower.conf or /etc/emcp_devicesDB.idx & /etc/emcp_devicesDB.dat depending upon the versison of Powerpath software.

These mapped devices emcpower[a-z] can be partitioned & used for a filesystem (by running mkfs on them) or even as a rawdevice. It really boils down to how you wanna use them.

Always use emcpower pseudo devices in /etc/fstab or /etc/vfstab configurations or in /etc/sysconfig/rawdevices (For raw device mapping).

Rahul.

5 comments:

Anonymous said...

Hi Rahul

It was an good article, i still need some help from you.

Say there are 2 HBA's. There are 2 luns

LunAA
LunBB

They are now detected 4 times...
lun0 - ( eg. uuid 10001 )
lun1 - ( eg. uuid 10002 )
lun2 - ( eg. uuid 10001 )
lun3 - ( eg. uuid 10002 )

OS detects lun0 as /dev/sda
lun1 as /dev/sdb
lun2 as /dev/sdc
lun3 as /dev/sdd


The powerpathd configures multipathing as

/dev/emcpowera ---> ( /dev/sda || /dev/sdc )
/dev/emcpowerb ---> ( /dev/sdb || /dev/sdd )

i create two mount points and moun the devices ie. /dev/emcpowera on /test1
/dev/emcpowerb on /test2


SO FAR ...SO FINE

Scenario 1:
+++++++++++
Now there are some changes at the Storage end and both the /dev/sda and /dev/sdc are not available
Please tell me, i reboot the server now .

now I will be able to see only two luns ,

lun0 - ( /dev/sda || /dev/sdb ) ( Now the order has changed na !. What will be the pseudo device name )

I assume it will be /dev/emcpowera ( But this was not the same partion mounted in fstab ...creating problems )

Please suggest what to do

Scenario 2 :
+++++++++++++
Is there any special configuration file ( i did see in your post , but unable to read as it was a data file )to achive persistency.

Rahul Khare said...

EMCpowerpath version 3.0.6 or earlier uses emcpower.conf file..which only takes the LUN VID's into account. These vid's are not SCSI major/minor numbers. Hence even after the scsi LUN renumbering, it adapts accordingly based on the WWWN, WWPN number's of the LUNs.

It all boils down to proper installation of EMC powerpath software with appropriate license.

You could also look at dev-mapper for multipathing...but powerpath is very good in terms of adapting to SCSI renumbering.

Unless a LUN is trespassed in a EMC storage, older versions of EMC powerpath also seem to be quite stable.

Anonymous said...

Hi Rahul,
We are using EMC storage, however we do not have power path.
on one occassion, our server was rebooted after a lun was assigned to it.
As a result the we were not able to track the new lun with echo ...scan command, somehow backtracking we could make out the new lun,but my query is, is there any way to identify the lun mapping from EMC to OS without tools like powerpath?We have used inq butcouldnt trace the lun...please let us know if there is any method to detect the lun mapping on a standard RHEL4 U 8 OS.

Anonymous said...

We are using EMC storage, however we do not have power path.
on one occassion, our server was rebooted after a lun was assigned to it.
As a result the we were not able to track the new lun with echo ...scan command, somehow backtracking we could make out the new lun,but my query is, is there any way to identify the lun mapping from EMC to OS without tools like powerpath?We have used inq butcouldnt trace the lun...please let us know if there is any method to detect the lun mapping on a standard RHEL4 U 8 OS.

Rahul Khare said...

inq is your buddy...

# inq
Inquiry utility, Version V7.3-771 (Rev 0.0) (SIL Version V6.3.0.0 (Edit Level 771)
Copyright (C) by EMC Corporation, all rights reserved.
For help type inq -h.

...............................................................................
...............................................................................
...............................................................................
..................................................

--------------------------------------------------------------------------
DEVICE :VEND :PROD :REV :SER NUM :CAP(kb)
--------------------------------------------------------------------------
#

The SER NUM field displays the EMC device IDs and can be used to detect the lun. Whenever you have issues, try to run inq and compare the SER NUM field with the device ids.

What powerpath does is it multipaths the devices and the LUN IDs are a sub-string of "SER NUM" field.