mercoledì 13 gennaio 2010

Why VMware PSA is helping me "to save the day" (part 2)

During my last post (part 1) I shared some background info about the new VMware vSphere PSA architecture.
Having a clear (basic) understanding about the subject, I can now explore how to make a vSphere admin (or a storage admin) life a little bit easier than before.

The Problem
In a VMware VI 3.5 world no PSA is available. That means that, working with an ALUA storage array, you have to configure as Fixed the multipath policy and then set the Preferred Path (between those available) to the optimized Storage Processor (SP). If you don't do that you'll have an non-optimized access to data and, in my environment, a large performance penalty array side.

figure 1-1 VI 3.X Policy Path selection

That is a very tedious task when you have to do it for more than a few paths!
In my environment, having 70 ESX hosts and 10 LUNs, I repeated the "Set the Preferred path" monkey job 700 times! (to tell the truth, I scripted it using Powershell, but you get the point).

SATP Rules to the rescue
Reading carefully the Fibre Channel SAN Configuration Guide (mentioned in my last post) I've found a new way to manage it.
The trick here is to change the default "STORAGE ARRAY TYPE" associated by vSphere to my Pillar
Axiom 500 ALUA arrays.
That is not something we can change using vCenter Client (UI), but using the command line esxcli tool.
Dealing with vSphere ESX 4.0i U1 installable version, I run that command remotely using vSphere management assistant appliance (vMA).

First thing to do is to check which ALUA type storage arrays are directly recognized by vmkernel:
# esxcli --server $HOST --username $USER --password $PASSWD nmp satp listrules -s VMW_SATP_ALUA

Name Vendor Model Driver Transport Options Claim Options Description
---- ------ ----- ------ --------- ------- ------------- -----------
VMW_SATP_ALUA HSV101 tpgs_on EVA 3000 GL with ALUA
VMW_SATP_ALUA HSV111 tpgs_on EVA 5000 GL with ALUA
VMW_SATP_ALUA HSV200 tpgs_on EVA 4000/6000 XL with ALUA
VMW_SATP_ALUA HSV210 tpgs_on EVA 8000/8100 XL with ALUA
VMW_SATP_ALUA HSV300 tpgs_on EVA 4100/4400 with ALUA
VMW_SATP_ALUA HSV400 tpgs_on EVA 6400 with ALUA
VMW_SATP_ALUA HSV450 tpgs_on EVA 8400 with ALUA
VMW_SATP_ALUA NETAPP tpgs_on NetApp with ALUA
VMW_SATP_ALUA HP ^MSA2* tpgs_on HP MSA A/A with ALUA
VMW_SATP_ALUA HP MSA 3G SAS Cntlr tpgs_on HP MSA A/A with ALUA
VMW_SATP_ALUA HSVX700 tpgs_on active/passive HP StorageWorks SVSP with ALUA
VMW_SATP_ALUA HSVX740 tpgs_on active/active HP StorageWorks SVSP with ALUA

VMW_SATP_ALUA Intel Multi-Flex tpgs_on Intel Promise
VMW_SATP_ALUA FUJITSU tpgs_on ETERNUS with ALUA
VMW_SATP_ALUA HSV340 tpgs_on EVA 4600 with ALUA
VMW_SATP_ALUA HSV360 tpgs_on EVA 6600 with ALUA

Next add a new SATP rule that will add support for a new storage vendor
# esxcli --server $HOST --username $USER --password $PASSWD nmp satp addrule --vendor="Pillar" --claim-option="tpgs_on" --satp="VMW_SATP_ALUA" --description="Pillar Axiom ALUA Support"

The previous SATP rule defines a new vendor (Pillar).
The --claim-option string is passed to the SATP when the SATP claims a path. The contents of this string, and how the SATP behaves as a result, are unique to each SATP. If tpgs_on is specified, the SATP will claim the path only if the ALUA Target Port Group support is enabled on the storage device. To verify the presence of the new rule check the output provided by previous esxcli nmp satp listrules command.

Finally define "Round Robin" path selection as the new default psp policy for all the ALUA arrays
# esxcli --server $HOST --username $USER --password $PASSWD nmp satp setdefaultpsp --psp="VMW_PSP_RR" --satp="VMW_SATP_ALUA"

Migrate VMs and Reboot your host.
You should be able to see the huge improvement comparing figure 1-1 with 1-2 and output provided by esxcli nmp device list commad pre and post policy modification.
figure 1-2 vSphere Policy Path selection

# esxcli nmp device list
eui.000b080039002001
Device Display Name: Pillar Fibre Channel Disk (eui.000b080039002001)
Storage Array Type: VMW_SATP_DEFAULT_AA
Storage Array Type Device Config:
Path Selection Policy: VMW_PSP_FIXED
Path Selection Policy Device Config: {preferred=vmhba2:C0:T1:L0;current=vmhba2:C0:T1:L0}
Working Paths: vmhba2:C0:T1:L0


# esxcli nmp device list
eui.000b080039002001
Device Display Name: Pillar Fibre Channel Disk (eui.000b080039002001)
Storage Array Type: VMW_SATP_ALUA
Storage Array Type Device Config: {implicit_support=on;explicit_support=off;explicit_allow=on;alua_followover=on;{TPG_id=2,TPG_state=ANO}{TPG_id=1,TPG_state=AO}}
Path Selection Policy: VMW_PSP_RR
Path Selection Policy Device Config: {policy=rr,iops=1000,bytes=10485760,useANO=0;lastPathIndex=0: NumIOsPending=0,numBytesPending=0}
Working Paths: vmhba2:C0:T1:L0

Conclusion.
Moving from VI 3 to vSphere you can make the most of the new Pluggable Storage Architecture with some easy tricks and a basic understanding of architecture.
Making the path selection policy aware of my storage arrays behaviour resulted in a new highly automated (and well balanced) storage environment.

1 commento: