howto build brocade hba drivers for PureDisk

Article:HOWTO54475  |  Created: 2011-06-10  |  Updated: 2011-07-02  |  Article URL http://www.symantec.com/docs/HOWTO54475
Article Type
How To



Identify your brocade hba model and download appropriate driver from http://www.brocade.com/services-support/drivers-downloads/HBA/index.page

 

As PureDisk kernel version can deviate from standard SLES10 SP2 (depending on PureDisk patch version), the pre-built drivers available from Brocade often will not load.

 

Building these drivers is a simple process as they supply the source code in RPM format.

 

e.g. At the time of writing, the current version of the Brocade 425 hba is 2.3.0.3 (brocade_driver_linux_sles10sp2_2.3.0.3.tar.gz)

# tar tvfz brocade_driver_linux_sles10sp2_2.3.0.3.tar.gz
-r-xr-x--- swrel/sw-team 1286216 2011-02-11 10:20:28 bfa_driver_linux-2.3.0.3-0.noarch.rpm
-r-xr-x--- swrel/sw-team 42651994 2011-02-11 10:20:33 bfa_util_linux-2.3.0.3-0.noarch.rpm
-r-xr-x--- swrel/sw-team  1137935 2011-02-11 10:20:34 bna_driver_linux-2.3.0.3-0.noarch.rpm
-rw-rw-r-- swrel/sw-team  1083994 2011-02-11 10:20:38 brocade-bfa-2.3.0.3-0.src.rpm
-rw-rw-r-- swrel/sw-team   703877 2011-02-11 10:20:34 brocade-bfa-kmp-bigsmp-2.3.0.3_2.6.16.60_0.21-0.i586.rpm
-rw-rw-r-- swrel/sw-team  3470750 2011-02-11 10:20:34 brocade-bfa-kmp-debug-2.3.0.3_2.6.16.60_0.21-0.i586.rpm
-rw-rw-r-- swrel/sw-team  3535946 2011-02-11 10:20:36 brocade-bfa-kmp-debug-2.3.0.3_2.6.16.60_0.21-0.ia64.rpm
 

 

Extract the brocade-bfa-2.3.0.3-0.src.rpm from the compressed tar archive

# tar xvfz brocade_driver_linux_sles10sp2_2.3.0.3.tar.gz brocade-bfa-2.3.0.3-0.src.rpm

 

Install the extracted src.rpm

# rpm -Uvh brocade-bfa-2.3.0.3-0.src.rpm

 

Now modify the brocade bfa 'spec' file to remove dependency on kernel-syms package:

# sed -i 's/kernel-syms//g' /usr/src/packages/SPECS/brocade-bfa-2.3.0.3.spec  

 

Next step is to build the kernel module using the modified brocade bfa spec file:

# rpmbuild -ba /usr/src/packages/SPECS/brocade-bfa-2.3.0.3.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.15735
+ umask 022
+ cd /usr/src/packages/BUILD
+ cd /usr/src/packages/BUILD
+ rm -rf brocade-bfa-2.3.0.3
+ /usr/bin/bzip2 -dc /usr/src/packages/SOURCES/brocade-bfa-2.3.0.3.tar.bz2
+ tar -xvvf -
drwxr-xr-x swrel/sw-team     0 2011-02-05 06:17:58 brocade-bfa-2.3.0.3/
drwxr-xr-x swrel/sw-team     0 2011-02-05 06:17:55 brocade-bfa-2.3.0.3/cna/
-r--r--r-- swrel/sw-team  5261 2011-02-05 06:17:53 brocade-bfa-2.3.0.3/cna/bfa_aen.c
-r--r--r-- swrel/sw-team   887 2011-02-05 06:17:53 brocade-bfa-2.3.0.3/cna/bfa_csdebug.c
[cut]
Wrote: /usr/src/packages/SRPMS/brocade-bfa-2.3.0.3-0.src.rpm
Wrote: /usr/src/packages/RPMS/x86_64/brocade-bfa-kmp-smp-2.3.0.3_2.6.16.60_0.42.7-0.x86_64.rpm
 

 

Eventually, you should see a message similar to

 

'Wrote: /usr/src/packages/RPMS/x86_64/brocade-bfa-kmp-smp-2.3.0.3_2.6.16.60_0.42.7-0.x86_64.rpm'

 

Install this driver :

# rpm -Uvh /usr/src/packages/RPMS/x86_64/brocade-bfa-kmp-smp-2.3.0.3_2.6.16.60_0.42.7-0.x86_64.rpm
Preparing...                ########################################### [100%]
   1:brocade-bfa-kmp-smp    ########################################### [100%]
 

 

Next is to rebuild the module 'dependency' and map files.

# depmod -ae

 

Finally, load the kernel module and confirm the targets via the brocade hba are available:

# modprobe bfa

 

  # lsscsi -g

 

Note: If the kernel is upgraded (via a PureDisk patch), the kernel src RPM will need to be rebuilt once the node has been rebooted with the latest kernel

e.g.

# rpmbuild -ba /usr/src/packages/SPECS/brocade-bfa-2.3.0.3.spec

# rpm -Uvh /usr/src/packages/RPMS/x86_64/brocade-bfa-kmp-smp-2.3.0.3_<kernel version>.rpm    

 

 

 

 



Article URL http://www.symantec.com/docs/HOWTO54475


Terms of use for this information are found in Legal Notices