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?
Search a VV by its WWN
Re: Search a VV by its WWN
I would just copy the output to notepad / vi and use that to search in instead
- Richard Siemers
- Site Admin
- Posts: 1333
- Joined: Tue Aug 18, 2009 10:35 pm
- Location: Dallas, Texas
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.
Richard Siemers
The views and opinions expressed are my own and do not necessarily reflect those of my employer.
The views and opinions expressed are my own and do not necessarily reflect those of my employer.
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]
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
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
-
- Posts: 3
- Joined: Thu Mar 07, 2013 4:07 am
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
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
did you look at my example?
It does exactly what you are asking.
It does exactly what you are asking.
-
- Posts: 3
- Joined: Thu Mar 07, 2013 4:07 am
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?
Any other ideas?
-
- Posts: 1
- Joined: Tue Mar 05, 2013 12:29 pm
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
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