Tuesday, April 24, 2012

Intel RS2WC080 + 3TB Hitachi DeskStar + Ubuntu 10.04 LTS

Ubuntu 10.04 LTS is good for servers (long lifecycle), but the packaged drivers for LSI MegaRAID may be too old for the latest PCI-E LSI RAID chipsets (SAS200x, etc.). Mostly these chipsets are found in other vendors' products, and driver source availability varies.

Test system:

  • Intel DX68SO2 Motherboard
  • Intel Xeon W3565 CPU
  • Intel RS2WC080 RAID Controller
  • 1x 32 GB OCZ Onyx SSD
  • 12x 3 TB Hitachi Deskstar H3IK30003254SW
  • Ubuntu 10.04.3 LTS
where the OS lives on the SSD and the 12x comprise a (software) RAID 5 array. Eight Deskstars are on the Intel RAID controller; the remaining four are on the motherboard SATA controller.

The RAID controller found the eight attached drives and automatically configured them as individual JBODs. dmesg shows that the controller initialized properly (module megaraid_sas v4.7) and lists the drives, but they are not enumerated.

Since Intel only provided RPMs, I went to LSI's site to grab the latest driver source. They don't explicitly provide downloads for "Intel" products, but it's all the same driver, so I found a similar card (this one) and grabbed the zip file for Ubuntu 10.04 LTS (v5.30 at time of writing).

The zip file contains three tarballs (whatever!): compiled modules for two specific kernels, and the source. Following the included instructions for "recompiling,"
  1. apt-get install build-essential libncurses5 libncurses5-dev linux-headers-`uname -r`
  2. ln -s /usr/src/linux-headers-`uname -r` /usr/src/linux
  3. unzip Ubuntu_10.04_LTS_05.30.zip
  4. tar zxvf megaraid_sas-v00.00.05.30-src.gz; cd megaraid_sas-v00.00.05.30
  5. make -C /lib/modules/`uname -r`/build/ M=`pwd`
  6. cp megaraid_sas.ko /lib/modules/`uname -r`/kernel/drivers/scsi/megaraid
  7. mv /boot/initrd.img-`uname -r` ~/initrd.img.backup
  8. update-initramfs -c -k `uname -r`
Note that step 6 is wrong in LSI's instructions -- the driver lives in scsi/megaraid/, not in scsi/.

You should now be able to install the new module (no rebooting):
  1. rmmod megaraid_sas
  2. cd /lib/modules/`uname -r`/kernel/drivers/scsi/megaraid
  3. insmod megaraid_sas.ko
`modinfo megaraid_sas` should report the correct version number (5.30), and dmesg should show the drives enumerated.

Now, RAID 'em up! For example (assuming drives have been partitioned), mdadm -Cv /dev/md0 -l5 -n12 /dev/sd[bcdefghijklm]1. Party on.