ITEM: X0281L

How to match pdisk to hdisk for SSA Drives


Question:
How do you match a pdisk to an hdisk for SSA drives?

Response:

One way to do this is to use the following:
 \# diag
     Service Aids
       SSA Service Aids
         Configuration Verfication
  
From this menu, choosing a pdisk/hdisk will show the corresponding
hdisk/pdisk.

You can also do this from the command line since the drive serial
numbers are in both the pdisk and hdisk attribute information.

Use the following script:

------------------------------------------------------------------
\#!/bin/ksh 
\# A script to assocate hdisk, pdisk and serial number for each 
\# ssa hdisk.  First get a list of the SSA hdisks
hdisks=`lsdev -Cc disk | grep SSA | cut -f1 -d" "`
pdisks=`lsdev -Cc pdisk | cut -f1 -d" "`
touch /tmp/hdisk.$$
for i in $hdisks
do
print -n "$i "  >> /tmp/hdisk.$$
lsattr -El $i -a connwhere_shad | cut -c20-27 >> /tmp/hdisk.$$
done

touch /tmp/pdisk.$$
for i in $pdisks
do
print -n "$i "  >> /tmp/pdisk.$$
lsattr -El $i -a connwhere_shad | cut -c20-27 >> /tmp/pdisk.$$
done

for i in $hdisks
do
sn=`grep $i /tmp/hdisk.$$ | cut -f2 -d" "`
pdisk=`grep $sn /tmp/pdisk.$$ | cut -f1 -d" "`
echo "$i\\t$pdisk\\t$sn"
done
rm /tmp/pdisk.$$ /tmp/hdisk.$$
----------------------------------------------------------------
\# ssa_disks
hdisk7  pdisk8  5AEA11D3
hdisk8  pdisk0  5AEA1357
hdisk9  pdisk9  5AEA13A6
hdisk10 pdisk1  5AEA13A7
hdisk11 pdisk10 5AEA13AA
hdisk12 pdisk2  5AEA13AB
hdisk13 pdisk3  5AEA13AE
hdisk14 pdisk11 5AEA13D2
hdisk15 pdisk12 5AEA1439
hdisk16 pdisk13 5AEA1442
hdisk17 pdisk14 5AEA1445
hdisk18 pdisk4  5AEA1446
hdisk19 pdisk5  5AEA1447
hdisk20 pdisk15 5AEA1449
hdisk21 pdisk6  5AEA144A
hdisk22 pdisk7  5AEA144C


Support Line: How to match pdisk to hdisk for SSA Drives ITEM: X0281L
Dated: August 1995 Category: N/A
This HTML file was generated 99/06/24~13:30:33
Comments or suggestions? Contact us