DotHill – Linux Device Mapper Multipath “How To” for Storage Revision 4 How to Configure Linux Device Mapper Multipathing (DM-MP) for Dot Hill Storage Arrays by Steve Cellum DotHill – Copyright 2009 1
DotHill – Linux Device Mapper Multipath “How To” for Storage Revision 4 Revision History Author Date Changes Steve Cellum 09/26/2006 Rev 1 – Original Document Cullen Owen 04/04/2007 Rev 2 – Added TOC. Minor updates.
DotHill – Linux Device Mapper Multipath “How To” for Storage Revision 4 Contents 1 Scope ........................................................................................................................ 4 2 Quick Start................................................................................................................ 4 3 Introduction .............................................................................................................. 5 3.1 Features of DM-MP ...................
DotHill – Linux Device Mapper Multipath “How To” for Storage 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.
DotHill – Linux Device Mapper Multipath “How To” for Storage Revision 4 Example #2: devices { device { vendor "DotHill " product "R/Evo 2730-2R" path_grouping_policy multibus getuid_callout "/sbin/scsi_id -g -u -s /block/%n" } } 4. Preview your multipath devices by running the following command: # multipath -v2 -d 5. Configure the system startup scripts to start the multipathd daemon at boot time: # chkconfig --add multipathd # chkconfig multipathd on 6.
DotHill – Linux Device Mapper Multipath “How To” for Storage • • • • • • • • • 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 tran
DotHill – Linux Device Mapper Multipath “How To” for Storage 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. 4.
DotHill – Linux Device Mapper Multipath “How To” for 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.
DotHill – Linux Device Mapper Multipath “How To” for Storage 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 5.2 RedHat Linux 5 For RedHat 5 the packages are (check for later versions): device-mapper-1.01-1.6 multipath-tools-0.4.5-0.
DotHill – Linux Device Mapper Multipath “How To” for Storage 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). 6.2 Configuring DM-MP with the multipath.
DotHill – Linux Device Mapper Multipath “How To” for Storage no_path_retry (only for RHEL4) n is the number of retries until disable • • queuing (queues till n number of polling), or fail means immediate • Revision 4 n (>0) fail queue failure (no queuing), queue means never stop queuing (queue forever or until the path comes alive) features Sets the SuSE DM-MP driver to queue • (only for SLES) I/O if no path is available. This is “1 queue_if_no_path” recommended for SuSE 9.0.
DotHill – Linux Device Mapper Multipath “How To” for Storage Revision 4 defaults { udev_dir /dev polling_interval 10 path_selector "round-robin 0" path_grouping_policy multibus getuid_callout "/sbin/scsi_id -g -u -s /block/%n" prio_callout /bin/true path_checker readsector0 rr_min_io 100 rr_weight priorities failback immediate no_path_retry fail user_friendly_names yes } 6.3.
DotHill – Linux Device Mapper Multipath “How To” for Storage Revision 4 devices { device { vendor "DotHill" product "SANnet II FC" path_grouping_policy multibus failback immediate } device { vendor "DotHill" product "R/Evo 2730-2R" path_grouping_policy failover failback 25 } } 6.3.4 Per-device settings (multipaths) The per-device settings specify one or more devices by WWID. These settings apply only to the devices of a specific WWID value.
DotHill – Linux Device Mapper Multipath “How To” for Storage Revision 4 6.3.5 Unified Lun (ULP) settings (devices) The per-device settings here are used when using a DotHill Storage product with Unified Luns. The important settings for ULP performance are the “path_grouping_policy” and the “prio_callout” flags. This example is taken from the DotHill R/Evolution 2330, which is an iSCSI storage array.
DotHill – Linux Device Mapper Multipath “How To” for Storage Revision 4 devices { device { vendor "DotHill" product "SANnet II FC" path_grouping_policy multibus getuid_callout "/sbin/scsi_id -g -u -s /block/%n" path_checker tur path_selector "round-robin 0" hardware_handler "0" prio_callout none failback 15 rr_weight priorities no_path_retry queue } } 6.4.
DotHill – Linux Device Mapper Multipath “How To” for Storage Revision 4 devices { device { vendor "DotHill" product "R/Evolution 5730-2R" path_grouping_policy group_by_prio getuid_callout "/sbin/scsi_id -g -u -s /block/%n" path_checker tur path_selector "round-robin 0" hardware_handler "0" prio_callout “ /sbin/mpath_prio_alua /dev/%n” failback immediate rr_weight priorities no_path_retry 12 } } 6.4.
DotHill – Linux Device Mapper Multipath “How To” for Storage 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 "DotHill" product "R/Evo 2330-2R" path_grouping_policy group_by_prio getuid_callout "/sbin/scsi_id -g -u -s /block/%n" path_checker tur path_selector "round-robin 0" hardware_handler "0" prio_callout “ /sbin/mpath_prio_alua /dev/%n” failback immediate rr
DotHill – Linux Device Mapper Multipath “How To” for Storage 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.
DotHill – Linux Device Mapper Multipath “How To” for Storage Revision 4 Display the current multipath topology from all available multipath -ll [device] sources (including path checkers multipath -v2 [device] Re-scan path information multipath -v3 Display all device information including all paths, source of attributes (e.g., default) multipath -p group-policy [] Set group policy to specified policy (e.g.
DotHill – Linux Device Mapper Multipath “How To” for Storage Revision 4 # multipath -ll yourspace (3600c0ff0000000000234320d5321e101) [size=25 GB][features="0"][hwhandler="0"] \_ round-robin 0 [prio=1][active] \_ 2:0:0:1 sdc 8:32 [active][ready] \_ round-robin 0 [prio=1][enabled] \_ 3:0:0:1 sdf 8:80 [active][ready] myspace (3600c0ff000000000023432491536d600) [size=33 GB][features="0"][hwhandler="0"] \_ round-robin 0 [prio=1][active] \_ 2:0:1:0 sdd 8:48 [active][ready] \_ round-robin 0 [prio=1][enabl
DotHill – Linux Device Mapper Multipath “How To” for Storage • • • • 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.
DotHill – Linux Device Mapper Multipath “How To” for Storage Revision 4 10 Appendix A - multipath.conf.annotated file The annotated multipath.conf file describes all of the supported options and the defaults that are compiled into the code. This file is installed in the /usr/share/doc/device-mappermultipath- 0.4.5/ directory. It is reproduced here as a reference: /usr/share/doc/device-mapper-multipath-0.4.5/multipath.conf.
DotHill – Linux Device Mapper Multipath “How To” for Storage Revision 4 # # # # # name : path_grouping_policy # # scope : multipath # # desc : the default path grouping policy to apply to unspecified # # # # values # # multibus = all valid paths in 1 priority group # # group_by_serial = 1 priority group per detected serial # # # # group_by_prio = 1 priority group per path priority # # # # # # default : failover # # # path_grouping_policy multipaths : failover = 1 pa
DotHill – Linux Device Mapper Multipath “How To” for Storage # # name : rr_min_io # # scope : multipath # # desc : the number of IO to route to a path before switching # # # # default : 1000 # # # rr_min_io Revision 4 to the next in the same path group 100 # # # # # name : rr_weight # # scope : multipath # # desc : if set to priorities the multipath configurator will assign # # # # values # # default : uniform # # # rr_weight path weights as "path prio * rr_min_io" :
DotHill – Linux Device Mapper Multipath “How To” for Storage # # If set to "no" use the WWID as the alias. In either case # # this be will be overriden by any specific aliases in this # # file. # # values # # default : no # user_friendly_names no Revision 4 : yes|no # #} # ## ## name : blacklist ## scope : multipath & multipathd ## desc : list of device names to discard as not multipath candidates.
DotHill – Linux Device Mapper Multipath “How To” for Storage # # desc # # # alias Revision 4 : symbolic name for the multipath yellow # # # # # name : path_grouping_policy # # scope : multipath # # desc : path grouping policy to apply to this multipath # # values : failover # # # # # # # # # # # # # # # # # # default : failover # # # path_grouping_policy = 1 path per priority group multibus = all valid paths in 1 priority group group_by_serial = 1 priority gro
DotHill – Linux Device Mapper Multipath “How To” for Storage # # # # values # # default : uniform # # # rr_weight Revision 4 assign path weights as "path prio * rr_min_io" : priorities|uniform priorities # # # # # name : no_path_retry # # scope : multipath & multipathd # # desc : tell the number of retries until disable queueing, # # # # # # values # # default : (null) # # # or "fail" means immediate failure (no queueing), "queue" means never stop queueing : queue|fail|n (
DotHill – Linux Device Mapper Multipath “How To” for Storage # # # # name : path_grouping_policy # # scope : multipath # # desc : path grouping policy to apply to multipath hosted # # # # values # # # # # # # # # # # # # # # # # # default : failover # # # path_grouping_policy Revision 4 by this storage controller : failover = 1 path per priority group multibus = all valid paths in 1 priority group_by_serial = 1 priority group per detected group_by_prio = 1 priori
DotHill – Linux Device Mapper Multipath “How To” for Storage Revision 4 # # # # # name : path_selector # # desc : the path selector algorithm to use for this mpath # # # # values # # default : "round-robin 0" # # # path_selector these algo are offered by the kernel mpath target : "round-robin 0" "round-robin 0" # # # # # name : failback # # scope : multipathd # # desc : tell the daemon to manage path group failback, or # # # # # # values # # default : immediate # #
DotHill – Linux Device Mapper Multipath “How To” for Storage # # # # # # values # # default : (null) # # # or "fail" means immediate failure (no queueing), "queue" means never stop queueing : queue|fail|n (>0) no_path_retry # } # device { queue # vendor "COMPAQ # product "MSA1000 # path_grouping_policy multibus # path_checker tur # rr_weight priorities # Revision 4 " " } #} DotHill – Copyright 2009 30