blog'o thnet

To content | To menu | To search

Tag - Kernel

Entries feed - Comments feed

Wednesday 18 July 2012

Update the HBA firmware on Oracle-branded HBAs

Updating the emlxs driver will no longer automatically update the HBA firmware on Oracle-branded HBAs. If an HBA firmware update is required on an Oracle-branded HBA, a WARNING message will be placed in the /var/adm/messages file, such as this one:

# grep emlx /var/adm/messages
[...]
Jul 18 02:37:11 beastie emlxs: [ID 349649 kern.info] [ 1.0340]emlxs0:WARNING:1540: Firmware update required. (A manual HBA reset or link reset (using luxadm or fcadm) is required.)
Jul 18 02:37:15 beastie emlxs: [ID 349649 kern.info] [ 1.0340]emlxs1:WARNING:1540: Firmware update required. (A manual HBA reset or link reset (using luxadm or fcadm) is required.)
[...]

If found, this message is stating that the emlxs driver has determined that the firmware kernel component needs to be updated. To perform this update, execute luxadm -e forcelip on Solaris 10 (or a fcadm force-lip on Solaris 11) against each emlxs instance that reports the message. As stated in the documentation:

This procedure, while disruptive, will ensure that both driver and firmware are current. The force lip will temporarily disrupt I/O on the port. The disruption and firmware upgrade takes approximately 30-60 seconds to complete as seen from the example messages below. The example shows an update is needed for emlxs instance 0 (emlxs0) and emlxs instance 1 (emlxs1), which happens to correlate to the c1 and c2 controllers in this case.

# fcinfo hba-port
HBA Port WWN: 10000000c9e43860
        OS Device Name: /dev/cfg/c1
        Manufacturer: Emulex
        Model: LPe12000-S
        Firmware Version: 1.00a12 (U3D1.00A12)
        FCode/BIOS Version: Boot:5.03a0 Fcode:3.01a1
        Serial Number: 0999BT0-1136000725
        Driver Name: emlxs
        Driver Version: 2.60k (2011.03.24.16.45)
        Type: N-port
        State: online
        Supported Speeds: 2Gb 4Gb 8Gb
        Current Speed: 8Gb
        Node WWN: 20000000c9e43860
HBA Port WWN: 10000000c9e435fe
        OS Device Name: /dev/cfg/c2
        Manufacturer: Emulex
        Model: LPe12000-S
        Firmware Version: 1.00a12 (U3D1.00A12)
        FCode/BIOS Version: Boot:5.03a0 Fcode:3.01a1
        Serial Number: 0999BT0-1136000724
        Driver Name: emlxs
        Driver Version: 2.60k (2011.03.24.16.45)
        Type: N-port
        State: online
        Supported Speeds: 2Gb 4Gb 8Gb
        Current Speed: 8Gb
        Node WWN: 20000000c9e435fe

In order not to interrupt the service, and because MPxIO (native multipathing I/O) is in use, each emlxs instance will be update one after each other.

# date
Wed Jul 18 09:34:11 CEST 2012

# luxadm -e forcelip /dev/cfg/c1

# grep emlx /var/adm/messages
[...]
Jul 18 09:35:48 beastie emlxs: [ID 349649 kern.info] [ 5.0334]emlxs0: NOTICE: 710: Link down.
Jul 18 09:35:53 beastie emlxs: [ID 349649 kern.info] [13.02C0]emlxs0: NOTICE: 200: Adapter initialization. (Firmware update needed. Updating. id=67 fw=6)
Jul 18 09:35:53 beastie emlxs: [ID 349649 kern.info] [ 3.0ECB]emlxs0: NOTICE:1520: Firmware download. (AWC file: KERN: old=1.00a11  new=1.10a8  Update.)
Jul 18 09:35:53 beastie emlxs: [ID 349649 kern.info] [ 3.0EEB]emlxs0: NOTICE:1520: Firmware download. (DWC file: TEST:             new=1.00a4  Update.)
Jul 18 09:35:53 beastie emlxs: [ID 349649 kern.info] [ 3.0EFF]emlxs0: NOTICE:1520: Firmware download. (DWC file: STUB: old=1.00a12  new=2.00a3  Update.)
Jul 18 09:35:53 beastie emlxs: [ID 349649 kern.info] [ 3.0F1D]emlxs0: NOTICE:1520: Firmware download. (DWC file: SLI2: old=1.00a12  new=2.00a3  Update.)
Jul 18 09:35:53 beastie emlxs: [ID 349649 kern.info] [ 3.0F2C]emlxs0: NOTICE:1520: Firmware download. (DWC file: SLI3: old=1.00a12  new=2.00a3  Update.)
Jul 18 09:36:01 beastie emlxs: [ID 349649 kern.info] [ 3.0143]emlxs0: NOTICE:1521: Firmware download complete. (Status good.)
Jul 18 09:36:06 beastie emlxs: [ID 349649 kern.info] [ 5.055E]emlxs0: NOTICE: 720: Link up. (8Gb, fabric, initiator)

# date
Wed Jul 18 09:39:51 CEST 2012

# luxadm -e forcelip /dev/cfg/c2

# grep emlx /var/adm/messages
[...]
Jul 18 09:41:35 beastie emlxs: [ID 349649 kern.info] [ 5.0334]emlxs1: NOTICE: 710: Link down.
Jul 18 09:41:40 beastie emlxs: [ID 349649 kern.info] [13.02C0]emlxs1: NOTICE: 200: Adapter initialization. (Firmware update needed. Updating. id=67 fw=6)
Jul 18 09:41:40 beastie emlxs: [ID 349649 kern.info] [ 3.0ECB]emlxs1: NOTICE:1520: Firmware download. (AWC file: KERN: old=1.00a11  new=1.10a8  Update.)
Jul 18 09:41:40 beastie emlxs: [ID 349649 kern.info] [ 3.0EEB]emlxs1: NOTICE:1520: Firmware download. (DWC file: TEST:             new=1.00a4  Update.)
Jul 18 09:41:40 beastie emlxs: [ID 349649 kern.info] [ 3.0EFF]emlxs1: NOTICE:1520: Firmware download. (DWC file: STUB: old=1.00a12  new=2.00a3  Update.)
Jul 18 09:41:40 beastie emlxs: [ID 349649 kern.info] [ 3.0F1D]emlxs1: NOTICE:1520: Firmware download. (DWC file: SLI2: old=1.00a12  new=2.00a3  Update.)
Jul 18 09:41:40 beastie emlxs: [ID 349649 kern.info] [ 3.0F2C]emlxs1: NOTICE:1520: Firmware download. (DWC file: SLI3: old=1.00a12  new=2.00a3  Update.)
Jul 18 09:41:48 beastie emlxs: [ID 349649 kern.info] [ 3.0143]emlxs1: NOTICE:1521: Firmware download complete. (Status good.)
Jul 18 09:41:53 beastie emlxs: [ID 349649 kern.info] [ 5.055E]emlxs1: NOTICE: 720: Link up. (8Gb, fabric, initiator)

That's it. Lastly, the documentation says:

At this point, the firmware upgrade is complete as indicated by the Status good message above. A reboot is not strictly necessary to begin using the new firmware. But the fcinfo hba-port command may still report the old firmware version. This is only a reporting defect that does not affect firmware operation and will be corrected in a later version of fcinfo. To correct the version shown by fcinfo, a second reboot is necessary. On systems capable of DR, you can perform dynamic reconfiguration on the HBA (via cfgadm unconfigure/configure) instead of rebooting.

For my part, I tried to unconfigure/configure each emlxs instance using cfgadm without a reboot, but this didn't work as expected on Solaris 10. The fcinfo utility still report the old firmware version, seems until the next reboot.

Sunday 28 January 2007

About Kernel Debugging on FreeBSD

After posting about some very interesting entries on how to debug kernel problems in Solaris 10, here are some keywords which may be needed while looking for help on FreeBSD mailing lists. This is just a quick memo, so please read the excellent Kernel Debugging chapter of the FreeBSD Developers's Handbook.

At the debugger prompt, using DDB at the system console:

db> where
db> show pcpu
db> show alllocks
db> ps
db> show lockedvnods
db> show lockedbufs

Good luck!

Saturday 6 January 2007

Kernel Debugger in Solaris 10

Here is a little note to point out those two blog entries on how to debug kernel problem at boot time, from Dan Mick and Eric Lowe, respectively.

Too bad i didn't have a serial console on my Sun Ultra 20 workstation. I will try these steps when U20 will be near my hands, though.

Thursday 14 December 2006

Instruction Set Information on the Solaris Platform

Although i already known about the isainfo(1) utility, i always welcome some very nice post as seen on the Blog O' Matty weblog which learn me about other ISA command counterparts: isalist(1), and optisa(1).

So, here are the corresponding outputs on a Sun Ultra 20 workstation:

$ isainfo -v
64-bit amd64 applications
        sse3 sse2 sse fxsr amd_3dnowx amd_3dnow amd_mmx mmx cmov amd_sysc cx8
        tsc fpu
32-bit i386 applications
        sse3 sse2 sse fxsr amd_3dnowx amd_3dnow amd_mmx mmx cmov amd_sysc cx8
        tsc fpu
$
$ isalist
amd64 pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86
$
$ optisa `isalist`
amd64

Here are the name of the instruction set(s) used by the operating system kernel components, and those used by portable applications:

$ cat /etc/release
                        Solaris 10 11/06 s10x_u3wos_10 X86
           Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                           Assembled 14 November 2006
$
$ uname -a
$
SunOS unic 5.10 Generic_118855-33 i86pc i386 i86pc
$ isainfo -kv
64-bit amd64 kernel modules
$
$ isainfo -nv
64-bit amd64 applications
        sse3 sse2 sse fxsr amd_3dnowx amd_3dnow amd_mmx mmx cmov amd_sysc cx8
        tsc fpu

Saturday 30 September 2006

Non-Debug OpenSolaris Binaries on the x64 Platform

Just a little news to promote the work done by Alan Hargreaves for providing non-debug encumbered binaries for the latest ON sources at this time, for x64 platform only (yet).

As a side note, you can find a very nice how to on the (updated) required steps to build a (non-debug) OpenSolaris from the Solaris Express Community Release distribution, written by well known Dennis Clarke.

Not yet tested myself, but i hope to do so in the next days, or weeks...

Friday 28 October 2005

FreeBSD LORs (Lock Order Reversal)

I encountered two LORs in the past, especially during the testing phase of the just behind the corner FreeBSD 6.0 release.

I already reported about two of them, but wanted to point out that the second seems to be fixed, as shown in this patch. Regrettably, the MFC seem not to have taken place in the RELENG_6 branch... yet. On the other side, this one is not known to generate panic or some other bad behavior, so i think it is ok.

Sunday 21 August 2005

Compile and Install a New Kernel on Red Hat Advanced Server 2.1

To be able to recompile our Linux kernel for our IBM Blade Center, here are a listing of the necessary prerequisites:

  • Have the sources installed and available under /usr/src/linux-2.4.9-e.35
  • The bcm5700 driver located at /usr/src/redhat (provided by IBM)
  • Our standard configuration kernel file, i.e. .config provided as an attached file

Adapt our custom kernel configuration file and the top Makefile:

# cd /usr/src/linux-2.4.9-e.35   /* Go the top sources directory. */
# make mrproper                  /* Make sure you have no stale .o files and
                                    dependencies lying around. */
# sum .config                    /* Verify our customized kernel configuration
64319    16                         file. */
# make oldmenu                   /* Default all questions based on the contents
                                    of the existing .config file. */
# cp Makefile Makefile.orig      /* Check the top Makefile for further
                                    site-dependent configuration. */
# diff -u Makefile.orig Makefile
--- Makefile.orig    Wed Aug 17 12:51:14 2005
+++ Makefile Tue Aug 16 14:43:16 2005
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 9
-EXTRAVERSION = -e.35
+EXTRAVERSION = -e.35smp-custom
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 

Build and install the corresponding custom modules and kernel:

# make dep               /* Set up all the dependencies correctly. */
# make j4 bzImage        /* Create a compressed kernel image. */
# make j4 modules        /* Create the chosen modules. */
# make modules_install   /* Install the corresponding modules. */
# make install           /* Install the newly created kernel. */

Add it to the boot loader:

# cd /boot/grub
# cp -p grub.conf /boot/grub/grub.conf.orig
# diff -u grub.conf.orig grub.conf     
--- grub.conf.orig      Wed Aug 17 17:26:25 2005
+++ grub.conf   Wed Aug 17 17:29:35 2005
@@ -10,6 +10,10 @@
 default=0
 timeout=5
 splashimage=(hd0,0)/grub/splash.xpm.gz
+title Red Hat Enterprise (2.4.9-e.35smp-custom)
+       root (hd0,0)
+       kernel /vmlinuz-2.4.9-e.35smp-custom ro root=/dev/hda2
+       initrd /initrd-2.4.9-e.35smp.img
 title Red Hat Linux (2.4.9-e.35smp)
        root (hd0,0)
        kernel /vmlinuz-2.4.9-e.35smp ro root=/dev/hda2

Verify the files are present in /boot!

Verify that all these new stuffs are OK, then reinstall the network driver using the provided RPM package:

# shutdown -ry now
/*
 * If all is ok, then access the machine through the IBM Management Module
 * Console (MMC).
 */
# cd /usr/src/redhat
# rpm bb SPECS/bcm5700.spec
# rpm ivh --force RPMS/i386/bcm5700-8.1.11-1.i386.rpm
# grep bcm5700 /etc/modules.conf
alias eth0 bcm5700
alias eth1 bcm5700
# modprobe bcm5700

Test if the network is running OK for now, then reboot.