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).

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:
- Download and install ovzkernel & ovzkernel-devel (use PAE if neccessary)
- 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
- Extract the zip file,then cd to shim/library/rhel5-32
- do
make -C /usr/src/kernels/2.6.18-53.el5.028stab051.1-PAE-i686 M=$PWD
- copy the megasr.ko in /lib/modules/2.6.18-53.el5.028stab051.1-PAE-i686/updates
-
depmod 2.6.18-53.el5.028stab051.1-PAE-i686
-
/sbin/mkinitrd /boot/initrd-2.6.18-53.el5.028stab051.1PAE.img 2.6.18-53.el5.028stab051.1PAE
- reboot!
NOTE: don’t copy paste, since the kernel version will always been updated
hope this help someone else, at least me
thanks for RUBEN for the correction

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)
Ouch sorry for the typo, it has been corrected
Thanks Ruben
# 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!