perl514tag:blogs.perl.org,2009-11-03:/users/perl514//17952013-02-10T05:05:17ZA blog about the Perl programming languageMovable Type Pro 4.38A very small script to check the masking information for each of the cloned devices. tag:blogs.perl.org,2013:/users/perl514//1795.42992013-02-09T18:53:23Z2013-02-10T05:05:17Zperl514
A very small script to check the masking information for each of the cloned devices.

Please note that this is the first and very basic version and I will post an updated version as soon as possible.

The Symmetrix Storage Arrays have a concept of "clones" where in the storage devices are paired for data transfer. During certain activities, it is important for a storage administrator to ensure that the correct device is made visible to the correct server. During this checking process, the command to check masking records (masking refers to the act of making the SAN Storage Devices visible to hosts) of each of the hexadecimal devices shown below has to be run individually. The command to check that is -

symmask -sid 000190101234 list assign -devs BB01

, where sid is the symmetrix array ID and the BB01 part is the device ID. The script automates the process.

All that is needed now, is to copy paste these commands in a bat file, and we get the output. This is just the first version of the script and I will be automating it further to reflect the server names.

]]>
Script to convert HBA WWNs to lowercase and add ":"tag:blogs.perl.org,2013:/users/perl514//1795.42952013-02-09T09:19:37Z2013-02-10T04:56:29ZI hope that SAN Admins find this helpful. Whenever HBA WWNs are entered in Cisco SAN Switches on the command line prompt, A colon (:) character needs to be added at every second position in the WWN. Also, the WWN...perl514
I hope that SAN Admins find this helpful.

Whenever HBA WWNs are entered in Cisco SAN Switches on the command line prompt, A colon (:) character needs to be added at every second position in the WWN. Also, the WWN has to be lower case.

So in case you get a WWN like so - 10000000C9ABCDEF it needs to be converted to lower case and : needs to be added. The following script does this.

Here it adds ":" and lowercase. It also checks if the characters entered are Hex, if the length is correct and if any unwanted characters are given or not. In these cases, it takes you back to the prompt to enter the WWN.

It also does it the other way around, i.e. if you enter a WWN with ":", it removes them and does all the checks as mentioned above.

The Ever Helpful Monks at PerlMonks gave a lot of suggestions, and I've tried to incorporate them here.

[linuxguy@joesatch practice]$ perl wwn_final.pl
Enter
a for lowercase and colons.
b to do it the other way around.
q to quit a
Enter the wwn or q to quit: 10000000C9ABCDEF
10:00:00:00:c9:ab:cd:ef
Enter the wwn or q to quit: 10:00:00:00:c9:ab:cd:ef
Invalid Length Or Incorrect Format
Enter the wwn or q to quit: 10000000C9ABCDEG
Invalid Length Or Incorrect Format
Enter the wwn or q to quit: 10000000abcdefga
Invalid Length Or Incorrect Format
Enter the wwn or q to quit: 10000000abcdefab
10:00:00:00:ab:cd:ef:ab
Enter the wwn or q to quit: q
Invalid Length Or Incorrect Format
[linuxguy@joesatch practice]$ perl wwn_final.pl
Enter
a for lowercase and colons.
b to do it the other way around.
q to quit b
Enter the wwn with : or q to quit: 10:00:00:00:c9:ab:cd:ef
10000000c9abcdef
Enter the wwn with : or q to quit: 10:00:00:00:c9:ab:cd:eg
Invalid Length Or Incorrect Format
Enter the wwn with : or q to quit: 10:00:00:00:c9:ab:cd:e
Invalid Length Or Incorrect Format
Enter the wwn with : or q to quit: 10000000c9abcdef
Invalid Length Or Incorrect Format
Enter the wwn with : or q to quit: q
Invalid Length Or Incorrect Format
[linuxguy@joesatch practice]$

]]>
My First Post.tag:blogs.perl.org,2013:/users/perl514//1795.42932013-02-09T08:05:58Z2013-02-09T08:36:20ZHi, I am a Storage Administrator. I was on a lookout for a scripting language that would help me automate some of the work that I do. Started learning Perl, but it was ( and still is) a sort of...perl514
Hi, I am a Storage Administrator. I was on a lookout for a scripting language that would help me automate some of the work that I do. Started learning Perl, but it was ( and still is) a sort of intermittent process. Work load has a tendency to mount when you least expect and I end up not learning/writing Perl for days together.

Signed up here to write about Perl. I am still in the learning phase, yet, I'll post whatever small scripts I write.

It saddens me when, without any valid research, some people, even a few of my colleagues bemoan the state of Perl. They think that Perl is stagnant, that its not "alive and growing" any more..In my own small ways, I am trying to change that perception. If I can get a few of my colleagues and friends to change their opinion, it would be fine by me :)

My main intention of posting my scripts on PerlMonks and here is that some fellow storage admin comes here while browsing for some script to automate the same tasks that I have already automated, finds my scripts useful and uses them.

That's all for now.

P.S. -> Well, I was trying to write this blog on IE 9, but for some reason this content page would not let me type in. So I tried Chrome and it works fine :)