HPE Storage Users Group
https://3parug.org/

Search a VV by its WWN
https://3parug.org/viewtopic.php?f=18&t=286
Page 1 of 1

Author:  blagoythebpy [ Thu Mar 14, 2013 3:40 am ]
Post subject:  Search a VV by its WWN

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?

Author:  Christian [ Thu Mar 14, 2013 4:06 am ]
Post subject:  Re: Search a VV by its WWN

I would just copy the output to notepad / vi and use that to search in instead :)

Author:  Richard Siemers [ Thu Mar 14, 2013 1:55 pm ]
Post subject:  Re: Search a VV by its WWN

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.

Author:  sriramksg [ Thu Mar 14, 2013 5:44 pm ]
Post subject:  Re: Search a VV by its WWN

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]

Author:  zQUEz [ Fri Mar 15, 2013 10:21 am ]
Post subject:  Re: Search a VV by its WWN

or in Linux you can setup your ssh keys to allow login to the storage frame and do a command like:
Code:
ssh 3pararray "showvv -showcols Name,VV_WWN" |grep -i 50002AC01BA10E65

Author:  blagoythebpy [ Wed Mar 20, 2013 5:12 am ]
Post subject:  Re: Search a VV by its WWN

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

Author:  zQUEz [ Mon Mar 25, 2013 12:02 pm ]
Post subject:  Re: Search a VV by its WWN

did you look at my example?
It does exactly what you are asking.

Author:  blagoythebpy [ Wed Mar 27, 2013 6:59 am ]
Post subject:  Re: Search a VV by its WWN

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?

Author:  darkrshadeofblue [ Fri May 17, 2013 9:44 am ]
Post subject:  Re: Search a VV by its WWN

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

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/