Friday Mar 05, 2010

SATA Disk Diagnosis Hits x86 OpenSolaris

This set of changes hit OpenSolaris today:

Comments: PSARC/2010/045 x86gentopo enumeration of direct attached SATA 6891266 generic x86 enumeration for directly attached SATA disks 6903122 Export SATA PHY from framework 6906979 Generic x86 disk enum needs SMBIOS OEM extended structure Files: added: usr/src/lib/fm/topo/modules/i86pc/x86pi/x86pi_bay.c modified: usr/src/cmd/smbios/smbios.c usr/src/common/smbios/smb_info.c usr/src/lib/fm/topo/libtopo/common/topo_hc.h usr/src/lib/fm/topo/modules/common/disk/disk.h usr/src/lib/fm/topo/modules/i86pc/x86pi/Makefile usr/src/lib/fm/topo/modules/i86pc/x86pi/x86pi.c usr/src/lib/fm/topo/modules/i86pc/x86pi/x86pi_hostbridge.c usr/src/lib/fm/topo/modules/i86pc/x86pi/x86pi_impl.h usr/src/lib/fm/topo/modules/i86pc/x86pi/x86pi_subr.c usr/src/lib/libsmbios/common/mapfile-vers usr/src/uts/common/io/sata/impl/sata.c usr/src/uts/common/sys/smbios.h usr/src/uts/common/sys/smbios_impl.h

Extensions to the x86gentopo project that enables topology for direct attach SATA devices. With the topology, the direct attach SATA devices automatically get diagnosed, leveraging the existing driver hardending, SMART data collection, and disk diagnosis rules already in OpenSolaris.

:wq

Thursday Sep 03, 2009

dmidecode in /contrib IPS Repository

After a few false starts getting dmidecode promoted to the /contrib repo, yesterday's refresh finally pulled the package in. I talked about my reasons for porting this utility in my prior blog on dmidecode.

So fire up package-manager and install it - or use the groovy install link from the repo directly.

:wq

Monday Jul 06, 2009

OpenSolaris dmidecode IPS

I've talked about the SourceJuicer before. If you often grab source tarballs and compile them on Solaris, check it out. And better yet - contribute. It's really not very involved. Today I put the dmidecode utility into the juicer.

Part of the x86gentopo project is adding OEM-specific SMBIOS structures. In searching around to find out if the structure types we were proposing would conflict with already existing OEM extensions, I stumbled upon dmidecode. Quite a nice utility. The /usr/sbin/smbios CLI is the Solaris equivalent. A minor annoyance with dmidecode is that it must be run as root since it directly reads the /dev/xsvc device, whereas smbios uses the /dev/smbios device. But execution aside, both report the same basic information:

# dmidecode -t baseboard # dmidecode 2.10 SMBIOS 2.5 present. Handle 0x0002, DMI type 2, 15 bytes Base Board Information Manufacturer: Sun Microsystems Product Name: Ultra 24 Version: 50 Serial Number: 3K01V3 Asset Tag: Null Features: Board is a hosting board Board is replaceable Location In Chassis: Null Chassis Handle: 0x0003 Type: Motherboard Contained Object Handles: 0 $ smbios -t 2 ID SIZE TYPE 2 60 SMB_TYPE_BASEBOARD (base board) Manufacturer: Sun Microsystems Product: Ultra 24 Version: 50 Serial Number: 3K01V3 Asset Tag: Null Location Tag: Null Chassis: 3 Flags: 0x9 SMB_BBFL_MOTHERBOARD (board is a motherboard) SMB_BBFL_REPLACABLE (board is field-replacable) Board Type: 0xa (motherboard)

Some slight field label differences, but the set of information one would expect. And, the listing of contained object handles from dmidecode is something missing from /usr/sbin/smbios. That's an enhancement the x86gentopo project is working on.

Although, dmidecode has some nice additions that make scripting simpler. For example, to fetch the system serial number (residing in the Type 1 SMBIOS strucure):

# dmidecode -s system-serial-number 0909FMB010

The keyword strings are a nice touch. Compare this with:

$ smbios -i `smbios -s |grep SMB_TYPE_SYSTEM | awk '{print $1}'` \\ | grep Serial | awk '{print $3}' 0909FMB010

While one gets the same result, it's obvious which approach is simpler and more maintainable in a script. And that's the primary reason it prompted me to port the utility. I'd suspect that many administrators have built scripts around dmidecode for basic system inventories. If moving to Solaris, having dmidecode around means one less script to port.

It's available in the /pending repository. /pending is an unstable repository, although dmidecode is about as benign as things get, so there's little risk in using it. It's behaved fine on my two systems running OpenSolaris b117 (one Sun system, one Toshiba laptop). If you do download it and use it, I'd really appreciate it if you let me know how it's working. I want to get the package moved to the more stable /contrib repository, and any reports of dmidecode working "in the wild" would certainly help.

:wq

About

user9148476

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
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
   
       
Today