How to Configure iSCSI Multipathing on ESX4i

Note: This is pretty much from http://blog.ghai.us/bob/?cat=6 but with a few pictures and small edits/additions.
1.Open VMware vCenter or point the vSphere Client to the ESX host to be configured

2.Select Host > Configuration > Networking.

3.Click Add Networking.

4.Select “Virtual Machine” to create new vSwitch for iSCSI connectivity > Next.

5.Select “Create a virtual switch” and check the box next to the VMNICs for iSCSI connectivity > Next.

6.Type a name for the new virtual switch. (e.g. iSCSI) > Next.



7.Click Finish.

(Skip 9 to 13 if you don't want to add a Service Console port to your iSCSI vSwitch)
8.Scroll down and click Properties on the newly created vSwitch.

9.Click Add button to add Service Console port.

10.Select “Service Console” > Next.

11.Type a name for the new service console port. (e.g. iSCSI Service Console) > Next.



12.Select “Use the following IP settings” and type an IP Address on the iSCSI network > Next.

13.Click Finish.

14.Click Add button to add first iSCSI VMkernel port.

15.Select “VMkernel” > Next.

16.Type a name for the first new VMkernel port (e.g. iSCSI VMkernel 1) > Next.

17.Select “Use the following IP settings” and type an IP Address on the iSCSI network > Next.



18.Click Finish.

19.Repeat Steps 14 to 18 to create additional VMkernel ports for each physical network adapter (VMNIC) to be used for iSCSI



20.Select the first VMkernel port created and click Edit.

21.Click the NIC Teaming tab and select “Override vSwitch failover order”.

22.Designate only one active adapter and move the remaining adapters to the Unused Adapters category.



23.Click OK

24.Repeat Steps 20 to 23 to map each VMkernel port to only one active adapter. Only one active adapter can exist per VMkernel port for multipathing to function properly.



25.Make sure the iSCSI Initiator is enabled in

Host > Configuration > Storage Adapters > iSCSI Software Adapter





(otherwise you’ll get an “Invalid adapter provided” error when try to bind the ports to the iSCSI hba)

26.Identify the port names for each VMkernel port created. (e.g. vmk0, vmk1)



27.Using the vSphere CLI (NOT vSphere PowerCLI), connect each VMkernel port created to the software iSCSI initiator using the esxcli command:

esxcli --server=x.x.x.x swiscsi nic add -n -d (where x.x.x.x is the IP address of the ESXi host you are configuring)

example: esxcli --server=10.0.0.6 swiscsi nic add -n vmk0 -d vmhba33

28.Repeat the esxcli command until all VMkernel ports have been connected to the software iscsi initiator.




29.Verify the VMkernel ports connections by running the esxcli command.

esxcli --server=x.x.x.x swiscsi nic list -d vmhba33

example: esxcli --server=x.x.x.x swiscsi nic list -d vmhba33



30.In Host > Configuration > iSCSI Software Adapter > Details > Devices > Manage Paths, choose Path Selection = Round Robin (VMware) and click change



(Need to do for every LUN that is connected, also when adding in new LUNs.)

Multipathing configuration is now complete!

Note 1: vmhba33 is not always the iSCSI software initiator; the vmhba number can be found from the storage adapters tab in the vSphere client.

Comments

  1. A quick tip.
    To set up Roud Robin as default for all new connected Lun's you can run:

    esxcli --server=x.x.x.x nmp satp setdefaultpsp --psp VMW_PSP_RR --satp VMW_SATP_EQL

    ReplyDelete
  2. Hi Stormbringer, thank you very much for the comment. I ran the command and discovered something - I'm guessing the line above is used with a Dell Equalogic Array - the command was slightly different with the LeftHand / SAN/iQ / HP Storageworks SAN, which comes up as storage array type - VMW_SATP_DEFAULT_AA - making the command:

    esxcli --server=x.x.x.x nmp satp setdefaultpsp --psp VMW_PSP_RR --satp VMW_SATP_DEFAULT_AA

    ReplyDelete
  3. thanks for your article, I could finish my configuration.
    A important point missing, to my opinion, is about the MTU size. We have set all iSCSI frames to 9000 to avoid fragmentation.
    Thus, to create the vSwitch:

    esxcfg-vswitch -m 9000 vSwitchName

    then configuring the Nic to use the same MTU:


    esxcfg-vmknic -a -i IP_address -n subnet -m 9000 vmKernelName (if I am not wrong)

    Dunno if it's part of another article on your blog, though, I did not check.
    Thanks anyway!

    ReplyDelete
    Replies
    1. Hello Anonymous,
      Thank you very much for the comment.
      Cheers!

      Delete
    2. you're welcome ;)
      of course the MTU is the same on the SAN, the iSCSI switches and the hypervisors

      Delete

Post a Comment