{"id":1293,"date":"2010-09-20T13:24:36","date_gmt":"2010-09-20T13:24:36","guid":{"rendered":"http:\/\/blog.open-e.com\/?p=1293"},"modified":"2025-07-03T07:48:40","modified_gmt":"2025-07-03T07:48:40","slug":"multipath-which-path-should-we-choose","status":"publish","type":"post","link":"https:\/\/www.open-e.com\/blog\/multipath-which-path-should-we-choose\/","title":{"rendered":"Multipath &#8211; which path should we choose?"},"content":{"rendered":"<p>\t\t\t\tFortunately in Linux\u00a0 in contrast to our lives we don&#8217;t need to choose one path, we are able to choose all paths!<\/p>\n<p>In this article, you can find simple description about configuring multipath under Linux for iSCSI (internet Small Computer System Interface) and FC (Fibre Channel) environments.<\/p>\n<p>At the very beginning we must configure iSCSI or FC target.<br \/>\nWe can use <a href=\"https:\/\/www.open-e.com\/account\/register\/free-trial\/\">trial version of Open-E DSS V6 software<\/a>.<\/p>\n<p>If we decide to use <a title=\"iscsi target\" href=\"https:\/\/www.open-e.com\/solutions\/how-connect-to-dss-v6-iscsi-target-volume-from-microsoft-windows\/\">iSCSI target<\/a> then it is necessary to connect at least two NICs (Network Interface Cards) on target and initiator sides.<br \/>\nFor configuring FC we need to have at least one Qlogic FC HBA (Host Bus Adapter) 2\/4\/8 Gb with dual-port on target side and also on initiator side.<\/p>\n<p>Next step will be exports of one LU (Logical Unit) via iSCSI or FC target.<\/p>\n<p>After that we must configure our initiator. In case of using iSCSI target we need to connect to it\u00a0 twice, using iSCSI initiator via both NICs. Using FC target the drives should be visible automatically after loading specific driver.<\/p>\n<p>Now we could check if LU is visible locally on initiators side twice by typing command <strong>lsscsi<\/strong>.<br \/>\nExample output for <strong>lsscsi <\/strong>command:<br \/>\n<code><br \/>\n[8:0:0:0]\u00a0\u00a0\u00a0 disk\u00a0\u00a0\u00a0 SCST_BIO sB6glXbw6LxyZnCv\u00a0 101\u00a0 \/dev\/sdb<br \/>\n[9:0:0:0]\u00a0\u00a0\u00a0 disk\u00a0\u00a0\u00a0 SCST_BIO sB6glXbw6LxyZnCv\u00a0 101\u00a0 \/dev\/sdc<br \/>\n<\/code><br \/>\nNow we will generate configuration file for multipath software. To do that properly we need to get WWID (World Wide Identifier) for disks \/dev\/sdb and \/dev\/sdc by using command <strong>scsi_id<\/strong>.<br \/>\nExample output for command\u00a0 <strong>\/lib\/udev\/scsi_id &#8211;page=0x80 &#8211;whitelisted &#8211;device=\/dev\/sdb<\/strong><br \/>\n<code><br \/>\nSSCST_BIOsB6glXbw6LxyZnC2279e18<br \/>\n<\/code><br \/>\nThe same output will be for disk \/dev\/sdc<\/p>\n<p>Getting this information we are able to generate proper configuration file.<br \/>\n<code><br \/>\n--- \/etc\/multipath.conf ---<br \/>\ndefaults {<br \/>\nudev_dir\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\/dev<br \/>\npath_grouping_policy\u00a0\u00a0 \u00a0multibus<br \/>\ngetuid_callout\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\"\/lib\/udev\/scsi_id --page=0x80 --whitelisted --device=\/dev\/%n\"<br \/>\n}<br \/>\nmultipaths {<br \/>\nmultipath {<br \/>\nwwid\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0SSCST_BIOsB6glXbw6LxyZnC2279e18<br \/>\nalias\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0multipath<br \/>\n}<br \/>\n}<br \/>\n--- \/etc\/multipath.conf ---<br \/>\n<\/code><br \/>\nAfter multipath start by using script <strong>\/etc\/init.d\/multipath-tools start<\/strong> (depending on your Linux distribution), we could type command <strong>multipath -l<\/strong><br \/>\nExample output is:<br \/>\n<code><br \/>\nmultipath (SSCST_BIOsB6glXbw6LxyZnC2279e18) dm-0 SCST_BIO,sB6glXbw6LxyZn<br \/>\n[size=3.0G][features=0][hwhandler=0]<br \/>\n\\_ round-robin 0 [prio=0][active]<br \/>\n\\_ 8:0:0:0 sdb 8:16\u00a0 [active][undef]<br \/>\n\\_ 9:0:0:0 sdc 8:32\u00a0 [active][undef]<br \/>\n<\/code><br \/>\nOur new device is available here: \/dev\/mapper\/multipath, we could format it by our favorite file system and mount.<\/p>\n<p>Now we have an access to one LU via two paths! Good luck with testing it! I&#8217;m looking forward for some feedback.\t\t<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Fortunately in Linux\u00a0 in contrast to our lives we don&#8217;t need to choose one path, we are able to choose all paths! In this article, you can find simple description&nbsp;&#8230;<\/p>\n","protected":false},"author":3,"featured_media":55796,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[777,765],"tags":[258,293,349,374,411,481],"class_list":["post-1293","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-iscsi","category-open-e-legacy-products","tag-fc","tag-hard-disk","tag-iscsi","tag-linux","tag-mpio","tag-open-e-products"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.open-e.com\/blog\/wp-json\/wp\/v2\/posts\/1293","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.open-e.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.open-e.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.open-e.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.open-e.com\/blog\/wp-json\/wp\/v2\/comments?post=1293"}],"version-history":[{"count":1,"href":"https:\/\/www.open-e.com\/blog\/wp-json\/wp\/v2\/posts\/1293\/revisions"}],"predecessor-version":[{"id":55154,"href":"https:\/\/www.open-e.com\/blog\/wp-json\/wp\/v2\/posts\/1293\/revisions\/55154"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.open-e.com\/blog\/wp-json\/wp\/v2\/media\/55796"}],"wp:attachment":[{"href":"https:\/\/www.open-e.com\/blog\/wp-json\/wp\/v2\/media?parent=1293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.open-e.com\/blog\/wp-json\/wp\/v2\/categories?post=1293"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.open-e.com\/blog\/wp-json\/wp\/v2\/tags?post=1293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}