vmware multipathing configuration software iscsi port binding
TRANSCRIPT
-
7/27/2019 Vmware Multipathing Configuration Software iSCSI Port Binding
1/15
Multipathing Confgurationor Sotware iSCSI Using
Port BindingT e c h n i c a l W h i T e P a P e R
-
7/27/2019 Vmware Multipathing Configuration Software iSCSI Port Binding
2/15
Multipathing Coniguration or Sotware iSCSIUsing Port Binding
T e c h n i c a l W h i T e P a P e R / 2
Tb of cotts
Multipathing or Sotware iSCSI 3Confguring vmknic-Based iSCSI Multipathing 3
a) Confguring the Network 3
1. Using GUI 3
2. Using CLI 6
b) Enabling the iSCSI Sotware Adapter 7
1. Using GUI 7
2. Using CLI 9
c) Activating vmknic-Based Multipathing or Sotware iSCSI 9
1. Confguring Port Binding on vSphere 5.0 Using GUI 9
2. Confguring Port Binding on vSphere 5.0 Using CLI 12
3. Confguring Port Binding on vSphere 4.x Using CLI 12
iSCSI Re-login 12
Veriying Multipath Confguration 13
1. Veriying the iSCSI LUN Confguration 13
2. Veriying vmknic-Based Multipath Failover 13
3. Veriying Load Balancing Using the Round-Robin Policy 14
Conclusion 15
About the Author 15
-
7/27/2019 Vmware Multipathing Configuration Software iSCSI Port Binding
3/15
T e c h n i c a l W h i T e P a P e R / 3
Multipathing Coniguration or Sotware iSCSIUsing Port Binding
Multipathing or Sotware iSCSIMultipathingbetweenaserverandstoragearrayprovidestheabilitytoload-balancebetweenpathswhenall
pathsarepresentandtohandleailuresoapathatanypointbetweentheserverandthestorageMultipathingisadeactostandardormostFibreChannelSANenvironmentsInmostsotwareiSCSIenvironments
multipathingispossibleattheVMkernelnetworkadapterlevelbutnotthedeaultconguration
InaVMwarevSphereenvironmentthedeaultiSCSIcongurationorVMwareESXiserverscreatesonlyone
pathromthesotwareiSCSIadapter(vmhba)toeachiSCSItargetToenableailoveratthepathlevelandto
load-balanceI/Otracbetweenpathstheadministratormustcongureportbindingtocreatemultiplepaths
betweenthesotwareiSCSIadaptersonESXiserversandthestoragearray
WithoutportbindingalliSCSILUNswillbedetectedusingasinglepathpertargetBydeaultESXwilluse
onlyonevmknicasegressporttoconnecttoeachtargetandyouwillbeunabletousepathailoverortoload-
balanceI/ObetweendiferentpathstotheiSCSILUNsThisistrueeveniyouhavecongurednetworkadapter
teamingusingmorethanoneuplinkortheVMkernelportgroupusedoriSCSIIncaseosimplenetwork
adapterteamingtracwillberedirectedatthenetworklayertothesecondnetworkadapterduring
connectivityailurethroughtherstnetworkcardbutailoveratthepathlevelwillnotbepossiblenorwill
loadbalancingbetweenmultiplepaths
Someotheuserguidesanddocumentationreertovmknic-basedsotwareiSCSImultipathingasport
bindingorsimplyassotwareiSCSImultipathingThispaperprovidesanoverviewohowtoenablevmknic-
basedsotwareiSCSImultipathingaswellastheprocedurebywhichtoveriyportbindingconguration
Confguring vmknic-Based iSCSI MultipathingToenablevmknic-basedsotwareiSCSImultipathingyoumust
CreatetwoVMkernelportgroupsandconnectoneuplinktoeachofthem.
BindeachVMkernelnetworkadaptertothesoftwareiSCSIadapter.ThenrunarediscoveryofiSCSItargetsto
detectmultiplepathstothem
Reertotheollowingsectionstolearnthenetworkcongurationandportbindingprocedurerequiredtoenable
vmknic-basedmultipathingorsotwareiSCSI
a) Confguring the NetworkEnablingmultipathingremovestheabilitytoroutetostorageThestorageandtheVMkernelportmusthavean
IPaddressinthesamenetwork
InthevSpherereleaseyoucanuseGUIwizardorCLIcommandstocongureyournetwork;invSpherex
youcanuseonlyCLIcommands
1UsingGUI
Toenablevmknic-basedmultipathingorsotwareiSCSIitisrecommendedthatyouhavetwoormorephysical
networkadaptersoriSCSIonyourhostmachine
1) Connect to the ESXi server using the VMware vSphere Client
2) Click the Confguration tab > Networking.
-
7/27/2019 Vmware Multipathing Configuration Software iSCSI Port Binding
4/15
T e c h n i c a l W h i T e P a P e R / 4
Multipathing Coniguration or Sotware iSCSIUsing Port Binding
3) Click Add Networking.
4) Select VMkernel and click Next.
5) Select Create a vSphere standard switch to create a new vSwitch.
6) Select all the adapters you want to congure or iSCSI trac and click Next.
7) Provide a Network Label or the VMkernel port group and click Next.
8) Speciy the IP address settings and click Next.
9) Review the details on the Summary screen and click Finish.
NexttocreateanadditionalVMkernelportgrouptocongureportbindingcompletetheollowingsteps
1) Click the Properties tab o the vSwitch you created or iSCSI.
2) Create additional VMkernel ports or all network adapters that you connected by selecting the Add tab
under the Ports tab in the vSwitch Properties dialog box.
3) Select VMkernel and click Next.
4) Provide a Network Label or the VMkernel port group and click Next.
5) Speciy the IP address settings and click Next.
6) Review the details on the Summary screen and click Finish.
YoucanalsocreateVMkernelportgroupsondiferentvSwitchesHoweveriyourVMkernelnetworkadapters
areonthesamesubnettheymustbeconguredonthesamevSwitch
-
7/27/2019 Vmware Multipathing Configuration Software iSCSI Port Binding
5/15
T e c h n i c a l W h i T e P a P e R / 5
Multipathing Coniguration or Sotware iSCSIUsing Port Binding
AllnetworkadaptersthatyouaddedtothevSwitchwillappearasactiveoreachVMkernelportonthevSwitch
EnsurethatyouoverridethiscongurationsothateachVMkernelportmapstoonlyoneactiveadapter
1) In the Ports tab o the vSwitch Properties dialog box, select a VMkernel port and click Edit.
2) Click the NIC Teaming tab and check Override switch ailover order.
3) Keep only one adapter under Active Adapters and use Move Down to move other adapters under
Unused Adapters.
-
7/27/2019 Vmware Multipathing Configuration Software iSCSI Port Binding
6/15
T e c h n i c a l W h i T e P a P e R / 6
Multipathing Coniguration or Sotware iSCSIUsing Port Binding
4) Repeat steps 13 or each VMkernel port on the vSwitch, ensuring that each port has its own unique
active adapter.
2UsingCLI
RuntheollowingcommandstocreatethevSwitchandVMkernelportgroupsaswellastomapeachVMkernel
porttooneactiveadapter
1) Create the vSwitch: esxcfg-vswitch -a iscsivSwitch.
2) Add the rst uplink to the vSwitch: esxcfg-vswitch -L vmnic4 iscsivSwitch.
3) Add the rst port group on the vSwitch: esxcfg-vswitch -A iSCSI-PG1 iscsivSwitch.
4) Add the second uplink to the vSwitch: esxcfg-vswitch -L vmnic5 iscsivSwitch.
5) Add the second port group on the vSwitch: esxcfg-vswitch -A iSCSI-PG2 iscsivSwitch.
-
7/27/2019 Vmware Multipathing Configuration Software iSCSI Port Binding
7/15
T e c h n i c a l W h i T e P a P e R / 7
Multipathing Coniguration or Sotware iSCSIUsing Port Binding
6) Map each VMkernel port to use only one active adapter and to move the second network adapter to the
unused adapter list: esxcfg-vswitch -N vmnic4 -p iSCSI-PG1 iscsivSwitch.
7) Map each VMkernel port to use only one active adapter and to move the second network adapter to the
unused adapter list: esxcfg-vswitch -N vmnic5 -p iSCSI-PG2 iscsivSwitch.
8) Assign an IP address to the rst port group: esxcfg-vmknic -a -i 192.168.100.1 -n
255.255.255.0 iSCSI-PG1.
9) Assign an IP address to the second port group: esxcfg-vmknic -a -i 192.168.100.2 -n
255.255.255.0 iSCSI-PG2.
b) Enabling the iSCSI Sotware Adapter
1UsingGUI
ToaccessiSCSItargetsyoumustenablethesotwareiSCSIinitiatorontheVMwareESXiserver
Procedure
1) Connect to the ESXi server using vSphere Client.
2) Click Confguration > Storage Adapters.
3) Enable the iSCSI sotware adapter.
a. For ESXi server releases prior to vSphere 5.0, iSCSI Sotware Adapter is listed under the
Storage Adapters tab.
i. Select iSCSISotware Adapter and click Properties.
ii. Under the General tab, click Confgure.
iii. Check Enabled to enable the initiator.
iv. To change the deault iSCSI initiator name, enter iSCSI initiator name in the iSCSI Name box.
b. For vSphere 5.0, you must add iSCSI Sotware Adapter to the StorageAdapterscategory
i. Click Confguration > Storage Adapters.
ii. Click Add and check Add Sotware iSCSI Adapter.
iii. To change the deault iSCSI initiator name, enter iSCSI initiator name in the iSCSI Name box under
the Confgure tab in the iSCSI Sotware Adapter Properties window.
-
7/27/2019 Vmware Multipathing Configuration Software iSCSI Port Binding
8/15
T e c h n i c a l W h i T e P a P e R / 8
Multipathing Coniguration or Sotware iSCSIUsing Port Binding
4) Enter the iSCSI target address in Static/Dynamic Discovery.
Dynamic Discovery Speciy the addresses orSend Targets discovery. The iSCSI initiator sends a Send Targets
request to each o the specifed addresses, and the discovered targets are added to the static discovery list.
Static Discovery A list o IP addresses and iSCSI names o targets to connect to. This list can be flled in based
on dynamic Send Targets requests or entered individually. This is a list o targets with which ESX attempts to
establish sessions.
5) Click Close to nish iSCSI initiator conguration.
-
7/27/2019 Vmware Multipathing Configuration Software iSCSI Port Binding
9/15
T e c h n i c a l W h i T e P a P e R / 9
Multipathing Coniguration or Sotware iSCSIUsing Port Binding
2UsingCLI
Runtheollowingcommands
1) Enable the sotware iSCSI: esxcfg-swiscsi e
2) To change the deault iSCSI initiator name, set the initiator iqn:
- esxcli iscsi adapter set --name iqn.1998-01.com.vmware:esx-host01-64ceae7s -A vmhbaXX
3) Add the iSCSI target discovery address:
- esxcli iscsi adapter discovery sendtarget add -a 192.168.100.13:3260 -A vmhbaXX
NOTE: vmhbaXX is the sotware iSCSI adapter vmhba ID. To fnd the vmhba ID, you can use the command
esxcg-scsidevs-a and check or the vmhba ID o iSCSI sotware adapter.
c) Activating vmknic-Based Multipathing or
Sotware iSCSIVMwarevSpherehasaddedanewUIinteracetosupportmultipathingcongurationorthesotwareiSCSI
adapterusingportbinding(EarlierESX/ESXireleaseshadonlythecommand-lineinterace(CLI)optionto
congureportbinding)
1ConfguringPortBindingonvSphere50UsingGUI
a) Connect to the ESXi server using vSphere Client.
b) Click the Confguration tab and select Storage Adapters.
c) Select iSCSI Sotware Adapter and click Properties.
d) Click the Network Confguration tab and click Add to bind the VMkernel network adapter to the sotware
iSCSI adapter.e) The bind with the VMkernel adapter window is displayed, listing all the VMkernel adapters compatible with
iSCSI port binding requirements. Select the VMkernel network adapter you want to bind to the sotware
iSCSI adapter and click OK.
-
7/27/2019 Vmware Multipathing Configuration Software iSCSI Port Binding
10/15
T e c h n i c a l W h i T e P a P e R / 1 0
Multipathing Coniguration or Sotware iSCSIUsing Port Binding
) Repeat steps d) and e) until you bind all the required VMkernel adapters to the iSCSI adapter.
-
7/27/2019 Vmware Multipathing Configuration Software iSCSI Port Binding
11/15
T e c h n i c a l W h i T e P a P e R / 1 1
Multipathing Coniguration or Sotware iSCSIUsing Port Binding
NOTE: The port group policy status might report as noncompliant or the VMkernel network adapter or the
ollowing reasons:
TheVMkernelnetworkadapterisnotconnectedtoanactivephysicalnetworkadapteroritisconnectedto
morethanonephysicalnetworkadapter.
TheVMkernelnetworkadapterisconnectedtostandbyphysicalnetworkadapters.
Theactivephysicalnetworkadaptergotchanged.
g) Close the iSCSI Initiator Properties window.
h) Select the sotware iSCSI adapter and run Rescan to veriy that multiple paths are available or iSCSI LUNs.
-
7/27/2019 Vmware Multipathing Configuration Software iSCSI Port Binding
12/15
T e c h n i c a l W h i T e P a P e R / 1 2
Multipathing Coniguration or Sotware iSCSIUsing Port Binding
2ConfguringPortBindingonvSphere50UsingCLI
RuntheollowingcommandsromthevSpherehostCLItobindtheVMkernelnetworkadaptertothe
iSCSIadapter
- esxcli iscsi networkportal add --nic vmk0 --adapter vmhbaXX
- esxcli iscsi networkportal add --nic vmk1 --adapter vmhbaXX
Where vmk0 andvmk1aretheVMkernelnetworkadapterscompatiblewithiSCSIportbindingrequirements.
YoucangetthelistofVMkernelnetworkadaptersconnectedtoallvSwitchesbyusingthecommand
esxcfg-vmknic -l. vmhbaXX is the sotware iSCSI adapter vmhba ID.
You can veriy the binding details by using the ollowing command:
esxcli iscsi networkportal list --adapter vmhbaXX.
Then rescan the sotware iSCSI adapter to veriy that multiple paths are available or iSCSI LUNs.
3ConfguringPortBindingonvSphere4xUsingCLI
Toenablevmknic-basedmultipathingorsotwareiSCSIruntheollowingCLIcommands- esxcli swiscsi nic add --nic vmk0 --adapter vmhbaXX
- esxcli swiscsi nic add --nic vmk1 --adapter vmhbaXX
Where vmk0 andvmk1aretheVMkernelnetworkadapterscompatiblewithiSCSIportbindingrequirements.
YoucangetthelistofVMkernelnetworkadaptersconnectedtoallvSwitchesbyusingthecommand
esxcfg-vmknic -l. vmhbaXX is the sotware iSCSI adapter vmhba ID.
Ater confguring port binding, you can veriy the binding details by using the ollowing command:
esxcli swiscsi nic list --adapter vmhbaXX.
Then rescan the sotware iSCSI adapter to veriy that multiple paths are available or iSCSI LUNs.
iSCSI Re-loginIyouhaveanalreadyestablishediSCSIsessionbeoreportbindingcongurationyoucanremovetheexisting
iSCSIsessionsandloginagainortheportbindingcongurationtotakeefect
TolisttheexistingiSCSIsessionsruntheollowingcommand
- esxcli iscsi session list --adapter vmhbaXX
ToremoveexistingiSCSIsessionsruntheollowingcommand
- esxcli iscsi session remove --adapter vmhbaXX
ToenablesessionsasperthecurrentiSCSIcongurationruntheollowingcommand
- esxcli iscsi session add --adapter vmhbaXX
-
7/27/2019 Vmware Multipathing Configuration Software iSCSI Port Binding
13/15
T e c h n i c a l W h i T e P a P e R / 1 3
Multipathing Coniguration or Sotware iSCSIUsing Port Binding
Veriying Multipath Confguration
1VeriyingtheiSCSILUNConfgurationAteryoucompletetheportbindingcongurationandperormtheiSCSIadapterrescanveriythatiSCSILUNs
aredetectedanddisplayedwiththeavailablepathsForexampleiyouhaveboundtwoVMkernelnetwork
adapterstotheiSCSIadapteryouwillseetwopathstoeachLUNconnectedtotheiSCSItargetsToconrm
runtheesxcfg-mpathcommandromCLIorclickthePathstaborLUNsontheGUI
Sampleoutput
Beoreportbindingthereisonepathavailabletoeachtarget(TT)
AterportbindingtwoVMkernelnetworkadapterstotheiSCSIadaptertherearetwopathsavailable
toeachtarget(TT)
2Veriyingvmknic-BasedMultipathFailover
ToidentiytheVMkernelnetworkadaptercurrentlyusedbytheiSCSIadaptertotransmitI/Oruntheesxtop
commandIntheollowingexampleI/Oistransmittedthroughvmk(vmnic)
Toveriyvmknic-basedmultipathailoverdisableanyoneothenetworkadaptersconnectedtotheVMkernel
portgroupusedoriSCSIVeriythatthepathstatusisupdatedcorrectlyandthatthepathsconnectedtothe
ailednetworkadaptercardaremarkedasdead
-
7/27/2019 Vmware Multipathing Configuration Software iSCSI Port Binding
14/15
T e c h n i c a l W h i T e P a P e R / 1 4
Multipathing Coniguration or Sotware iSCSIUsing Port Binding
IntheesxtopoutputtheailednetworkadapterismarkedasallbackandtheI/Oistranserredusingtheother
VMkernelportgroup
3VeriyingLoadBalancingUsingtheRound-RobinPolicy
AterconguringmultipathailoverorthesotwareiSCSIyoucanbalanceI/Otracbetweenthepathsusing
theround-robinpathpolicy
NOTE: Veriy that the iSCSI array supports the round-robin path policy by contacting the array vendor.
Changethepathselectionpolicy(PSP)oriSCSILUNseitherromthecommandlinebyselectingthe
ManagePathsoptionorbyrunningtheollowingcommand
- esxcli storage nmp satp set -s SATP_NAME -P VMW_PSP_RR
TondtheSATPnameusedtoclaimtheiSCSILUNsruntheollowingcommand
- esxcli storage nmp device list -d naa.600601602af129007d698975a6f2e011
RuntheesxtopcommandtoveriythatI/OisdistributedacrosstheavailablepathsortheiSCSILUN
ToincreaseaggregatedIOperormanceonecanchangeRoundRobinIOOperationLimittoalowervaluerom
deault
-
7/27/2019 Vmware Multipathing Configuration Software iSCSI Port Binding
15/15
Multipathing Coniguration or Sotware iSCSIUsing Port Binding
ConclusionConguringvmknic-basedmultipathingorthesotwareiSCSIadapterwillhelpvSphereusersenableailoverat
thepathlevelaswellasbalanceI/Otracbetweenthepaths
About the AuthorSudhishPTisaStafEngineerotheVMwareR&DgroupresponsibleorvalidationostorageonVMware
vSpherereleasesHisareaoexpertiseisvirtualizationwithaocusonvSpherestoragetechnologiesHehas
yearsoindustryexperienceandhasbeenworkingwithVMwareIndiaBangaloresinceDecember
VMwr, i.40HillviewAvenuePaloAltoCA404USATel8-486-Fax60-4-00wwwvmwarecomCopyrightVMware,IncAllrightsreservedThisproductisprotectedbyUSandinternationalcopyrightandintellectualpropertylawsVMwareproductsarecoveredbyoneormorepatentslisted
at http://wwwvmwarecom/go/patents VMware is a registered trademark or trademark o VMware, Inc in the United States and/or other jurisdictions All other marks and names mentioned herein may be