ITEM: BY0263L

Finding connection location for SSA pdisk definition.



ENVIRONMENT:
   AIX 4.1.5, 7133 SSA Subsystem
.PROBLEM:
   Customer is trying to find out how to get the connection address
   (A/B port plus hop count) for SSA disks.
.ACTION TAKEN:
   The "ssaconn" command will report this information.  This command
   is included as part of the SSA device drivers at 4.1.5.X and
   4.2.1.X.  With this, a script such as the following can be used.
   The script assumes that the commands are in the /usr/local/bin
   directory.  Usually, they will be located in the /usr/sbin
   directory.
.   *** NOTE ***
   The following script is provided on an as-is basis, and is not
   guaranteed; use at your own risk!
   ************
.\#!/bin/ksh
\# ssarpt.ksh
\# Get report of correspondence between pdisk and hdisk for SSA
\# adapters.
/usr/sbin/lsdev -Ccpdisk | while read pdisk x x desc
do
  /usr/local/bin/ssaxlate -l $pdisk | read hdisk x
  echo $pdisk | cut -c6- | read num x
  printf "%03d" $num | read seq
  /usr/local/bin/ssaadap -l $pdisk | read adap x
  /usr/local/bin/ssaconn -l $pdisk -a $adap | read x x c1 c2 c3 c4 x
  /etc/lscfg -vl $pdisk | grep Serial | cut -c37- | read serialn x
  /etc/lsattr -E -l  $pdisk | tail -1 | read x serialh x
  printf "%-6s %3s %-9s %-9s %-16s %-9s %3s %3s %3s %3s\\n" \\
  $adap $seq $pdisk $hdisk $serialh $serialn $c1 $c2 $c3 $c4
done | sort | cut -c1-5,12-
echo "-----------------------------------------------------------------"
\#
\# end of script
\#
   Some sample output:  Column Headings are added manually.
   Node    Adap pdisk  hdisk   Hex serial       serial    Connections
fsgspn01: ssa0 pdisk0 hdisk2  08005AEA36B200D  00204024   0   4   -   -
fsgspn01: ssa0 pdisk1 hdisk3  08005AEA36B300D  00202079   3   1   -   -
fsgspn01: ssa0 pdisk2 hdisk4  08005AEA386900D  00208277   2   2   -   -
fsgspn01: ssa0 pdisk3 hdisk5  08005AEA3D6E00D  00198779   1   3   -   -
fsgspn01: ssa0 pdisk4 hdisk6  08005AEA3F4D00D  00211759   -   -   0   4
fsgspn01: ssa0 pdisk5 hdisk7  08005AEA426500D  00199608   -   -   2   2
fsgspn01: ssa0 pdisk6 hdisk8  08005AEA456500D  00213940   -   -   3   1
fsgspn01: ssa0 pdisk7 hdisk9  08005AEA458C00D  00213997   -   -   1   3
-----------------------------------------------------------------


Support Line: Finding connection location for SSA pdisk definition. ITEM: BY0263L
Dated: August 1997 Category: N/A
This HTML file was generated 99/06/24~13:30:19
Comments or suggestions? Contact us