Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Manifest - A tool for matching EMC Symmetrix/VMAX Volumes to WWNs

by bpoag (Monk)
on Jun 07, 2017 at 20:49 UTC ( #1192304=CUFP: print w/replies, xml ) Need Help??

Still living in the 90's? Do you treat modern storage technologies like deduplication and compression with Amish-like suspicion, bitterness and disdain? Then EMC's VMAX AF line is the choice for you--For the rest of us here in the present, we have to find ways of keeping this thing propped up on life support. One of the more irritating aspects of EMC's VMAX line is the fact that, amazingly there is no single CLI command to display a simple table relating volume names to WWNs. Rather than wait for EMC to provide this functionality (or, preferably, sunset the VMAX line alltogether) I've written a simple wrapper in Perl that provides this functionality.
#!/usr/bin/perl ## ## Volume label to WWN/NAA manifest generator for VMAX arrays written +060717:1523 by Bowie J. Poag ## $DEBUG=1; $SID=$ARGV[0]; if ($SID eq "") { print "Manifest: No array specified. Exiting..\n\n"; } @dump=`symdev -sid $SID list -identifier device_name`; foreach $item (@dump) { chomp($item); $item=~s/\s+/ /g; @temp=split(" ",$item); $symDev=$temp[0]; $canonicalName=$temp[2]; if ($canonicalName=~/ACLX/) ## Special exception for gatekeeper LUN +s.. { $canonicalName=$temp[3]; } if (length($symDev)==5 && $symDev=~/[0-9a-fA-F]/ && $canonicalName +ne "") { $deviceHash{$symDev}{canonicalName}=$canonicalName; } } @dump=`symdev -sid $SID list -wwn`; foreach $item (@dump) { chomp($item); $item=~s/\s+/ /g; @temp=split(" ",$item); $symDev=$temp[0]; $WWN=$temp[4]; if (length($symDev)==5 && $symDev=~/[0-9a-fA-F]/ && length($WWN) > + 10) { $deviceHash{$symDev}{WWN}=$WWN; $suffix=substr $WWN,length($WWN)-4,4; $deviceHash{$symDev}{suffix}=$suffix; } } foreach $x (sort keys %deviceHash) { print "SID: [$SID] SymDev: [$x] Full WWN: [$deviceHash{$x}{WWN}] WW +N/NAA Suffix: [$deviceHash{$x}{suffix}] Name: [$deviceHash{$x}{canoni +calName}]\n"; }

Replies are listed 'Best First'.
Re: Manifest - A tool for matching EMC Symmetrix/VMAX Volumes to WWNs
by pritesh_ugrankar (Beadle) on Jun 15, 2017 at 14:08 UTC

    Hi,

    Glad to see VMAX related scripts here!! I used to work on VMAX. Miss those days. :)

    So do you use Perl to write all your scripts? Which version of OS and perl are you on? I know it doesn't have to do anything with the script but the symcli guy in me just had to ask. :)


Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: CUFP [id://1192304]
Approved by Discipulus
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2017-10-21 07:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (269 votes). Check out past polls.

    Notices?