This is just a quick post about configuring software iSCSI Round Robin MPIO (2:1 mapping) on an ESX 4.x server. Here is a quick overview of the procedure:
- Create VMkernel ports on a vSwitch
- Configure the VMkernel ports
- Assign physical NIC’s to the vSwitch
- Configure the uplinks on the vSwitch
- Enable software iSCSI initiator
- Find and add VMkernel ports to the iSCSI initiator
- Add an iSCSI target to the iSCSI initiator
- Rescan the HBA adapter
- Set Round Robin as the default path selection policy for all datastores
Ok, let’s get started! 🙂
- Login to your ESX host with the root account.
- Enable Jumbo Frames on the vSwitch. In this case, I’ll be using vSwitch2. This step is optional, if your network does not support Jumbo Frames, skip to step 3. Type: #esxcfg-vswitch –m 9000 vSwitch2
- Create four VMkernel ports on vSwitch2:
a. #esxcfg-vswitch –A VMkernel1 vSwitch2
b. #esxcfg-vswitch –A VMkernel2 vSwitch2
c. #esxcfg-vswitch –A VMkernel3 vSwitch2
d. #esxcfg-vswitch –A VMkernel4 vSwitch2 - Configure the VMkernel ports. The –m option is optional if you using Jumbo Frames:
a. #esxcfg-vmknic –a –i -n -m 9000 VMkernel1
b. #esxcfg-vmknic –a –i -n -m 9000 VMkernel2
c. #esxcfg-vmknic –a –i -n -m 9000 VMkernel3
d. #esxcfg-vmknic –a –i -n -m 9000 VMkernel4 - Assign the physical adapters (vmnic2 & vmnic3) to the virtual switch:
a. #esxcfg-vswitch –L vmnic2 vSwitch2
b. #esxcfg-vswitch –L vmnic3 vSwitch2 - Configure the uplinks so that only a single physical adapter is listed per VMkernel. Assign VMkernel 1 & 2 to vmnic2 and VMkernel 3 & 4 to vmnic3. You will actually remove the unnecessary vmnic from the uplinks list:
a. #esxcfg-vswitch –p VMkernel1 –N vmnic3 vSwitch2
b. #esxcfg-vswitch –p VMkernel2 –N vmnic3 vSwitch2
c. #esxcfg-vswitch –p VMkernel3 –N vmnic2 vSwitch2
d. #esxcfg-vswitch –p VMkernel4 –N vmnic2 vSwitch2
e. Verify the configuration with: #esxcfg-vswitch –l
f. You should end up with something like this: - Enable software iSCSI initiator: #esxcfg-swiscsi –e
- Add VMkernel ports to the software iSCSI initiator:
a. First, find the vmhba adapter, it will probably be labeled as Software iSCSI, Type: #esxcfg-scsidevs –a
b. Next, find the vmk interfaces associated with the VMkernel ports created in step 3: #esxcfg-vmknic –l
c. Now, add the vmk’s to the vmhba, type: #esxcli swiscsi nic add –n <vmk_#> -d <vmhba_#> .Repeat this step for each vmk#.
d. Verify the bindings with: #esxcli swiscsi nic list –d <vmhba_#>
- Add an iSCSI target to the software iSCSI initiator: #vmkiscsi-tool –D –a <IP_address> <vmhba_#>. Repeat this step if you have more the one iSCSI target.
- Rescan the vmhba adapter with: #esxcfg-rescan <vmhba_#>
- Set the Round Robin path selection policy as default for all datastores:
a. #esxcli nmp satp setdefaultpsp –satp VMW_SATP_DEFAULT_AA –psp VMW_PSP_RR *
b. #esxcli corestorage claimrule load
c. #esxcli corestorage claimrule run - Logoff from the ESX host.
* Please note the double dashes with the satp and psp parameter.
When you’re done, start the vSphere Client, login to your ESX host and verify the active I/O paths to the datastore(s). If the configuration changes are not reflected in the GUI, refresh the view where applicable.
Cheers!
– Marek.Z