Linux Admin Reference – Configuring DM-Multipath for EMC Clariion SAN Storage – Red Hat Enterprise Linux

In Enterprise Linux Environment, External storage often permits devices to be accessed by multiple physical paths. This improves redundancy and availability. SAN environment Red Hat Enterprise Linux provides the device-mapper-multipath component to manage multipath capable storage and to present multipath devices to applications running on the system. Device mapper multipath includes built-in support for common storage arrays.

EMC publishes a recommended device-mapper-multipath configuration for use with the Clariion line of SANs. In order for the Clariion to work properly with device-mapper-multipath, the following device section should be added to /etc/multipath.conf.   

Note :    You Can refer  Understanding Linuce Device Multipath  and   Device Multipath Configuration in RHEL, for Basic Multipath Configuration.

## Device attributes for EMC CLARiiON
device {
vendor “DGC “
product “*”
path_grouping_policy group_by_prio
getuid_callout “/sbin/scsi_id -g -u -s /block/%n”
prio_callout “/sbin/mpath_prio_emc /dev/%n”
path_checker emc_clariion
path_selector “round-robin 0”
features “1 queue_if_no_path”
no_path_retry 300
hardware_handler “1 emc”
failback immediate
}

The “defaults” section can be commented out or removed. The “blacklist” section would be the same for the Clariion as any other SAN – all non-multipathed devices should be blacklisted.

NOTE:    When using device-mapper-multipath , the device name of /dev/sdX may be changed due to SAN topology changing, and this will cause friendly name changed as well, to avoid this problem, we can disable the option of user_friendly_names and assign an alias for the particular LUN according to WWID of the LUN.

This is an example:

## Use user friendly names, instead of using WWIDs as names.
defaults {
user_friendly_names no
}

multipaths {

multipath {
wwid 3600508b4000156d700012000000b0000
alias red

multipath {
wwid 3600508b432181675847400156d700010
alias yellow
}

}

device {
vendor “DGC “
product “*”
path_grouping_policy group_by_prio
getuid_callout “/sbin/scsi_id -g -u -s /block/%n”
prio_callout “/sbin/mpath_prio_emc /dev/%n”
path_checker emc_clariion
path_selector “round-robin 0”
features “1 queue_if_no_path”
no_path_retry 300
hardware_handler “1 emc”
failback immediate
}

Configuring EMC Clariion in ALUA mode

Asymmetric Logical Unit Access (ALUA) support in device-mapper-multipath was updated in Red Hat Enterprise Linux 5.4, adding explicit ALUA support for Clariion storage. Earlier versions of Red Hat Enterprise Linux 5 added support for implicit ALUA (i.e. the operating system is not aware of which storage device paths have optimized performance and which have non-optimized performance). If the operating system consistently sends I/O on a non-optimized path, then the storage device may transparently make that path optimized, improving performance and causing idle paths to become non-optimized.

The device-mapper-multipath default information within multipath.conf for EMC CLARiiON storage is setup for active-passive configurations and uses the “1 emc” hardware handler, etc.

When CLARiiON storage is configured in active-active (alua) mode the multipath.conf needs to be modified to use the correct hardware handler, path checker, and priority callout routine for same.

Verify whether we have Active-Passive mode or ALUA mode.

# multipath -ll

<snip>
mpath1 (360000000000000000000000000000001) dm-2 DGC,VRAID
[size=20G][features=1 queue_if_no_path][hwhandler=1 emc][rw]
\_ round-robin 0 [prio=2][active]
\_ 0:0:0:16 sdc 8:32 [active][ready]
\_ 1:0:1:16 sdo 8:224 [active][ready]
\_ round-robin 0 [prio=0][enabled]
\_ 0:0:1:16 sdg 8:96 [active][ready]
\_ 1:0:0:16 sdk 8:160 [active][ready]
<snip>

the above output shows:

  • – hwhandler=1 emc present for CLARiiON storage, which is for Clariion active-passive (passive not ready — PNR) mode.
  • – Althernatively, performing a multipathd -k “show config” can be used to show what values are currently present/used within the kernel.
  • – If the “1 emc” handler continues to be present within the “show config” output even after changing multipath.conf with “1 alua”, then multipath hasn’t been restarted correctly.
  • – A priority of 0 is the nominal priority for a standby path. So having priorities present as above is an indication that multipath is configured in active-passive mode.Typical priority pairs for active-active (alua) would be something like 50 and 10.

To Confirm the ALUA configuration we can also use the sg_rtpg command as below:

Note :   sg_rtpg ( scsi Report Target Port Groups (RTPG) ) command will probe the specified device and the returned data is decoded

# sg_rtpg /dev/sdN
:
target port group asymmetric access state : 0x01 (active/non optimized)
:
target port group asymmetric access state : 0x00 (active/optimized)
:

The full set of asymmetric access state values defined by the scsi specification are:

0h Active/Optimized
1h Active/Non-optimized
2h Standby
3h Unavailable
4h-Eh Reserved
Fh Transitioning between states

Note : The sg_rtpg command is available from the optional sg3_utils package.

Steps to Configure Multipath for EMC-Clariion ALUA Mode

Add and/or update the devices clause for DGC (CLARiiON) arrays within multipath.conf. Please see the information within the latest available “EMC Host Connectivity Guide for Linux” from EMC. Failing to following EMC guidelines can result in the storage configuration being unsupported by EMC.

As an example, the following is the defined clause from “EMC Host Connectivity Guide for Linux”, Rev A31 dated Jul 2012 pgs 243/244 under “ALUA RHEL 5/ RHEL6” section:

devices {
:
.
# Device attributed for EMC CLARiiON and VNX series ALUA
device {
vendor “DGC”
product “*”
prio_callout “/sbin/mpath_prio_alua /dev/%n”
path_grouping_policy group_by_prio
features “1 queue_if_no_path”
failback immediate
hardware_handler “1 alua” 
path_checker readsector0 
}
:
.
}

NOTE:The above items in red are the sections that were changed between active/standby and active/active (alua) CLARiiON configurations. Note that the path_checker is changed from emc_clariion to just accepting the default (that is, an explicit path-checker type is not specified). The ones expected by EMC are currently either readsector0 or tur. An explicit path_checker selection has been shown above to eliminate ambiguity.

After changing multipath.conf, reboot or restart the multipath services for the changes to take effect.

# service multipathd reload

Once the multipath.conf is setup correctly, multipath –ll will show the paths something like the following:

#multipath -ll
<snip>
mpath1 (360000000000000000000000000000001) dm-2 DGC,VRAID
[size=20G][features=1 queue_if_no_path][hwhandler=1 alua][rw]
\_ round-robin 0 [prio=100][active]
\_ 0:0:0:16 sdc 8:32 [active][ready]
\_ 1:0:1:16 sdo 8:224 [active][ready]
\_ round-robin 0 [prio=50][enabled]
\_ 0:0:1:16 sdg 8:96 [active][ready]
\_ 1:0:0:16 sdk 8:160 [active][ready]
<snip>

The handler is alua and the path priorities show active access via non-zero priority values. The actual priority values may be different – 50,20 or 50,10 for example, or other similar pairs of values.

Ramdev

Ramdev

I have started unixadminschool.com ( aka gurkulindia.com) in 2009 as my own personal reference blog, and later sometime i have realized that my leanings might be helpful for other unixadmins if I manage my knowledge-base in more user friendly format. And the result is today's' unixadminschool.com. You can connect me at - https://www.linkedin.com/in/unixadminschool/

1 Response

  1. October 6, 2015

    […] Read – Configuring DM-Multipath for EMC Clariion SAN Storage […]

What is in your mind, about this post ? Leave a Reply

Close
  Our next learning article is ready, subscribe it in your email

What is your Learning Goal for Next Six Months ? Talk to us