Powershell Script to parse showpdvv data

Post Reply
jxrojas
Posts: 9
Joined: Wed Mar 21, 2012 4:21 pm

Powershell Script to parse showpdvv data

Post by jxrojas »

Gentlemen,

I've been using this script quite a bit lately to balance some of our InServ's running 2.3.1 and 3.1.1. We purchased a few disk cages and due to the bug with tunesys in these InFormOS versions, I had to do it manually.

The script basically scans all PDID's in the input file and produces a report listing VV's and its User Chunklet usage. I use this script with 600+ PDID's to identify which VV's would reduce the most load and proceed to tune them to an interim CPG:

$pdIDs = Import-Csv C:\script\3par_tune\pdids.txt
$outfile = 'C:\script\3par_tune\vvperpd.txt'
$3par = 'IP'
$report = @()

foreach ($pdID in $pdIDs){
$id = $pdID.Id.ToString()
$vvs = C:\script\plink $3par -l username -pw password showpdvv -sum $pdID.Id | Select-String $id

foreach ($vv in $vvs){
$usrChunks = $vv.ToString().Split(" ",[StringSplitOptions]"RemoveEmptyEntries")[8]

if ([int]$usrChunks -gt 25){
$row = "" | Select PDId,Type,VVName,UsrChunks
$row.PDId = $id
$row.Type = $vv.ToString().Split(" ",[StringSplitOptions]"RemoveEmptyEntries")[2]
$row.VVName = $vv.ToString().Split(" ",[StringSplitOptions]"RemoveEmptyEntries")[5]

$row.UsrChunks = [int]$usrChunks
$report += $row
}
}
}

$report | Out-File $outfile

The script produces a report in this fashion:

PDId Type VVName UsrChunks
1584 FC VV1 43
1584 FC VV2 30
1584 FC VV3 36
1584 FC VV4 27

You can filter VV's with a number of User Chunklets using the -gt expression inside the if statement.
User avatar
Richard Siemers
Site Admin
Posts: 1333
Joined: Tue Aug 18, 2009 10:35 pm
Location: Dallas, Texas

Re: Powershell Script to parse showpdvv data

Post by Richard Siemers »

So to use this script, do you look for VVs in the output that are not equally balanced across all PDs? How much difference do you like to see before you target a VV or tuning? Tell us more about the tunesys bug? I have yet to run a tunesys.

Here is the showvvpd command output i've used, I would consider this VV to be perfectly balanced, as the SS7200 only has 16 PDs, today. Will be interesting to see how it looks after we add a few more.

Code: Select all

SS7200-1 cli% showvvpd HOST1_LUN_0
Id Cage_Pos SA SD   usr total
 0    1:0:0  3  1  1040  1044
 1    1:1:0  2  1  1036  1039
 2    1:2:0  2  1  1040  1043
 3    1:4:0  3  1  1036  1040
 4    1:5:0  2  1  1040  1043
 5    1:6:0  2  1  1036  1039
 6    1:8:0  2  1  1040  1043
 7    1:9:0  2  1  1036  1039
 8   1:10:0  2  1  1040  1043
 9   1:12:0  2  1  1036  1039
10   1:13:0  2  1  1040  1043
11   1:14:0  2  1  1036  1039
12   1:16:0  3  1  1040  1044
13   1:17:0  3  1  1036  1040
14   1:20:0  2  1  1036  1039
15   1:21:0  2  1  1040  1043
-----------------------------
16    total 36 16 16608 16660
Richard Siemers
The views and opinions expressed are my own and do not necessarily reflect those of my employer.
jxrojas
Posts: 9
Joined: Wed Mar 21, 2012 4:21 pm

Re: Powershell Script to parse showpdvv data

Post by jxrojas »

Hi Richard,

You can find the Customer Advisory regarding the tunesys bug here:

http://h20566.www2.hp.com/portal/site/hpsc/template.PAGE/public/kb/docDisplay/?sp4ts.oid=5157544&spf_p.tpst=kbDocDisplay&spf_p.prp_kbDocDisplay=wsrp-navigationalState%3DdocId%253Demr_na-c03660626-1%257CdocLocale%253D%257CcalledBy%253D&javax.portlet.begCacheTok=com.vignette.cachetoken&javax.portlet.endCacheTok=com.vignette.cachetoken

As to how I use the script, please tale a look at the attached image. I build a pivot table with the script output and then look at tuning the VV's that have the most user chunklets first. The image is truncated because our InServ in question has +1500 disks and +3500 Virtual Volumes. You can imagine the amount of work needed to balance this system. We recently added 384 disks and now I'm looking to optimize the tuning process.

Best,

Jon
Attachments
vvpd_dist.jpg
vvpd_dist.jpg (147.52 KiB) Viewed 58841 times
Architect
Posts: 138
Joined: Thu Dec 06, 2012 1:25 pm

Re: Powershell Script to parse showpdvv data

Post by Architect »

if you have added more drives equally behind each node pair, why not simply run a for loop doing a tuneld over each of the SD (NOT the SA!!!) LD's (maybe per cpg, to keep some ordering in it)

the tuneld command will copy all the data of the existing ld to other ld's, until full and then create new ld's. the new ld's will be striped across all drives behind the node that was the owner of the original LD (old and new), and after all ld's are tuned, all data should be re-striped over all drives.

Don't run it together with tunevv's, compactcpg's or AO jobs though, that could give nasty errors.
The goal is to achieve the best results by following the clients wishes. If they want to have a house build upside down standing on its chimney, it's up to you to figure out how do it, while still making it usable.
Architect
Posts: 138
Joined: Thu Dec 06, 2012 1:25 pm

Re: Powershell Script to parse showpdvv data

Post by Architect »

by the way, just had a look at the advisory and it is only valid for 3.1.1 GA release. Mu1 already fixed that issue. So seems to be an oldy that for 99.99% procent of the 3PAR users is already solved.
The goal is to achieve the best results by following the clients wishes. If they want to have a house build upside down standing on its chimney, it's up to you to figure out how do it, while still making it usable.
hari300677
Posts: 2
Joined: Wed Nov 05, 2014 1:39 pm

Re: Powershell Script to parse showpdvv data

Post by hari300677 »

Hi,

I was trying to find if there is any powershell plugin for 3par. When i checked with HP they said they dont have one.

But in this thread there are some powershell scripts. How do you use powershell to connect to the array?

Thanks
Hari
RitonLaBevue
Posts: 390
Joined: Fri Jun 27, 2014 2:01 am

Re: Powershell Script to parse showpdvv data

Post by RitonLaBevue »

I recently scripted quite the same in TCL:
list of VVs not spreaded in the same number of chunklets over PDs.
Over PDs they got chunklets in and over PDs they should get chunklets in regarding CPGs and their patterns.

This sort out a list of VVs, standard deviation of chunklets used on each device type, min and max chunklets used.


Image


The name is "Tune Virtual Volume". That second part is still in dev...
Post Reply