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";
}