openvz kernel & megasr scsi on centos / rhel 5

Sudah 5 hari ini saya tidak mengerjakan pekerjaan lain kecuali 1 hal: belajar memahami linux kernel. Ini pun masih kapasitas sebagai user, bukan developer (hiks… betapa malunya).

43271D74-5BFB-46A5-9E2D-9A231C0C0035.jpg
Problem:
My hardware has a LSI MegaRAID 8208ELP (megasr) SCSI SAS controller. It shipped with RHEL 5 driver. I need to setup openVZ, unfortunately, rhel5 based openvz kernel is refusing megasr.ko to be loaded at boot time. Error message at boot was:

Loading megasr.ko module
megasr: disagrees about version of symbol struct_module
insmod: error inserting '/lib/megasr.ko': -1 Invalid module format

From what i’ve googled, they (megasr.ko and ovzkernel) have different kernel ‘version’ so they refused to work together.

Solution:

  1. Download and install ovzkernel & ovzkernel-devel (use PAE if neccessary)
  2. Go to lsi.com, and DON’T download the current version of the driver. Download the previous version. This is the URL: Redhat 5.x or mirrored here
  3. Extract the zip file,then cd to shim/library/rhel5-32
  4. do
    make -C /usr/src/kernels/2.6.18-53.el5.028stab051.1-PAE-i686 M=$PWD
    
  5. copy the megasr.ko in /lib/modules/2.6.18-53.el5.028stab051.1-PAE-i686/updates
  6. depmod 2.6.18-53.el5.028stab051.1-PAE-i686
  7. /sbin/mkinitrd /boot/initrd-2.6.18-53.el5.028stab051.1PAE.img 2.6.18-53.el5.028stab051.1PAE
  8. reboot!

NOTE: don’t copy paste, since the kernel version will always been updated

hope this help someone else, at least me :D

thanks for RUBEN for the correction

3 Comments

RubenApril 19th, 2009 at 5:08 pm

Dear Sayid,

Thank you for sharing this!
It works (also) for the LSI Megaraid 1068E controller on the Supermicro X7SB3-F serverboard.
1 typo, step 7: /sbin/mkinitrd /boot/initrd-2.6.18-53.el5.028stab051.1PAE.img initrd-2.6.18-53.el5.028stab051.1PAE
(without trailing .img)

chenullMay 11th, 2009 at 10:18 pm

Ouch sorry for the typo, it has been corrected

Thanks Ruben

risiyantoFebruary 2nd, 2010 at 3:14 pm

# lspci | grep -i mega
08:00.0 SCSI storage controller: LSI Logic / Symbios Logic M1064E MegaRAID SAS (rev 04)

Kalau kasusku setelah upgrade kernel, gak mau booting dengan kernel yang baru.
pas install centos sih, drivernya dipasang lewat disket.

tadinya ngelu, bagaimana masang driver di disket ke kernel yang baru.
googling kok nemu ini, matur suwun!

Leave a comment

Your comment