X4500 contoller numbers are renamed.

Keeping track of those annoying controller number changes.

One “feature” of Solaris which personally drives me round the twist is the way controller number can get changed I.e. /dev/dsk/c4t5d0s0 can get changed into /dev/dsk/c7t5d0s0 when an additional HBA ( Host bus adaptor ) card is added to your system. Yes, I know why this happens, and I know it has to it is still a pain in the \*&\^\*(&.

And so I like to “brand” my disks with the name that the started out life with so I know what disks have changed. I've been doing it for some time and please no hassel about the quality of the scripting I'm a manager now :)

So why bother posting this blast from the past. We the reason is that the fixes for the following two bugs mean the default numbers of the controllers in your x4500 will change when upgrade to the latest ilom.

6727449 NPI: Require SWIE support for S10 U5 Thumper platform
6725713 ILOM 2.0.2.5/2.0.3.1 and later: virtual cdrom and floppy are enabled when used

#!/bin/ksh

# Script to bind link names to disks

# and reset them if the link names change.

# Damien Farnham DBE

# Tue Feb 13 13:02:14 GMT 1996

disklist()

{

format > /tmp/format.$$ 2>/dev/null - <<!

0

quit

!

grep cyl /tmp/format.$$ >/tmp/disklist

}

set_volname()

{

cat /tmp/disklist |

while read line; do

DISK_NAME=`echo $line | awk '{print $2}'`

format -d $DISK_NAME > /dev/null 2>/dev/null - <<!

volname

"$DISK_NAME"

y

quit

!

done

}

USAGE="Usage: set_links -r or -s "

case $1 in

-s)

disklist

set_volname

;;

\*)

echo "Usage: set_links -s saves links name on disk label"

exit

;;

esac

Comments:

Post a Comment:
Comments are closed for this entry.
About

damienf

Search

Categories
Archives
« July 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
   
       
Today