Different Sym dev id from symcfg list address and symmaskdb list database
The sym device number which is returned is different for the below commands. As you see below, the symcfg gives back an Sym device which is 5 chars (00084) whereas one which is listed in symmaskdb is 4 chars(00C4).
Please advise why are the device number format different.
This was changed on the symdev command set for SE 8.x for accommodation of the lager address namespace for VMAX3 if you need the old behaviour you can change the setting in the options file Line 897: #SYMAPI_SYMDEVNAME_WIDTH = 5 remove the # and change to 4
Thank you. However shouldnt it be consistent size for all the command outputs? Why does the symmaskdb still gives 4 char sym dev id, when rest are giving 5 chars. Is there any configuration for this?
Thank you. However shouldnt it be consistent size for all the command outputs? Why does the symmaskdb still gives 4 char sym dev id, when rest are giving 5 chars. Is there any configuration for this?
it looks like you have discovered a bug, symmaskdb is no longer used with VMAX, I'd be interested if you see the output truncating to 4 digits on symaccess list view -detail -sid xxx on VMAX array, I only have VMAX3 so my output Is returned with 5 digits.
My guess here is that that information is read directly from the VCM database which will only ever store up to 4 Characters for the LUN ID and the output does not append extra Zero. The parameter I mention will put all to 4 characters to match.
symaccess does return a 5 char output ( I have put a sample below). Only the symmaskdb does not.
So how do we resolve this. We have a logic which maps the sym dev from the symmaskdb command to output of symcfg. Because of the mismatch in device names, correct mappings are not found. Do we just prefix a '0' before the sym dev returned from symmaskdb if is < 5 chars? Also based on the setting SYMAPI_SYMDEVNAME_WIDTH, if that has been set to 4, then appending a 0 to the symmaskdb output in our logic will again give us improper matches as in this scenario the other commands would return 4 chars sym dev.
Also How often is SYMAPI_SYMDEVNAME_WIDTH changed?
e.g
symaccess -sid 123 list view -v -detail gives out (just part of output extracted)
Personally, I'd write a function (or use a builtin method) to pad the SymDev number with zeros if it's less than the desired width. I tend to use Python, which has a builtin zfill() method for padding strings with zeros. So if you have a string called "device" containing an arbitrary-length SymDev name, and you want it to always be 5 characters wide, you can pad it with zeros like this:
device = device.zfill(5)
There are ways to do this in pretty much any language, but some may require more manual coding than others.
rawstorage
4 Apprentice
•
423 Posts
2292
0
Posted June 12th, 2015 05:00
There should be a note in the 8.0 release notes on this.