04/26/96, 4FAX# 4690 Mapping SSA hdisks and pdisks SPECIAL NOTICES Information in this document is correct to the best of our knowledge at the time of this writing. Please send feedback by fax to "AIXServ Information" at (512) 823-4009. Please use this information with care. IBM will not be responsible for damages of any kind resulting from its use. The use of this information is the sole responsibility of the customer and depends on the customer's ability to eval- uate and integrate this information into the customer's operational environment. ABOUT THIS DOCUMENT This document explains how to map SSA hdisks to pdisks and applies to AIX 3.2.5.1 and AIX 4.1. USING THE SSA SERVICE AIDS You can use the diagnostic service aids if you are logged in as root. Use the following procedure: 1. Run "diag" 2. Choose "Service Aids" 3. Choose "SSA Service Aids" 4. Choose "Configuration Verification" 5. Choose the pdisk or hdisk you want the corresponding hdisk or pdisk for. This will show the mapping. USING THE INFORMATION IN THE ODM Part of the information stored in the ODM database for the hdisks and pdisks is the unique serial number for every SSA disk. You can display the serial number for a pdisk or hdisk with the following command: lsattr -El -a connwhere_shad Then by finding the pdisk and hdisk with the same serial number, you can determine the mapping. Alternatively, you can use the following shell script Mapping SSA hdisks and pdisks 1 04/26/96, 4FAX# 4690 #!/bin/ksh # # 1. Create this script using your favorite editor. Name it # "lsssa". # 2. Change it's permission to allow execution with # "chmod +x lsssa". # # This script lists all SSA hdisks, it's associated pdisk, # serial number, physical volume ID (PVID) and volume group # membership. # # First get a list of the SSA hdisks hdisks=`lsdev -Cc disk | grep SSA | cut -f1 -d" "` hdisks=`lsdev -Cc disk -s ssar -F name` pdisks=`lsdev -Cc pdisk | cut -f1 -d" "` pdisks=`lsdev -Cc pdisk -F name` touch /tmp/hdisk.$$ # Temporary file - hdisk & SN touch /tmp/pdisk.$$ # Temporary file - pdisk & SN for i in $hdisks do print -n "$i " >> /tmp/hdisk.$$ lsattr -El $i -a connwhere_shad | cut -c20-27 >> /tmp/hdisk.$$ done for i in $pdisks do print -n "$i " >> /tmp/pdisk.$$ lsattr -El $i -a connwhere_shad | cut -c20-27 >> /tmp/pdisk.$$ done # Print header print "hdisk\tpdisk\tSerial Number\tPVID\t\t\tVG" # Get PVID and VG for each hdisk and print it out for i in $hdisks do sn=`grep $i /tmp/hdisk.$$ | cut -f2 -d" "` sn=`grep "$i " /tmp/hdisk.$$ | awk '{ print $2 }'` pdisk=`grep $sn /tmp/pdisk.$$ | cut -f1 -d" "` pdisk=`grep $sn /tmp/pdisk.$$ | awk '{ print $1 }'` pvid=`lspv | grep $i | sed -e 's/ \{2,\}/ /g' | cut -f2 -d" "` pvid=`lspv | grep "$i " | awk '{ print $2 }'` vg=`lspv | grep $i | sed -e 's/ \{2,\}/ /g' | cut -f3 -d" "` vg=`lspv | grep "$i " | awk '{ print $3 }'` print "$i\t$pdisk\t$sn\t$pvid\t$vg" done rm /tmp/pdisk.$$ /tmp/hdisk.$$ Mapping SSA hdisks and pdisks 2 04/26/96, 4FAX# 4690 READER'S COMMENTS Please fax this form to (512) 823-4009, attention "AIXServ Informa- tion". You may also e-mail comments to: elizabet@austin.ibm.com. These comments should include the same customer information requested below. Use this form to tell us what you think about this document. If you have found errors in it, or if you want to express your opinion about it (such as organization, subject matter, appearance) or make sug- gestions for improvement, this is the form to use. If you need technical assistance, contact your local branch office, point of sale, or 1-800-CALL-AIX (for information about support offer- ings). These services may be billable. Faxes on a variety of sub- jects may be ordered free of charge from 1-800-IBM-4FAX. Outside the U.S. call 415-855-4329 using a fax machine phone. When you send comments to IBM, you grant IBM a nonexclusive right to use or distribute your comments in any way it believes appropriate without incurring any obligation to you. NOTE: If you have a problem report or item number, supplying that number may help us determine why a procedure did or did not work in your specific situation. Problem Report or Item #: Branch Office or Customer #: Be sure to print your name and fax number below if you would like a reply: Name: Fax Number: ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ END OF DOCUMENT (ssa.mapping.krn, 4FAX# ) Mapping SSA hdisks and pdisks 3