HPE Storage Users Group

A Storage Administrator Community




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Search a VV by its WWN
PostPosted: Thu Mar 14, 2013 3:40 am 

Joined: Thu Mar 07, 2013 4:07 am
Posts: 3
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: Search a VV by its WWN
PostPosted: Thu Mar 14, 2013 4:06 am 

Joined: Mon Dec 12, 2011 5:08 am
Posts: 77
I would just copy the output to notepad / vi and use that to search in instead :)


Top
 Profile  
Reply with quote  
 Post subject: Re: Search a VV by its WWN
PostPosted: Thu Mar 14, 2013 1:55 pm 
Site Admin
User avatar

Joined: Tue Aug 18, 2009 10:35 pm
Posts: 1328
Location: Dallas, Texas
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Search a VV by its WWN
PostPosted: Thu Mar 14, 2013 5:44 pm 

Joined: Tue Mar 12, 2013 5:11 am
Posts: 2
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]


Top
 Profile  
Reply with quote  
 Post subject: Re: Search a VV by its WWN
PostPosted: Fri Mar 15, 2013 10:21 am 

Joined: Mon Aug 20, 2012 1:54 pm
Posts: 33
Location: Atlanta, GA
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


Top
 Profile  
Reply with quote  
 Post subject: Re: Search a VV by its WWN
PostPosted: Wed Mar 20, 2013 5:12 am 

Joined: Thu Mar 07, 2013 4:07 am
Posts: 3
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


Top
 Profile  
Reply with quote  
 Post subject: Re: Search a VV by its WWN
PostPosted: Mon Mar 25, 2013 12:02 pm 

Joined: Mon Aug 20, 2012 1:54 pm
Posts: 33
Location: Atlanta, GA
did you look at my example?
It does exactly what you are asking.


Top
 Profile  
Reply with quote  
 Post subject: Re: Search a VV by its WWN
PostPosted: Wed Mar 27, 2013 6:59 am 

Joined: Thu Mar 07, 2013 4:07 am
Posts: 3
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: Search a VV by its WWN
PostPosted: Fri May 17, 2013 9:44 am 

Joined: Tue Mar 05, 2013 12:29 pm
Posts: 1
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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 


Who is online

Users browsing this forum: No registered users and 57 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group | DVGFX2 by: Matt