Multipathing Setup on RHEL 6.0 Sharath Suryanarayan November, 2012 KB-00009 Document Revision 1
StorSimple knowledge base articles are intended to provide customers with information and guidance to successfully deploy and manage StorSimple Storage Appliances and Software as a part of their broader data and storage management processes. KB-00009 Page 2 of 7
Multipathing Setup on RHEL 6.0 KB-00009 Overview This KB article explains the steps required to setup Multipathing on Red Hat Enterprise Linux (RHEL) iscsi initiators connected to a StorSimple appliance for High Availability (HA). This article details the automatic discovery of multipath devices and specific setup only for StorSimple volumes. Prerequisites This section details the configuration prerequisites on RHEL server and StorSimple Appliance. On RHEL Server Following utilities need to be installed on the RHEL server: iscsi-initiator-utils Device-mapper-multipath On StorSimple Appliance The StorSimple appliance should have: A minimum of two interfaces enabled for iscsi All iscsi Interfaces should be reachable from the RHEL server Recommended that interfaces are connected on separate paths for redundancy. Automatic Discovery Multipathing Configuration Multipath supported devices can be automatically discovered and configured. For this method, automatic discovery should be enabled on the RHEL server. Automatic discovery enables any multipathing devices to be automatically added to the list of supported devices and discover all available paths to the device. KB-00009 Page 3 of 7
Multipathing on RHEL can be configured using the following two methods: Editing /etc/multipath.conf file Using mpathconf utility to edit the /etc/multipath.conf file. Both methods are explained in the following sections. Please select the method appropriate for the scenarios under consideration. Using mpathconf Utility: Perform the following steps to configure your mpathconf utility for automatic discovery. Enable mulitpathing if it is set for the first time on the RHEL server. Type the following command: o mpathconf --enable The above command will create a sample /etc/multipath.conf file. Enable automatic discovery of multipaths by typing the following command: o mpathconf -- find_multipaths y The above command enables this option in /etc/multipath.conf file. Default multipathing type is failover. Using multipath.conf File: To enable automatic discovery of multipath devices, edit the defaults section of /etc/multipath.conf file as shown below. defaults { find_multipaths yes user_friendly_names yes Note: This method enables multipathing for all devices that support multipathing. If this is not desired or if there are other devices mounted that do not require multipathing to be enabled, refer to the next section to configure multipathing only for the StorSimple volumes. KB-00009 Page 4 of 7
After configuring multipathing, please refer to the section Enabling Multipathing to enable multipathing and testing the connection. Configuring Multipathing only for StorSimple Volumes This section explains the changes required in /etc/multipath.conf file for enabling multipathing only for volumes mounted from StorSimple appliance. StorSimple device should be listed in the blacklist_exceptions section of the /etc/multipath.conf file for multipathing to be enabled only for StorSimple appliance volumes mounted on the RHEL server. Please edit the /etc/multipath.conf file to enter the information specified below. This list contains all models of StorSimple appliance. blacklist_exceptions { product "Model 5020*" product "Model 7020*" product "Model 5520*" product "Model 7520*" Note: Only the model of StorSimple appliance to which the RHEL server is connecting should be entered in the list. KB-00009 Page 5 of 7
Configuring Round-Robin Multipathing To configure Round-Robin Multipathing policy, edit the /etc/multipath.conf file with the path grouping policy set to multibus under the defaults section. defaults { user_friendly_names yes path_grouping_policy multibus Enabling Mulitpathing Multipathing should be enabled after the configuration is done. This operation is performed by restarting the multipathd daemon. Please ensure that multipathd daemon is set to automatically start at the boot time. Refer to the table below for a list of commands used with multipathd daemon. Operation Command to start Command to stop Command to restart Command to enable multipathd service to start at boot time Command Used service multipathd start service multipathd stop service multipathd restart chkconfig multipathd on OR mpathconf with_chkconfig y Verifying Multipathing Prior to verifying the multipathing configuration Ensure that iscsi connection is established with the StorSimple appliance A volume is exposed to the RHEL server from the StorSimple appliance. The multipathing configuration can now be verified using the following commands on the RHEL server. KB-00009 Page 6 of 7
List multipath topology: multipath -ls Sample output for failover multipathing configuration with three paths: mpatha (36486fd2066fb3aa4d7e9d9d9f31b046b) dm-2 SSIMPLE,Model 7020 size=100g features='0' hwhandler='0' wp=rw -+- policy='round-robin 0' prio=0 status=active `- 5:0:0:0 sdb 8:16 active undef running -+- policy='round-robin 0' prio=0 status=enabled `- 6:0:0:0 sdc 8:32 active undef running `-+- policy='round-robin 0' prio=0 status=enabled `- 7:0:0:0 sdd 8:48 active undef running Sample output of round-robin multipathing configuration with three paths: mpatha (36486fd2066fb3aa4d7e9d9d9f31b046b) dm-2 SSIMPLE,Model 7020 size=100g features='0' hwhandler='0' wp=rw `-+- policy='round-robin 0' prio=0 status=active - 8:0:0:0 sdb 8:16 active undef running - 9:0:0:0 sdd 8:48 active undef running `- 10:0:0:0 sdc 8:32 active undef running Appendix Some useful iscsi commands are tabulated below. Operation Discover available targets on the specified IP address Login to the target Logout from the target Print iscsi initiator name Check the state of iscsi session and volume discovered on host Command Used iscsiadm -m discovery -t sendtargets -p <TARGET_IP> iscsiadm -m node --login -T <TARGET_IQN> iscsiadm -m node --logout -p <Target_IP> cat /etc/iscsi/initiatorname.iscsi iscsiadm m session s <sessionid> -P 3 KB-00009 Page 7 of 7