Ubuntu on Proliant DL320e Gen8 with B120i RAID

:date: 2014-08-22
:category: computing
:tags: ubuntu, server, system, raid
:author: alf

Well long story short, I won't go into much detail about the reason of the problems I have faced running Ubuntu on this machine. Anyone reading here already know about them. The main problems were:

B120i 'Smart' Array Controller not recognized; Ubuntu installer lists the physical disks.

Well actually the real problem lies in the device firmware, RAID controller is not that 'Smart', it's a fake software RAID.

Your option in order to install Ubuntu is to disable Smart Array Controller and take it into the SATA AHCI mode.

Well it sounds ok at first sight, but you realise the really annoying problem after the installation completes and you boot up the OS. The very high and annoying noise like a vacuum cleaner, I suppose it's coming from the HDD fans, from which the Smart Array Controller is responsible to measure the thermo sensors and adjust the fan speeds accordingly. Since the Smart Array Controller is not in use, the problem of noise araise. (Actually I am not 100% sure about the root cause of the problem, this is what I figure out from what I've read around the net.)

Let's get up the solution; honestly this was really a pain to figure it out. First of all, good news, HP provides a driver for the Smart Array Controller but not offically declaring it as supported. Here is the link to the driver called hpvsa.
[https://launchpad.net/~hp-iss-team/+archive/ubuntu/hp-storage]

The support is for Ubuntu 12.04 and 14.04. I have succeeded applying it for 14.04(Trusty) but the procedure should be similar for the 12.04.

The procedure is as follows:

  1. From the hpvsa driver link above, download all packages for the relevant Ubuntu version. I believe the hp-storage.udeb and hpvsa.deb packages are of importance.
  2. Make a driver injection disk out of those packages.
  3. Install Ubuntu with driver injection and ahci disabled from a USB stick.
  4. DO NOT REBOOT after the installation, change to another terminal and chroot to installed /target.
  5. Add hpvsa ppa to apt sources and install the very same version of hpvsa.
  6. Add hpvsa module to initramfs and kernel boot up modules.
  7. :code:update-initramfs
  8. Blacklist ahci in grub and :code:update-grub.

Let's get more into details now..

Download Smart Array Controller Drivers

As mentioned above, go ahead and download the package files for Trusty from here:

https://launchpad.net/~hp-iss-team/+archive/ubuntu/hp-storage/+packages

Packages namely:

  • hp-storage-3.13.0-24-generic-di_1.2.10-120ubuntu15_amd64.udeb (625.5 KiB)
  • hpvsa-3.13.0-24-generic_1.2.10-120ubuntu15_amd64.deb (629.8 KiB)
  • hpvsa-common_1.2.10-120ubuntu15_amd64.deb (1.9 KiB)
  • hpvsa_1.2.10-120ubuntu15.dsc (1.3 KiB)
  • hpvsa_1.2.10-120ubuntu15.tar.gz (810.3 KiB)
  • hpvsa_1.2.10-120ubuntu15_amd64.deb (1.8 KiB)

Make a driver injection disk

Grab a USB stick, make a primary partition(with fstab) and format it in FAT32. And label it OEMDRV, this is a MUST.

.. code-block:: shell-session

alf@melmac:~$ mkfs.vfat -F 32 -n OEMDRV /dev/sdb1

Mount the usb stick and put those packages in the following paths::

/media/OEMDRV
/media/OEMDRV/driver-injection-disk/Ubuntu-drivers/trusty/
/media/OEMDRV/Ubuntu-drivers/trusty/

To be honest, there were different notes on net about where to put driver injection disk files, so I put them all everywhere anyone has suggested.

Install Ubuntu (not that straightforward)

Make a USB stick from Ubuntu Server 14.04 preferably with Ubuntu usb-creator. You will NOT be able to install from the CD-ROM.

Boot with both USB sticks(Ubuntu and Driver Injection Disk) installed. On the installation selection screen press F6 and write the following before the -- sign.

:code:modprobe.blacklist=ahci anna/choose_modules=driver-injection-disk-detect

Those will disable ahci and enable the driver injection disk look-up. We need to disable ahci in order for hpvsa to take control of the Smart Array Controller, otherwise ahci does not let that happen. But disabling ahci will have the side-effect of installation CD-ROM not being recognized. This is why we are installing via USB stick.

Ok, now continue installation as usual, until the last step! On last step DO NOT REBOOT.

Post Install Setup for Smart Array Controller (Before Reboot)

Now before you reboot, there are some very important things to do. The hpvsa driver installation we have done so far were applied in installation process NOT in the installed system. So somehow we need to install the driver to the newly installed Ubuntu system otherwise Ubuntu will boot in AHCI mode without recognizing the RAID controller and will very likely cause a lot of trouble to you.

So this is how we do it; switch to another Terminal Ctrl + Alt + F2 and get a shell prompt.
Type :code:mount and ensure /proc and /dev filesystems are mounted to the /target mount point.
/target is where our installed Ubuntu system lies. Now chroot into the target,
:code:chroot /target and get a bash shell :code:/bin/bash.

We will install the hpvsa driver first;

.. code-block:: shell-session

root@ubuntu:/# add-apt-repository ppa:hp-iss-team/hp-storage
root@ubuntu:/# apt-get update
root@ubuntu:/# apt-get install hpvsa-3.13.0-24-generic

All good so far, we need to tell initramfs and kernel to load hpvsa module. So add hpvsa line to the following files::

/etc/initramfs-tools/modules
/etc/modules

Now let's update initrd.

.. code-block:: shell-session

root@ubuntu:/# update-initramfs -u

So are we done, NO. We need to disable ahci on the installed system, we do that by blacklisting it on grub. Go ahead and edit the line in /etc/default/grub file as following.

.. code-block:: bash

GRUB_CMDLINE_LINUX_DEFAULT="modprobe.blacklist=ahci"

Lastly update the grub installation.

.. code-block:: shell-session

root@ubuntu:/# update-grub

YES, we are DONE. Now exit the chroot and change back to the installation screen and REBOOT.

Now you can enjoy your server in silence :)