Search a VV by its WWN

Post Reply
blagoythebpy
Posts: 3
Joined: Thu Mar 07, 2013 4:07 am

Search a VV by its WWN

Post by blagoythebpy »

Hello,
I am looking for a way to search a virtual volume by its WWN
showvv -d -sortcol 10,inc would give me the list of all the WWNs but I am unable to grep within.
Can anyone help me with this?
Christian
Posts: 77
Joined: Mon Dec 12, 2011 5:08 am

Re: Search a VV by its WWN

Post by Christian »

I would just copy the output to notepad / vi and use that to search in instead :)
User avatar
Richard Siemers
Site Admin
Posts: 1333
Joined: Tue Aug 18, 2009 10:35 pm
Location: Dallas, Texas

Re: Search a VV by its WWN

Post by Richard Siemers »

If you install the command line tools on your workstation, you should be able to pipe the output to grep or whatever tools you like.
Richard Siemers
The views and opinions expressed are my own and do not necessarily reflect those of my employer.
sriramksg
Posts: 2
Joined: Tue Mar 12, 2013 5:11 am

Re: Search a VV by its WWN

Post by sriramksg »

In Windows, install putty software and use plink which can prove useful, without logging into the 3par array.

A sample example of plink looks like :

cmd.exe /c plink -l <Username> -pw <password> IP <command> | findstr [options]
zQUEz
Posts: 33
Joined: Mon Aug 20, 2012 1:54 pm
Location: Atlanta, GA

Re: Search a VV by its WWN

Post by zQUEz »

or in Linux you can setup your ssh keys to allow login to the storage frame and do a command like:

Code: Select all

ssh 3pararray "showvv -showcols Name,VV_WWN" |grep -i 50002AC01BA10E65
blagoythebpy
Posts: 3
Joined: Thu Mar 07, 2013 4:07 am

Re: Search a VV by its WWN

Post by blagoythebpy »

So far only workarounds have been provided.
I know I can paste the output in notepad and search for the WWN but I am more interested if there is a way using the 3PAR CLI to do it. I would not imagine the CLI is not capable of doing it?
The idea is to grow a virtual volume having the WWN just with two operations if I were to use the suggestions I would just use GUI.
Please reply only if you find the exact syntax to "grep" in the results.
Thanks
zQUEz
Posts: 33
Joined: Mon Aug 20, 2012 1:54 pm
Location: Atlanta, GA

Re: Search a VV by its WWN

Post by zQUEz »

did you look at my example?
It does exactly what you are asking.
blagoythebpy
Posts: 3
Joined: Thu Mar 07, 2013 4:07 am

Re: Search a VV by its WWN

Post by blagoythebpy »

Tried showvv -showcols Name,VV_WWN |grep WWN but it does not list any volume (having copied the WWN from the output without | grep
Any other ideas?
darkrshadeofblue
Posts: 1
Joined: Tue Mar 05, 2013 12:29 pm

Re: Search a VV by its WWN

Post by darkrshadeofblue »

I do it just the way you described. I have Red Hat's Cygwin installed on my laptop which is a really great tool to have in general, but particularly useful if you use the 3par CLI heavily.

Straight from the Cygwin terminal I can do a
`ssh <3parName> showvv -showcols Name,VV_WWN | grep -i <WWN>`

Or if I have a group of WWNs for which I am trying to determine VV Names I will put them in a flat file (wwns.list) and do a

for i in `cat wwns.list`
do
ssh <3parName> showvv -showcols Name,VV_WWN | grep -i $i
done

Of course this creates a new SSH session for each WWN in the list so it can take some time and isn't very efficient. If you have a large list of WWNs you can do it this way instead:

ssh <3parName> showvv -showcols Name,VV_WWN > vvs.3par
for i in `cat wwns.list`
do
grep -i $i vvs.3par
done
Post Reply