HPE Storage Users Group

A Storage Administrator Community




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Script to remove all virtual volumes
PostPosted: Fri May 09, 2014 6:20 am 

Joined: Wed May 07, 2014 3:12 am
Posts: 4
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!


Top
 Profile  
Reply with quote  
 Post subject: Re: Script to remove all virtual volumes
PostPosted: Fri May 09, 2014 9:35 am 
Site Admin
User avatar

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

_________________
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: Script to remove all virtual volumes
PostPosted: Fri May 09, 2014 9:53 am 
Site Admin
User avatar

Joined: Tue Aug 18, 2009 10:35 pm
Posts: 1328
Location: Dallas, Texas
Its not looking good for the "-pat *" option.

Code:
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:
SS7400 cli% removevv -dr -pat \[A-Zb-z0-9\]*
No matching vvs

_________________
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: Script to remove all virtual volumes
PostPosted: Mon May 12, 2014 1:17 am 

Joined: Wed May 07, 2014 3:12 am
Posts: 4
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!


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


Who is online

Users browsing this forum: No registered users and 20 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group | DVGFX2 by: Matt