Escolar Documentos
Profissional Documentos
Cultura Documentos
FalconStor Software, Inc. 2 Huntington Quadrangle, Suite 2S01 Melville, NY 11747 Phone: 631-777-5188 Fax: 631-501-7633 Website: www.falconstor.com
Copyright 2011 FalconStor Software. All Rights Reserved. FalconStor Software, FalconStor, and IPStor are registered trademarks of FalconStor Software, Inc. in the United States and other countries. Windows is a registered trademark of Microsoft Corporation. All other brand and product names are trademarks or registered trademarks of their respective owners. FalconStor Software reserves the right to make changes in the information contained in this publication without prior notice. The reader should in all cases consult FalconStor to determine whether any such changes have been made. 6.17.2011
Contents
Introduction ............................................................................................... 1
Check DM-Multipath package ................................................................................................. 1
Introduction
Linux Device Mapper Multipathing (DM-Multipath) is a native path-failover solution available with Red Hat Enterprise Linux 4.0 U2, SUSE SLES 9.0 PS2, and above. DM-Multipath makes it possible to configure multiple I/O paths between the storage server and storage in order to provide transparent failover and failback. DM-Multipath supports path redundancy and throughput aggregation. This document describes best practices for configuring Linux DM-Multipath to manage multipathing for storage provisioned by CDP/ NSS. Two options are included:
If DM-Multipath is being configured for use with FALCON IPStor Disks, follow instructions in Configure DM-Multipath for FALCON Disks to run the configuration script. You can add disks other than FALCON disks at a later time. If DM-Multipath is being configured/has been configured for disks other than FALCON IPStor Disks, follow instructions in Add FALCON Disks to the DM-Multipath Configuration to include FALCON IPStor Disks in the devices section of the configuration file.
For more information on the DM-Multipath configuration file, refer to documentation for your operating system.
device-mapper device-mapper-multipath
Contents
Storage Administration Guide - SUSE Linux Enterprise Server 10 http://www.novell.com/documentation/sles10/pdfdoc/stor_evms/stor_evms.pdf Storage Administration Guide - SUSE Linux Enterprise Server 11 http://www.novell.com/documentation/sles11/pdfdoc/stor_admin/stor_admin.pdf
ADDITIONAL REFERENCES
Using Device-Mapper Multipath http://www.redhat.com/docs/manuals/csgfs/browse/4.6/DM_Multipath/index.html Online Storage Guide for Red Hat Enterprise Linux 5 http://www.redhat.com/docs/enUS/Red_Hat_Enterprise_Linux/html/Online_Storage_Reconfiguration_Guide/index.html
\"FALCON\"" >> multipath.conf \"IPSTOR DISK\"" >> \"round-robin 0\"" >> multibus" >> multipath.conf
if [ -f /etc/redhat-release ] then if [ `cat /etc/redhat-release | awk '{print $1}'` = "Red" ] then if [ `cat /etc/redhat-release | awk '{print $7}' | awk -F"." '{print $1}'` -eq 6 ] then if [ $1 = alua ] then echo " prio alua" >> multipath.conf else echo " prio const" >> multipath.conf fi else if [ $1 = nonalua ] then echo " prio_callout \"/bin/true\"" >> multipath.conf else echo " prio_callout \"/sbin/mpath_prio_alua %d\"" >> multipath.conf fi fi else if [ $1 = nonalua ] then echo " \"/bin/true\"" >> multipath.conf else prio_callout
echo " echo " echo " echo " echo " multipath.conf echo "
tur" >> multipath.conf 100" >> multipath.conf priorities" >> multipath.conf immediate" >> multipath.conf \"1 queue_if_no_path\"" >>
restart() { if [ -f /etc/redhat-release ] then if [ `cat /etc/redhat-release | awk '{print $1}'` = "Red" ] then if [ `cat /etc/redhat-release | awk '{print $7}' | awk F"." '{print $1}'` -eq 6 ] then mpathconf --enable fi fi service multipathd restart chkconfig multipathd on echo "=======================================================================" echo " Reloading dm-multipath"
echo "=======================================================================" multipath -F multipath -r multipath -ll elif [ -f /etc/SuSE-release ] then service multipathd restart chkconfig multipathd on echo "=======================================================================" echo " Reloading dm-multipath" echo "=======================================================================" multipath -F multipath -r multipath -ll else
Reload multipath.conf
To ensure the modified configuration file is read and adopted after modifying device parameters, reload multipath.conf by entering the following commands:
multipath F (Flush the impending IO and remove devices from the device-mapper.) multipath r (multipath in Ubuntu) (Reload the configuration file to apply new
changes.) Note: There may be some outstanding IOs on multipath devices; if multipath-F fails, restart the multipath daemon and then reload the configuration file:
service multipathd restart (e.g., RHES and SLES)
Note: When the user_friendly_names option in the multipath configuration file is set to yes, the name of a multipath device is in the form mpathn. For versions of Red Hat Enterprise Linux earlier than version 6, n is an integer. For Red Hat Enterprise Linux 6, n is an alphabetic character; therefore, the name of a multipath device might be mpatha or mpathb. For more information, refer to http://docs.redhat.com/docs/enUS/Red_Hat_Enterprise_Linux/6/html/DM_Multipath/MPIO_Overview.html.
1. Configure devices
When DM-Multipath is being used to support storage devices other than IPSTOR DISK, you must define parameters for IPSTOR DISK in the devices section of the configuration file. Add the section similar to the one shown below to include CDP/NSS-managed disks when generating multipath devices. In addition, you can set the appropriate parameters for a failover environment. There may be slight differences for other operating systems, with and without ALUA. This example shows the device section of the /etc/multipath.conf file including with ALUA for Redhat 5.6 and below:
devices { device { vendor product getuid_callout prio_callout features hardware_handler path_selector path_grouping_policy failback rr_weight rr_min_io path_checker } } "FALCON" "IPSTOR DISK" "/sbin/scsi_id -g -u -s /block/%n" "/sbin/mpath_prio_alua %d" "1 queue_if_no_path" "0" "round-robin 0" group_by_prio immediate prioritiesuniform 100 tur
CDP/NSS v6.15 and above supports asymmetric logical unit access (ALUA). To enable ALUA, set the priority callout program or the priority option as shown below. If you are using the iSCSI protocol, set the path_grouping_policy to multibus for Red Hat Enterprise Linux 4 update 7 and earlier. Linux DM-Multipath Configuration for CDP/NSS
10
Add FALCON Disks to the DM-Multipath Configuration The following parameter priority callout (prio_callout) must be changed to support specific operating system versions and ALUA: With ALUA:
SLES 10 SP2 and later prio alua RED HAT 6 and above prio alua Other - prio_callout /sbin/mpath_prio_alua %d
Without ALUA: SLES 10 SP2 and later prio const RED HAT 6 and above prio const Other - prio_callout /bin/true
4. Check configuration
Enter this command to display current multipathing status:
multipath -ll mpath1 (36000d7780000e5dc65d6877cf8618d14) dm-0 FALCON,IPSTOR DISK [size=9.8G][features=1 queue_if_no_path][hwhandler=0][rw] \_ round-robin 0 [prio=200][active] \_ 3:0:0:0 sdb 8:16 \_ 4:0:0:0 sdc 8:32 \_ 3:0:1:0 sdd 8:48 \_ 4:0:1:0 sde 8:64 [active][ready] [active][ready] [active][ready] [active][ready]
multipath F Flush impending IO and remove devices from the device-mapper. multipath r Reload the configuration file to apply new changes. multipath-l - List multipath devices.
11
multipath ll - Display the long list of multipath devices. dmsetup Configure DM devices. pvcreate Initialize physical volumes for use by LVM.
chkconfig add multipathd chkconfig multipathd on chkconfig add boot.multipath chkconfig add multipathd chkconfig boot.multipath on chkconfig multipathd on
12
Configure HBAs
Perform the following operations on any client machine that is using DM-Multipath.
13