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!
Script to remove all virtual volumes
- Richard Siemers
- Site Admin
- Posts: 1333
- Joined: Tue Aug 18, 2009 10:35 pm
- Location: Dallas, Texas
Re: Script to remove all virtual volumes
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.
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.
The views and opinions expressed are my own and do not necessarily reflect those of my employer.
- Richard Siemers
- Site Admin
- Posts: 1333
- Joined: Tue Aug 18, 2009 10:35 pm
- Location: Dallas, Texas
Re: Script to remove all virtual volumes
Its not looking good for the "-pat *" option.
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% 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
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: Script to remove all virtual volumes
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!
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!