This is a static archive of JasonPearce.com, as it looked from September 2012 to May 2014.

Posted on May 21, 2014

Pure Storage and Round Robin

Yesterday, Pure Storage support and I performed a non-disruptive upgrade of the operating system (called Purity) that runs the controllers for our solid state SAN (storage area network). Prior to the upgrade, Pure Storage support wanted to confirm that all of our LUNs were configured to use Round Robin.

Specifically, their “VMware ESXi 5.1 Best Practice Guide for Pure Storage Arrays” article says the ESXi parameter called “Path Selection Policy” should be configured to use “Round Robin” instead of “Most Recently Used (MRU).” Both RR and MRU support failover. The difference is RR balances the load while MRU uses just one path at a time.

My favorite command line interface to our VMware vSphere environment is PowerCLI, which is a PowerShell interface. My previous “Using PowerCLI to change all LUNs to Round Robin” article offers a great introduction to the topic.

Getting to the point, I ran this command in PowerCLI to quickly check that all of my LUNs were were properly balanced and configured to use Round Robin.

Get-VMHost | Get-VMHostHba -Type "FibreChannel" | Get-ScsiLun -LunType "disk" | Where {$_.MultipathPolicy -ne "RoundRobin"}

Sure enough, there was one newly-created LUN that was still using the default Most Recently Used multipath policy. All I had to do was run this command to properly configure it for all six hosts in that cluster.

Get-VMHost | Get-VMHostHba -Type "FibreChannel" | Get-ScsiLun -LunType "disk" | Where {$_.MultipathPolicy -ne "RoundRobin"} | Where {$_.CapacityGB -ge 100} | Set-ScsiLun -MultipathPolicy RoundRobin

Here’s what it does.

  • Get-VMHost: This cmdlet retrieves the hosts on a vCenter Server system
  • Get-VMHostHba -Type “FibreChannel”: This cmdlet retrieves information about the available HBAs (Host Bus Adapter) and selects only those that are using FibreChannel
  • Get-ScsiLun -LunType “disk”: This cmdlet retrieves the SCSI devices available on the vCenter Server system and selects only those that are disk, because I don’t want to configure Round Robin for things like CD-ROM drives
  • Where {$_.MultipathPolicy -ne “RoundRobin”}: A filter to find only those LUNs whose MultipathPolicy is not equal to RoundRobin (e.g. Fixed, MostRecentlyUsed, or Unknown)
  • Where {$_.CapacityGB -ge 100}: A filter to find only LUNs that are 100 GB or larger (which is just an extra safety-net filter I use to ensure I’m not including CD-ROM drives or direct attached storage)
  • Set-ScsiLun -MultipathPolicy RoundRobin: This is what makes changes if all of the previous conditions are met. If any LUNs were found to match the previous filters, change them to use the RoundRobin MultipathPolicy.

A few minutes later, I confirmed with Pure Storage that all LUNs from all vSphere hosts were using Round Robin. We then performed a successful and non-disruptive upgrade of our two storage controllers. I love my storage.

Comments are closed.