Unsolved
This post is more than 5 years old
11 Posts
0
953
June 26th, 2009 07:00
Determine Common LUN ID Across FAs via SYMCLI
I'm trying to programatically determine commonly available LUN addresses across a given set of Fas. The appropriate SYMCLI command (as far as I can tell) for this is symcfg -sid #### list -dir ## -address -available :
It dumps a list of addresses and their current status for the given FA. The output looks like this:
--
114B Not Visible (M) 0 00 0F2
- AVAILABLE 0 00 0F3 *
0887 Not Visible (M) 0 00 887
--
The *s signify that the string of addresses that start with the *'ed LUN address is available. In the excerpt above, addresses F3 - 886 are available (if I understand this correctly).
If you output it to XML format (which is the best way to throw it into a script for parsing), you get the following set of XML tags for the same entries.
0 0 0F3 True
0 0 887 M False 0887 Not Visible
--
Basically, the issue I'm running into is, when comparing Fas for common LUN addresses, it is non-trivial to automate it due to 2 reasons:
1. The standard output doesn't show all the available addresses. For "readability (?)", it condenses the addresses down to 1 line per "gap" (which eliminates the ability to do a compare based off of lines that have the term AVAILABILITY in them).
2. The XML compresses them similarly, but without the helpful "gap" notification. It is fairly non-trivial to do a compare between 2 Fas (without significant coding and likely memory usage due to the size of the XMLs).
Any thoughts? Am I missing anything?
It dumps a list of addresses and their current status for the given FA. The output looks like this:
--
114B Not Visible (M) 0 00 0F2
- AVAILABLE 0 00 0F3 *
0887 Not Visible (M) 0 00 887
--
The *s signify that the string of addresses that start with the *'ed LUN address is available. In the excerpt above, addresses F3 - 886 are available (if I understand this correctly).
If you output it to XML format (which is the best way to throw it into a script for parsing), you get the following set of XML tags for the same entries.
0 0 0F3 True
0 0 887 M False 0887 Not Visible
--
Basically, the issue I'm running into is, when comparing Fas for common LUN addresses, it is non-trivial to automate it due to 2 reasons:
1. The standard output doesn't show all the available addresses. For "readability (?)", it condenses the addresses down to 1 line per "gap" (which eliminates the ability to do a compare based off of lines that have the term AVAILABILITY in them).
2. The XML compresses them similarly, but without the helpful "gap" notification. It is fairly non-trivial to do a compare between 2 Fas (without significant coding and likely memory usage due to the size of the XMLs).
Any thoughts? Am I missing anything?
No Events found!
xe2sdc
2 Intern
•
2.8K Posts
0
June 26th, 2009 07:00
1) use symcfg -sid xxx list -dir yy -p w -address (don't use -available option) and find used addresses for every FA (grep / awk as needed)
2) use sort and uniq: merge all lists in a single big list
3) find gaps using a tiny shell script
Enjoy!
Message was edited by:
Stefano Del Corno
techmute
11 Posts
0
June 26th, 2009 10:00
Marking question as answered.