Login [Lost Password] 
Email:
Password:
Remember:           
 Search
 Article Options

 Upgrading LSI MegaRAID SAS Driver on RHEL/CentOS 5/6

Solution

Upgrading MegaRAID SAS Driver on RHEL & CentOS

CentOS / RHEL 5 & 6

This guide assumes that the binary driver was installed as part of the system install process.

Stage 1: Prepare System

  1. Download & extract Linux driver package from LSI.com. This should include all the device driver disk images as well as the source tarball.
  2. Backup initramfs for current kernel in case something bad happens.
  3. Install gcc if not installed with 'yum install gcc'.
  4. Install kernel-devel for the installed kernel with 'yum install kernel-devel'. Use the c6-media repository if necessary to get the kernel-devel for the installed kernel off the CDROM. If no CD is available then the package can be downloaded from  http://vault.centos.org/.
  5. If system was installed with Minimum package set then perl and make are also needed.

Stage 2: Replace Binary Driver with DKMS Driver

  1. (RHEL/CentOS 6 Only) Remove the binary driver with 'yum erase kmod-megaraid-sas'.
  2. Install dkms RPM and the megaraid_sasXXXXX.noarch.rpm with 'yum install --nogpgcheck dkms* megaraid_sas*noarch.rpm' to get the source driver built and installed for the current kernel.
  3. Reboot to ensure the built driver is compatible and functional. If the boot fails, revert to the previous initramfs by editing the boot command line and changing the initrd= word to correspond to the backed-up initramfs.

Stage 3: Update System & Install DKMS Driver in New Kernel

  1. Run 'yum update' to upgrade system to current.
  2. Run 'yum install kernel-devel' to ensure the kernel-devel package for the new kernel is installed. The update usually performs this step automatically so this step may indicate the package is already installed.
  3. Run 'dkms status' to view the currently installed modules. Note the module name (first field) and version number (second field). It may note that a driver is installed 'weak' for the new kernel, this is OK; you can use this to get the new kernel version. Otherwise get it from 'rpm -qi kernel' or by looking at the installed files in /boot.
  4. Tell DKMS to build then install the driver for the new kernel. The arguments specify the module name with -m, the module version with -v, and the target kernel version with -k. This command line is for RHEL 6.2 with updates, at the time of this writing:
    # dkms build -m megaraid_sas -v v00.00.05.40 -k 2.6.32-220.4.2.el6.x86_64
    # dkms install -m megaraid_sas -v v00.00.05.40 -k 2.6.32-220.4.2.el6.x86_64
    
  5. Run 'dkms status' again to confirm the driver was installed in the updated kernel. Ignore any 'installed-weak' lines.
  6. Reboot and test that the driver is loaded.
  7. On RHEL/CentOS 6.x, if space is needed in /boot, the initrd files without 'kdump' in their name may be removed. These are a byproduct of the method the version of dkms shipped with the LSI MegaRAID driver uses to build the initramfs and are not needed.


Article Details
Article ID: 150
Created On: 16 Feb 2012 01:02 AM

 This answer was helpful  This answer was not helpful