Page 1 of 1

Search a VV by its WWN

Posted: Thu Mar 14, 2013 3:40 am
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?

Re: Search a VV by its WWN

Posted: Thu Mar 14, 2013 4:06 am
by Christian
I would just copy the output to notepad / vi and use that to search in instead :)

Re: Search a VV by its WWN

Posted: Thu Mar 14, 2013 1:55 pm
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.

Re: Search a VV by its WWN

Posted: Thu Mar 14, 2013 5:44 pm
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]

Re: Search a VV by its WWN

Posted: Fri Mar 15, 2013 10:21 am
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

Re: Search a VV by its WWN

Posted: Wed Mar 20, 2013 5:12 am
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

Re: Search a VV by its WWN

Posted: Mon Mar 25, 2013 12:02 pm
by zQUEz
did you look at my example?
It does exactly what you are asking.

Re: Search a VV by its WWN

Posted: Wed Mar 27, 2013 6:59 am
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?

Re: Search a VV by its WWN

Posted: Fri May 17, 2013 9:44 am
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