VMware Cloud Community
tomtom1
Enthusiast
Enthusiast

how to implement Load Balancing in ESX for HBA's ?

HI, we have a mix environment of ESX 3.5 Update 2 and update 4.

Right now all the I/O's are going through one HBA, and the other HBA is sitting idle. What needs to be done so that both the HBA's can be used - and also just in case one HBA fails, the other HBA takes over all the LUNs.

Thanks

Tom

0 Kudos
10 Replies
mcowger
Immortal
Immortal

It all depends on your storage - what kind of storage do you have?






--Matt

VCP, vExpert, Unix Geek

--Matt VCDX #52 blog.cowger.us
0 Kudos
jbruelasdgo
Virtuoso
Virtuoso

though EMC oriented, there is a script here:

http://virtualgeek.typepad.com/virtual_geek/2009/02/are-you-stuck-with-a-single-really-busy-array-po...

and please read the information about it, it explains it all

hope it helps

Jose B Ruelas

http://aservir.wordpress.com

Jose B Ruelas http://aservir.wordpress.com
0 Kudos
tomtom1
Enthusiast
Enthusiast

we have both actice/active and active/passive storage.

Thanks

0 Kudos
mcowger
Immortal
Immortal

For the active/active storage (note, clarion isn't active active), use round robin - works great.

For the active passive, use something like the script above






--Matt

VCP, vExpert, Unix Geek

--Matt VCDX #52 blog.cowger.us
0 Kudos
Matt_B1
Enthusiast
Enthusiast

Is round robin still considered experimental in ESX 3.5? At the point when I was balancing the load, it was. I have an active/active array since we use EMC Symmetrix fiber channel storage. In summary, I created a list of the LUNs, imported them into Excel, used a mod function to manipulate every even numbered LUN and used the esxcfg-mpath command to set the preferred path. After that, I rescanned all my HBAs and the 2nd path became the active and used path for every even numbered LUN visible to that ESX server. This is not the best method but one somewhat easy way to load balance the HBAs. I have not read the script posted but I would also consult that.

0 Kudos
mcowger
Immortal
Immortal

I believe that as of U5 its no longer experimental. In 4 is fully supported.

We've run it on 3.5 and 4 against symmetrix for over a year with nary a single hiccup.






--Matt

VCP, vExpert, Unix Geek

--Matt VCDX #52 blog.cowger.us
0 Kudos
tomtom1
Enthusiast
Enthusiast

Can, you please explain your steps in detail. I would like to implement this and would like to follow your example.

thanks

0 Kudos
six4rm
Enthusiast
Enthusiast

We're running VC 2.5.0 - Build 174768 and ESX 3.5 - Update 5 (Build 213532) and Round Robin is showing as experimental.

I'm interested in implementing this too as our setup is currently using fixed paths and therefore only one HBA is being utilised.

0 Kudos
depping
Leadership
Leadership

In all versions of 3.5 it is experimental as far as I know...

Duncan

VMware Communities User Moderator | VCP | VCDX

-


Now available: Paper - vSphere 4.0 Quick Start Guide (via amazon.com) | PDF (via lulu.com)

Blogging: | Twitter:

0 Kudos
Matt_B1
Enthusiast
Enthusiast

Here are the steps...it takes a while to setup but it much easier to use later on for updates.

- Rescan all HBAs on all hosts in your cluster. I generally only do 1 host at a time to avoid storage conflicts.

- Run "esxcfg-vmhbadevs -q" on every host. I copy the output to an excel workbook. I then use Find and Replace to cut out all the text aside from the decimal LUN number. Once in the sheet, double check that all hosts are seeing the storage they should.

- Run "esxcfg-mpath -l" on every host. You want to document the the HBA number and target ID. For example, on one host, I saved "vmhba1:0:##" and "vmhba2:0:##". Depending on your HBA count, slot location and so forth, your HBA numbers and target IDs can vary.

- For each unique setup (different HBA number or different target ID), the commands will vary. In the above example, I use this Excel formula "=IF(MOD(A3,2)=0, "esxcfg-mpath --preferred --lun=vmhba1:0:"&A3&" --path=vmhba2:0:"&A3, "")". A3 refers to the decimal identified of the LUN. Column A in my Excel sheet has the full list of LUNs available for the server. As you can see in the formula, I am telling the ESX server to use the 2nd HBA path as the active path. I drag this formula down the whole sheet so each even numbered LUN has a unique esxcfg-mpath command.

- In that excel sheet, I hide the blanks and copy the list of esxcfg-mpath commands into a .sh file on a shared volume. From the service console, I create a file like change_paths.sh, paste in the list of esxcfg-mpath commands.

- In the end of that change_paths.sh file, be sure to add a esxcfg-rescan for each vmhba involved so the changes take place right away.

- Run this change_paths.sh on the service console of each ESX server. You may have anywhere from 1 to n (total number of ESX) scripts depending on the storage setup. I run the script on 1 ESX, let it completely finish and then run the next.

You can then check any even numbered LUN through the client and see the 2nd path being actively used. FYI, you can also change your policy in the same command to Fixed, MRU and so forth. In the examples above, I didn't change the policy since Fixed is already set. I have run this with VMs active and had no issues. Enjoy!

Please set this as "helpful" or "correct" if applicable.

0 Kudos