Start a Conversation

Unsolved

This post is more than 5 years old

T

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?

2 Intern

 • 

2.8K Posts

June 26th, 2009 07:00

Try thinking out of the box. Instead of finding gaps, find all used addresses :D

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 :D (have a look at emc214497 if you need help in finding gaps with shell scripts ;-))

Enjoy!

Message was edited by:
Stefano Del Corno

11 Posts

June 26th, 2009 10:00

That should work. I'll have to map those commands to perl since our symcli server is, unfortunately, Windows.

Marking question as answered.
No Events found!

Top