Unsolved
This post is more than 5 years old
2 Intern
•
467 Posts
0
3861
Perl Script to create VMAX LUNs using symcli
I just finished writing a perl script which I used to automate the creation of thin meta devices on my vmax using symcli and perl. The basic idea is I create a text file with the size of the meta to create, the storage group I want it in, and the pool to bind it to. Each line is a new lun. Then I run my script, and it does everything from creating the tdevs, forming the meta, binding it to a pool, and adding it to a storage group...None of that is terribly hard, but when you have a lot of luns to make this can help.
I thought some of you guys might be interested in it...
You can find more information on my blog post here or a direct download link here.
I have my tdev side hard coded in the script, so you may want to tweak that,
Feedback is always welcome.
dynamox
2 Intern
2 Intern
•
20.4K Posts
0
January 31st, 2013 04:00
very nice, thank you for sharing !!!. A couple of of requests/questions (scope creep, i know you have plenty of free time )
1) if i run it with -test is it going to create all the symconfigure files but not actually execute them, that would be nice. For example in my shop we have to create change control ticket and document our procedure and symcli commands.
2) Would it be hard to make it OS agnostic, right now i can see you are hardcoding path to symcli. This would assume that folks have correctly defined path to symcli in their OS.
3) can you add another function and param that would handle concat meta
cincystorage
2 Intern
2 Intern
•
467 Posts
0
January 31st, 2013 22:00
Good suggestions. When you specify -test it only does previews instead of commits, but it is problematic... since the form meta preview will fail because the tdevs weren't committed... I didn't come up with a real solution to that one... I went ahead and added a new argument "-cc" which will run a preview on the tdev creation, but no other symclicommands. In addition it created a shell script in the created directory where it logs the commands you'll need to run to actually do the work..
I also made it path agnostic... It may not work on windows... but i added an argument "-symclipath" which is the path to the symcli binaries (needs a trailing slash)...
I didn't need to add another function, just changed the cfg_file a little to allow you to specify the config and stripe size..
I'm not in the office to these changes, but my emulator works...
New version can be found here:
http://blog.virtualstoragezone.com/wp-content/uploads/2013/02/Symcli_perl_meta_v2.beta_.zip
Let me know if this works out... curious to see how it works for other people..
cincystorage
2 Intern
2 Intern
•
467 Posts
0
February 1st, 2013 11:00
Got these additions tested.. worked perfectly fine.
I can't wait until I finish converting this to a Puppet Labs module... hopefully I can make it do the work on the host as well!
jacknpers
1 Message
0
October 16th, 2013 12:00
Mark, Thanks for sharing the script. But I have only production environment and I am little nervous to try these on the production box. You said works fine on your emulator, What kind of emulator is this, can you share ?
cincystorage
2 Intern
2 Intern
•
467 Posts
0
October 16th, 2013 20:00
The emulator comment was for some changes made specific to Dynamox's environment. I use the base scripts found on my blog exclusively to bind meta devices. It works perfectly.
The "emulator" is just a stand alone vm server with symcli installed and a copy of of my production bin file on said vm. Then some tweaks to make it ignore the errors about gatekeepers.