SUMMARY : sd?? names to regular Solaris disk names

From: Niall O Broin x 3619 (
Date: Wed Oct 11 1995 - 20:19:42 CDT

My original question (condensed) was how to translate from the sd?? disk
name format used in e.g. iostat in Solaris to regular disk names so I
could tell which damn disk iostat was talking about. I had made some
guess about the mapping but I was only correct for drives on the first
controller i.e. c0t0dx -> sdx but the mapping on the later controllers
is non-intuitive. Several people suggested grepping dmesg and also
ls -l /dev/sd* both of which are fine though the output is a little
unreadable but the large Havanas go to Sanjay Kumar and Art Freeman
(both at Sabre Decision Technologies) who provided the following script
which came from Sun which does exactly what I want (I edited slightly for
the summary, but only to enhance readability - it was a one-liner) :

cd /dev/rdsk
/usr/bin/ls -l *s0 | tee /tmp/d1c |awk '{print "/usr/bin/ls -l "$11}' | \
sh | awk '{print "sd" substr($0,38,4)/8}' >/tmp/d1d
awk '{print substr($9,1,6)}' /tmp/d1c |paste - /tmp/d1d
rm /tmp/d1[cd]

Thanks also to : (Daniel Lorenzini) (Mark B. Hamby) (Andy McCammont) (Louis M. Brune)
exabyte! (Philip O'Neill)
Stephen P Richardson <> (Raymond Wong)
Ric Anderson <> (Glenn Satchell - Uniq Professional Services)

Kindest regards,

Niall O Broin

European Space Operations Centre
Darmstadt, Germany Ph./Fax +49 6151 90 3619/2179

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:34 CDT