Automation

 View Only
  • 1.  Alternate multi-pathing

    Posted Oct 07, 2008 03:06 PM

    I can't seem to be able to do this with the cmdlets, and my .NET namespace skill stink, so . . .

    Trying to figure out a script that can take a mult-path SAN connection, and have it alternate which HBA is active for consecutive LUNs.

    For example (am excluding vmhba0 on purpose):

    vmhba1:0:1

    vmhba2:0:2

    vmhba1:0:3

    vmhba2:0:4

    Thanks so much - please reply if my request isn't clear.



  • 2.  RE: Alternate multi-pathing

    Posted Oct 07, 2008 05:10 PM

    Carter wrote a nice article about this on his blog.

    See Managing storage paths with PowerShell.



  • 3.  RE: Alternate multi-pathing

    Posted Oct 07, 2008 05:37 PM

    Thanks LucD - it does provide more information than what I had, but since my scripting & API skills are pretty lame, I need further help trying to not necessarily changing the policy (fixed vs RR, for example) but instead changing the "Preferred" flag in the "Change Path State" properties.

    Thanks!



  • 4.  RE: Alternate multi-pathing
    Best Answer

    Posted Oct 07, 2008 07:06 PM

    If you look at the HostMultipathInfoFixedLogicalUnitPolicy object, which is an extension of the HostMultipathInfoLogicalUnitPolicy object, you will notice that it contains a property prefer where you can enter the preferred path.

    To use the preferred path you have in any case to set the policy to fixed.

    So the 2nd code sample in Carter's article is what you need.

    Looping through all the LUNs and keeping track of the paths and which one to use should be straightforward.

    If not let us know exactly what you want to do (number of LUNs, number of paths, does each LUN have the same paths...)



  • 5.  RE: Alternate multi-pathing

    Posted Oct 07, 2008 10:11 PM

    LucD - thanks. I had to "visually parse" the article some more before I could understand it. That got it.

    AEJ



  • 6.  RE: Alternate multi-pathing

    Posted Dec 05, 2008 12:58 AM

    ae_jenkins:

    Were you able to get this kind of script working? I'm looking at doing the same kind of thing, basically replicating what this PERL script does but on a cluster-wide basis:

    http://www.yellow-bricks.com/2008/04/01/load-balancing-activeactive-sans/

    If you did get it to work, would you mind posting it?