Page 1 of 1

Script to remove all virtual volumes

Posted: Fri May 09, 2014 6:20 am
by operator
Hello,
I'm looking for the fastest way to remove all virtual volumes from 3par from cli. I'm running a demo environment so I need to remove all created volumes once in a while. If i use "removevv -f -pat * " does it remove .srdata and admin volumes too or is that impossible? I'm new with this stuff. Thank you in advance!

Re: Script to remove all virtual volumes

Posted: Fri May 09, 2014 9:35 am
by Richard Siemers
Test it with the -dr (dry run) option to see if they are included.
Too bad there is not an option to remove by ID# with a pattern.

Re: Script to remove all virtual volumes

Posted: Fri May 09, 2014 9:53 am
by Richard Siemers
Its not looking good for the "-pat *" option.

Code: Select all

SS7400 cli% showvv
                                                     --Rsvd(MB)--- -(MB)-
Id Name    Prov Type CopyOf BsId Rd -Detailed_State- Adm Snp   Usr  VSize
 1 .srdata full base ---       1 RW normal             0   0 81920  81920
 0 admin   full base ---       0 RW normal             0   0 10240  10240
-------------------------------------------------------------------------
 2 total                                               0   0 92160  92160
SS7400 cli% removevv -dr -pat *
Dry run : removevv -ld admin
Dry run : removevv -ld .srdata


Frustrating... so I cracked the book:

http://h20565.www2.hp.com/portal/site/h ... .492883150

Page 12 covers glob-style pattern matching... however it does not appear that 3PAR implemented an option to exclude. So this pattern will kill anything that starts with a CAPTIAL A-Z, lowercase b-z, or a number... but will leave behind anything that starts with a or non-alphanumeric. Perhaps a start that you can tweak to meet your goal.

Code: Select all

SS7400 cli% removevv -dr -pat \[A-Zb-z0-9\]*
No matching vvs

Re: Script to remove all virtual volumes

Posted: Mon May 12, 2014 1:17 am
by operator
Thank you very much this is just what I was looking for! I also tried to look for the exclusion logic but couldn't find anything...
I also tried to run the -pat * as "edit" user who has access to all domains. It doesn't show .srdata and admin volumes when you list the volumes but it tries to delete them when you enter the * pattern. If you choose "yes", it will not allow you to remove the disks but I guess it's not really best practice trying to erase critical disks five times a day.
Thanks again!