mapping prtconf info to disk names?

2007-12-24 18:59:00

Is there any reliable way to map the output of 'prtconf' to the names
of disks?

For example, if I start with

# prtconf | grep -v 'driver not attached'
...
espdma, instance #0
esp, instance #0
sd, instance #0
sd, instance #1
sd, instance #2
sd, instance #6
st, instance #4
SUNW,hme, instance #0
SUNW,fas, instance #0
sd, instance #31
sd, instance #33
sd, instance #34
SUNW,hme, instance #1
SUNW,fas, instance #1
sd, instance #7
sd, instance #8

Under the "esp, instance #0", things are easy: they're just
"c0t0d0", "c0t1d0", "c0t2d0" and so on. However, fas0/sd31
is c1t1d0, and fas1/sd8 is c2t1d0.

Can I rely on controller number (c0, c1, c2) increasing in
the order of prtconf's output? Is there any way to derive
the target number (tX) from the sd instance? Or is there
some other tool I should use, to inventory disks on a system?
(I want to be sure I catch wasted disk space and slices that
are dedicated to database raw partitions, not just current
Unix filesystems and swap areas.)

Please reply directly to me; I will happily summarise to the
list; thanks in advance for any suggestions!

--------
David Harnick-Shapiro FirstWorld Communications
Senior Networked Systems Engineer 18101 Von Karman Avenue, Ste 550
<david.harnick-shapiro at firstworld.com> Irvine CA 92612

"Get the Internet the way you want it"
http://www.firstworld.com/

Comments

Got something to say?

You must be logged in to post a comment.