DotHill Linux DMMP 4
DotHill Linux DMMP 4
Revision 4
How to Configure Linux Device Mapper Multipathing (DM-MP) for Dot Hill Storage Arrays
by Steve Cellum
Revision 4
Revision History
Author Steve Cellum Cullen Owen Cullen Owen Cullen Owen Date 09/26/2006 04/04/2007 04/11/2009 05/20/2009 Changes Rev 1 Original Document Rev 2 Added TOC. Minor updates. Rev 3 Updates for ULP Rev 4 Updates on Inquiry Names and recommendations
Revision 4
Contents
1 Scope ........................................................................................................................ 4 2 Quick Start................................................................................................................ 4 3 Introduction .............................................................................................................. 5 3.1 Features of DM-MP .................................................................................. 5 3.2 Software components of DM-MP............................................................ 6 4 Theory of Operation................................................................................................. 6 4.1 Terms and Concepts ............................................................................... 7 5 Installing DM-MP ...................................................................................................... 8 5.1 RedHat Linux 4......................................................................................... 8 5.1.1 Multipath Setup.................................................................................. 8 5.2 RedHat Linux 5......................................................................................... 9 5.3 SUSE Linux 9 ........................................................................................... 9 5.4 SUSE Linux 10 ......................................................................................... 9 6 Configuration ........................................................................................................... 9 6.1 Configuring the DotHill storage array for Multipathing ........................ 9 6.2 Configuring DM-MP with the multipath.conf file............................ 10 6.3 Multipath.conf (Additional Detail)......................................................... 11 6.3.1 System defaults (defaults)........................................................... 11 6.3.2 Blacklisted devices (devnode_blacklist).................................. 12 6.3.3 Per-storage-array (devices) .......................................................... 12 6.3.4 Per-device settings (multipaths) ................................................. 13 6.3.5 Unified Lun (ULP) settings (devices) ........................................... 14 6.4 Multipath.conf (Recommended DotHill Storage Settings) ................. 14 6.4.1 SANnet II........................................................................................... 14 6.4.2 R/Evolution 2730 / 5730................................................................... 15 6.4.3 R/Evolution 5730 (with ULP) ........................................................... 15 6.4.4 R/Evolution 2330.............................................................................. 16 6.4.5 R/Evolution 2330 (with ULP) .......................................................... 16 6.4.6 R/Evolution 2530.............................................................................. 17 7 Configuring Host Bus Adapters ........................................................................... 17 7.1 Configuring QLogic HBA parameters .................................................. 18 7.2 Configuring QLogic/Emulex HBAs for R/Evolution storage .............. 18 8 Managing DM-MP Devices .................................................................................... 18 9 Known Issues......................................................................................................... 20 10 Appendix A - multipath.conf.annotated file......................................................... 22
Revision 4
1 Scope
Device Mapper Multipath (DM-MP) allows Linux systems running a 2.6 kernel version to route I/O over multiple paths to a storage array. DM-MP directs the I/O operations over all the usable paths as paths fail and are repaired without any interruption to the application layer. This document explains how to configure DM-MP for Dot Hill SANnet II storage arrays and R/Evolution storage arrays with the following versions of Linux: Red Hat Enterprise Linux 4, RedHat Enterprise Linux 5, Novell SUSE 9 and Novell SUSE 10.
2 Quick Start
This section contains a concise description of the steps necessary to set up DM-MP for the SANnet II FC, SANnet II SATA or R/Evolution storage arrays. Experienced Linux systems administrator are invited to dive right in. Others can use it as an overview of the configuration process. 1. Install the DM-MP package if it is not already installed. (See Installing DM-MP) 2. By default all devices are blacklisted (disqualified from control by DM-MP). Comment out or delete the following three lines that appear near the beginning of the /etc/multipath.conf file:
# devnode_blacklist { # # } devnode "*"
3. Edit the devices section of the /etc/multipath.conf file to look like the following (two examples of DotHill storage are shown): Example #1:
devices { device { vendor product path_grouping_policy getuid_callout } } "DotHill" "SANnet II FC" multibus "/sbin/scsi_id -g -u -s /block/%n"
DotHill Linux Device Mapper Multipath How To for Storage Example #2:
devices { device { vendor product path_grouping_policy getuid_callout } } "DotHill " "R/Evo 2730-2R" multibus "/sbin/scsi_id -g -u -s /block/%n"
Revision 4
5. Configure the system startup scripts to start the multipathd daemon at boot time:
# chkconfig --add multipathd # chkconfig multipathd on
6. Create your devices and start DM-MP with the two commands below. (This step is only required the first time; on reboot it will be performed as a part of system startup.)
# multipath # /etc/init.d/multipathd start
7. Your multipath virtual devices should now appear in the /dev/mapper directory ready for use with names of the form mpathn.
3 Introduction
The Device Mapper is a new infrastructure in the Linux 2.6 kernel that provides a way to create virtual block devices. These Device Mapper devices support striping, mirroring, snapshots, concatenation and multipathing. In this document we will discuss only the multipathing feature. Device Mapper block devices are also supported by the Logical Volume Manager (LVM2). DMMP depends upon the combination of the DM-MP kernel modules and the multipath-tools userspace package.
Revision 4
Alternate Paths: Redundant physical connectivity between a host system equipped with multiple HBAs and the SANnet storage array Failover: Constantly monitors each path and automatically reroutes I/O operations over a functioning alternate path upon the failure of a path Failback: Optionally moves the I/O operations back to a path that had failed but has been repaired Transparency: Implements failover or failback transparently without disrupting higher-level applications Monitoring: Notifies the user if there is a change in the path status Load Balancing: Distributes the I/O operations among all available paths to enhance performance Flexible Management: Uses a CLI with a rich choice of display options to configure and manage multipath features User-Friendly Names: Provides an option for customized names of the DM-MP devices Naming Persistence: Names of DM-MP devices persist across reboots even if there are changes in the attached storage configuration
This first release of Device Mapper is intended for use in test environments and for applications that are not mission-critical.
4 Theory of Operation
When there are multiple paths to a storage array each path appears as a separate block device. This results in multiple block devices that refer to the same storage resource or logical unit (LU). For example, if a single LU is presented through two ports in a storage array which is connected to a host with two HBAs through a single unzoned Fibre Channel switch, the host will see four
Revision 4
block devices: /dev/sda, /dev/sdb, /dev/sdc, and /dev/sdd. All of these devices refer to the same underlying storage resource. DM-MP creates a single virtual block device, e.g., /dev/mapper/mpath1, that can be used by applications. DM-MP routes I/O for that virtual device through the four underlying physical devices. If one path fails, DM-MP routes uses the remaining paths to maintain connectivity between the host and the storage.
Revision 4
callout program. For the SANnet storage arrays it is constructed from the Logical Unit Device Identifier on the device identification page (page 0x83 of the vital product data pages). Alias An alias is the name that DM-MP uses in displaying information about a multipath device. By default, the alias is set to the WWID of the device. However, by enabling the user_friendly_names option in the multipath.conf file, the alias is set to a name of the form mpathn. While this form of the alias is guaranteed to be unique on a host, it may not be the same on all hosts using that multipath device, and it may change. The association between userfriendly names and their WWIDs is cached in the file /var/lib/multipath/bindings. This file should usually not need to be modified by hand. To ensure that the multipath devices have the same names on all hosts accessing them this file can be propagated to all the hosts. The alias can optionally be set to any arbitrary value in the configuration file.
5 Installing DM-MP
5.1 RedHat Linux 4
Ensure that the Device Mapper and the Multipath tools packages are installed on the system. For RHEL4 the packages are (check for later versions):
device-mapper-1.02.25-2.e14 device-mapper-multipath-0.4.5-31.e14
You must configure the host to start the Device Mapper Multipath daemon, multipathd, at boot time. Installing the package will not make this happen.
2. If is not configured, run the following commands to start the multipathd daemon during boot time:
# chkconfig --add multipathd # chkconfig multipathd on
Revision 4
3. After completing the above steps reboot the host. To verify that the modules required by DMMP are loaded and the multipathd daemon has started at boot time, run the following commands:
# lsmod | grep dm_multipath # lsmod | grep dm_mod # ps ax | grep multipathd
You must configure the host to start the Device Mapper Multipath daemon, multipathd, at boot time. Installing the package will not make this happen. Refer to instructions for RedHat 4.
You must configure the host to start the Device Mapper Multipath daemon, multipathd, at boot time. Installing the package will not make this happen. Refer to instructions for RedHat 4.
You must configure the host to start the Device Mapper Multipath daemon, multipathd, at boot time. Installing the package will not make this happen. Refer to instructions for RedHat 4.
6 Configuration
6.1 Configuring the DotHill storage array for Multipathing
Revision 4
Multipath configurations require that you map each instance of a storage resource (partition) to two different host channels on the SANnet controller. This is explained in detail in the SANnet II 200 FC and SATA Array Best Practices Manual (part number 83-00003263) available in the Dot Hill Web site (www.dothill.com/support).
Description
into path groups.
Supported Values
failover: one path per path group multibus: all valid paths in one path group group_by_serial: one path group per detected controller group_by_prio: one path group per path priority value tur: SCSI TEST UNIT READ
path_checker
command readsector0: READ sector 0 of storage resource scsi_id -g -u -s device round-robin 0 manual immediate n (n>0); failback deferred for n seconds none /sbin/mpath_prio_alua
Command that is used to obtain the WWID for the device Specifies the algorithm used for path selection within a path group. Manages the path group failback
prio_callout
Executable to obtain a path weight for a block device. Weights are summed for each path group to determine the next path group to use in case of path failure
10
Revision 4
1 queue_if_no_path
Each of these attributes can be set either on a per-device basis for a single storage resource, on a per-storage array basis of for all the storage resources presented by one model of storage array, or for all storage resources seen by the system. The file is divided into four sections: system defaults, blacklisted devices, per-storage array settings, and per-device settings. Settings made in the per- device section apply only to the device specified in that section; settings made in the per-storage array section apply to all devices presented by that model of storage array. Devices in the blacklisted devices section are excluded from DM-MP control. To determine the attributes of a multipath device, the blacklisted devices section is checked first. If the device does not match an entry in the blacklist, then the per-device section is checked. If there is no match there, then the per-storage array section is checked. Devices that do not match entries in any of the previous three sections inherit the settings in the system defaults section. In addition to a template file, /etc/multipath.conf, the DM-MP package installs three other versions of this configuration file:
/usr/share/doc/device-mapper-multipath-0.4.5/multipath.conf.annotated
This file contains detailed descriptions of each of the parameters that can be used. (A copy of this file is included as an appendix to this document for easy reference.)
/usr/share/doc/device-mapper-multipath-0.4.5/multipath.conf.defaults
This file contains the settings that are compiled into the code. Running DM-MP without a configuration file is the same as using the multipath.conf.defaults file.
/usr/share/doc/device-mapper-multipath-0.4.5/multipath.conf.synthetic.
This file contains the same entries as the template file that is placed into the /etc directory during package installation .
11
Revision 4
Using devnode names of the form sdx should be avoided since the devices to which the refer can change as storage is reconfigured.
12
Revision 4
This sets the aliases of the multipath devices to my chosen names rather than the default userfriendly names of the mpathn format.
13
Revision 4
14
Revision 4
15
Revision 4
"/sbin/scsi_id -g -u -s /block/%n" tur "round-robin 0" "0" /sbin/mpath_prio_alua /dev/%n immediate priorities 12
16
Revision 4
R/Evolution 2330 (ULP)- The following are the recommended attributes for the R/Evolution 2330 array, with ULP, specified in the per-storage
devices { device { vendor product path_grouping_policy getuid_callout path_checker path_selector hardware_handler prio_callout failback rr_weight no_path_retry } } "DotHill" "R/Evo 2330-2R" group_by_prio "/sbin/scsi_id -g -u -s /block/%n" tur "round-robin 0" "0" /sbin/mpath_prio_alua /dev/%n immediate uniform 12
17
Revision 4
You must configure HBA parameters for the Device Mapper Multipath. The HBA time-out values are typically set for non-DM-MP environments, where longer time outs are necessary. This is because the only alternative is to send an error to the application. However, with DM-MP, errors like cable failures must be reported earlier so that the multipath layer can quickly take action and redirect the I/O to another path. This section describes how to configure the host bus adapter driver:
2. Rebuild the initrd file using the mkinitrd command. A sample command is show below. For more information see MKINITRD(8).
# mkinitrd /boot/initrd-2.6.9-34ELsmp-dmmpparams 2.6.9-34.ELsmp
3. Edit your boot loader configuration file to make your new initrd file available and reboot the host.
18
Revision 4
Display the current multipath topology from all available sources (including path checkers Re-scan path information Display all device information including all paths, source of attributes (e.g., default) Set group policy to specified policy (e.g., multipath)
To view the current status of all multipath devices, run the multipath utility:
# multipath -ll mpath1 (3600c0ff0000000000234320d5321e100) [size=25 GB][features="0"][hwhandler="0"] \_ round-robin 0 [prio=2] \_ 2:0:0:0 \_ 3:0:0:0 sdb 8:16 [ready] sde 8:64 [ready]
mpath2 (3600c0ff0000000000234320d5321e101) [size=25 GB][features="0"][hwhandler="0"] \_ round-robin 0 [prio=2] \_ 2:0:0:1 \_ 3:0:0:1 sdc 8:32 [ready] sdf 8:80 [ready]
The information in the map is presented by grouping the paths for storage resource with unique identifiers. The size, features and the corresponding hardware handlers are also shown:
alias (WWID if different from alias) [size] [features] [hardware handler]
After that follow a line for each path in the path group:
\_host:channel:ID:LUN devnode major:minor [path_status] [dm_status]
At various time the status of a path may not be know. The following display shows devices with custom names (values of alias) that were set in the configuration file. The presence of a single path in each path group is a result of the attribute failover for the path_grouping_policy:
19
Revision 4
myspace (3600c0ff000000000023432491536d600) [size=33 GB][features="0"][hwhandler="0"] \_ round-robin 0 [prio=1][active] \_ 2:0:1:0 \_ 3:0:1:0 sdd 8:48 [active][ready] sdg 8:96 [active][ready] \_ round-robin 0 [prio=1][enabled]
The multipath devices are created in the /dev/mapper directory. These devices can be used like any other block devices present in the host for any block- or file-level I/O operations. The state of the path is given as [ready] [active] if the path is up and ready for I/O. If the path is down, this state will be shown as [faulty] [failed]. The path states will be updated periodically by multipathd based on the polling interval specified in /etc/multipath.conf. If you want to reduce the number assigned to the /dev/mapper/mpath link, you can edit the /var/lib/multipath/binding file. Just delete the uncommented wwid/alias lines in the file.
9 Known Issues
Following are the limitations and known issues of Device Mapper Multipath: ioctl support is not available on a multipath device created by DM-MP. Hence SCSI inquiry like operations are not possible with these devices You have to manually enter the device properties for the SANnet arrays in the /etc/multipath.conf file. Under all path failure condition, if the queue_if_no_path feature is enabled, the I/O requests are queued as long as system resources are available. This may result in system resource starvation. Wild card or regular expression support for the product and vendor string (in the /etc/multipath.conf file) is only supported in RHEL 4 U3 Time based I/O request queuing (no_path_retry in the /etc/multipath.conf file) is only supported in RHEL4U3. Device Mapper Multipath may fail to create device nodes for partitions when the configuration has a large number of LUNs For a host with many LUNs, the command multipath -ll may take longer time to display the status of all the DM-MP devices if there is a change in the path status Device Mapper Multipath does not support online deletion of multipath devices. If the
20
Revision 4
storage resource is deleted from the host when it is online, the DM-MP device corresponding to that LU is displayed as #:#:#:# in the multipath -ll output. Online LUN addition is currently not supported The current version supports only a single path to the root device SLES 9.3 user_friendly_names may not create names with mpathN. Instead, edit the multipath.conf file with the wwid of the device. When iSCSI is the protocol, the no_path_retry flag should be set to 12 and not queue. There have been issues with Linux servers freezing when using queue as the value.
21
Revision 4
/usr/share/doc/device-mapper-multipath-0.4.5/multipath.conf.annotated ## ## This is a template multipath-tools configuration file ## Uncomment the lines relevant to your environment ## # ## ## name ## desc ## #defaults { # # # # # # # # # # # # # # # # # # # # # # # # # # # name # scope # desc # # values # selector "round-robin 0" : selector : multipath : the default path selector algorithm to use these algorithms are offered by the kernel multipath target : "round-robin 0" # # name # scope # desc # values # polling_interval 10 : polling_interval : multipathd : interval between two path checks in seconds : n > 0 # # name # desc # udev_dir /dev : udev_dir : directory where udev creates its device nodes : defaults : multipath-tools default settings
# default : /udev
# default : 5
22
Revision 4
: the default program and args to callout to obtain a unique path identifier. Absolute path required
# default : /sbin/scsi_id -g -u -s
# default : (null)
# default : readsector0
23
Revision 4
# default : 1000
: if set to priorities the multipath configurator will assign path weights as "path prio * rr_min_io" : priorities|uniform
# default : uniform
# default : immediate
# default : (null)
24
Revision 4
# default : no user_friendly_names no
Devices can identified by either their device node name "devnode" or their WWID "wwid".
## default : cciss, fd, hd, md, dm, sr, scd, st, ram, raw, loop
25
Revision 4
= all valid paths in 1 priority group = 1 priority group per detected serial number = 1 priority group per path priority value
not to. 0 means immediate failback, values >0 means deffered failback expressed in seconds. : manual|immediate|n > 0
# default : immediate
26
Revision 4
# default : uniform
: tell the number of retries until disable queueing, or "fail" means immediate failure (no queueing), "queue" means never stop queueing : queue|fail|n (>0)
# default : (null)
rr_weight
27
Revision 4
= all valid paths in 1 priority group = 1 priority group per detected serial number = 1 priority group per path priority value
: the program and args to callout to obtain a unique path identifier. Absolute path required
# default : /sbin/scsi_id -g -u -s
# default : readsector0
28
Revision 4
not to. 0 means immediate failback, values >0 means deffered failback expressed in seconds. : manual|immediate|n > 0
# default : immediate
: If set, it specifies a module that will be used to perform hardware specific actions when switching path groups or handling IO errors : "0"|"1 emc"
# default : "0"
: if set to priorities the multipath configurator will assign path weights as "path prio * rr_min_io" : priorities|uniform
# default : uniform
29
Revision 4
# default : (null)
30