[OpenIndiana-discuss] OI and chassis/jbod support?

Dan Swartzendruber dswartz at druber.com
Wed Jul 4 14:21:48 UTC 2012


This is a bit annoying.  I am replacing two of the 600GB SATA drives (WDC)
with 1TB Seagate SAS drives.  diskmap.py finds neither of the 1TB SAS
drives, nor the 500GB SAS boot drive.  After much hair pulling, I discover
the problem is that sas2ircu and prtconf do not have the same serial number,
and not the '-' in the middle like diskmap.py tries to mangle.  example:

sas2ircu gives me Z1N1LX05 for one of the drives, whereas prtconf gives
Z1N1LX050000C2424AUR.  This seems to be true for all 3 SAS drives.  So the
hack I want to add to diskmap.py is to allow the leading string match, but
my python skills are 0 - having to learn this as I go :(

-----Original Message-----
From: Rich [mailto:rercola at acm.jhu.edu] 
Sent: Monday, July 02, 2012 1:45 PM
To: Discussion list for OpenIndiana
Subject: Re: [OpenIndiana-discuss] OI and chassis/jbod support?

diskmap.py is a publicly available script written by someone else
whose name escapes me ATM which is useful for this.

I also have my own scripts which aren't in any state for anyone else
to look at ATM which do similar things.

- Rich

On Mon, Jul 2, 2012 at 1:42 PM, Lucas Van Tol <catseyev9 at hotmail.com> wrote:
>
> Some of the sg_ses and sg_vpd tools from the sg3_utils package can sort of
give that information if you have an SES compatible backplane/expander.
> It stops working when disks die though; so you would want to record any
mappings somewhere for later reference.  (Or just look for the blank spot in
the map later on...)
>
> I have been working on some scripts; but they are still in a very 'ugly'
state.
> sg_vpd will give you a 'sas address' for any disk.   sg_ses --page=0xa
/dev/es/ses??? will list SAS addresses for each slot; along with some other
stuff.
> Match those up and you have a map of slots / disks.
>
> I dump the output from the following script for each 'active' disk into a
file to make a map.
> I've been working on a script to blink LED's as well; but it involves
sending binary blobs to sg_ses; and I'm not entirely sure it wouldn't brick
another brand of expander...
>
> ##############
> #! /bin/bash
> ##Usage:: Print SES device; Element # for a given disk.
> UDISK=$1
> DISK=$1
>
> DISKSAS=$(sg_vpd --page=di /dev/rdsk/$DISK | grep 0x | tail -2|head -1 |
awk '{print $1}')
> DISKSIZE=$(sg_readcap /dev/rdsk/$DISK | grep size | awk '{print $3}')
> echo $DISKSAS | grep 'x' >> /dev/null
> if [ $? -eq 0 ] ; then  ##Found a SAS address...
>         SESDEVICE=$(for SESDEV in `ls /dev/es`; do sg_ses --page=0xa
/dev/es/$SESDEV | grep -i $DISKSAS >> /dev/null; if [ $? -eq 0 ] ; then echo
$SESDEV; fi; done)
>         echo $SESDEVICE| grep 's' >> /dev/null
>         if [ $? -eq 0 ] ; then ##Found a ses device...
>
>         SLOT='NUL'
>         idex=0
>                 sg_ses --page=0xa /dev/es/$SESDEVICE | while read line
>                 do
>                         if [[ "$line" =~ "element" ]] ; then
>                                 idex=$(echo "$line" | awk '{print $3}')
>                         fi
>                         if [[ "$line" =~ "$DISKSAS" ]] ; then
>                                 SLOT=$idex
>                                 echo "Disk $UDISK $DISKSAS at $SLOT on
$SESDEVICE size $DISKSIZE"
>                         fi
>                 done
>         else
>                 echo "Disk $UDISK $DISKSAS at NUL on NUL size $DISKSIZE
##No SES detected"
>         fi
> else
>         echo "Disk $UDISK NUL at NUL on NUL size $DISKSIZE  ##No SAS
detected"
> fi
>
>
> ############
>
>
>
> -Lucas Van Tol
>
>> From: dswartz at druber.com
>> To: openindiana-discuss at openindiana.org
>> Date: Sun, 1 Jul 2012 19:14:01 -0400
>> Subject: [OpenIndiana-discuss] OI and chassis/jbod support?
>>
>>
>>
>> During my brief experiment with S11, I was pleasantly surprised at the
>> croinfo app, which shows you which disks are in which enclosure/slot.  Is
>> there anything like that for OI?  If not, any idea what doing this would
>> entail?
>>
>> _______________________________________________
>> OpenIndiana-discuss mailing list
>> OpenIndiana-discuss at openindiana.org
>> http://openindiana.org/mailman/listinfo/openindiana-discuss
>
> _______________________________________________
> OpenIndiana-discuss mailing list
> OpenIndiana-discuss at openindiana.org
> http://openindiana.org/mailman/listinfo/openindiana-discuss

_______________________________________________
OpenIndiana-discuss mailing list
OpenIndiana-discuss at openindiana.org
http://openindiana.org/mailman/listinfo/openindiana-discuss




More information about the OpenIndiana-discuss mailing list