Compile the Huawei ES3000 PCIe SSD driver for CentOS 7 or RHEL7

The Huawei ES3000 is an SSD accelerator card connected to the PCIe bus which delivers exceptional performance. Today, I found out that Huawei doesn’t provide any ready made drivers to use a Huawei ES3000 PCIe SSD on a system running a Linux kernel > 3.x. This means that it’s not possible to use it on RHEL 7 or CentOS 7 or any other modern Linux distribution that uses a kernel newer than version Fortunately it’s not difficult to compile the driver, install it and start to use the SSD accelerator with a newer kernel.

Huawei provides a document that describes how to compile the drivers for the ES3000 but it’s written for CentOS 6.5 and I found that some dependencies for the compilation didn’t exist anymore and had to be solved. The driver can be compiled on a system that doesn’t contain an ES3000 and then used on another system. This doesn’t leave you with unwanted packages on the system containing the, rather expensive, SSD.

Before we can start, we need to find the missing package, they’re called ppl and cloog-ppl. Fortunately, an RPM exists for them for FC19 and it can be installed without any issues.

[jensd@cen ~]$ sudo yum -y install
[jensd@cen ~]$ sudo yum install

In case the packages would disappear, I created a mirror for them:

After we installed the missing dependencies, we can install the rest of the dependencies:

[jensd@cen ~]$ yum install mpfr cpp kernel-headers glibc-headers glibc-devel libstdc++-devel libgomp gcc gcc-c++ perl-Pod-Escapes perl-version perl-libs perl-Pod-Simple perl-Module-Pluggable perl kernel-devel kernel-firmware unzip
Complete !

Now that we have all required packages for the compilation, you can download the drivers’ source from the Huawei website. For this post, I used source version

As with the packages, I created a mirror for the source in case it would disappear in the future. You can find it here:

After downloading the driver to the system, unzip the source and compile it:

[jensd@cen ~]$ unzip
[jensd@cen ~]$ cd Linux/src/hio/
[jensd@cen ~ hio]$ make
make -C /lib/modules/3.10.0-123.13.2.el7.x86_64/build M=/home/jensd/Linux/src/hio EXTRA_CFLAGS="" modules
make[1]: Entering directory `/usr/src/kernels/3.10.0-123.13.2.el7.x86_64'
  CC [M]  /home/jendep/Linux/src/hio/hio.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/jendep/Linux/src/hio/hio.mod.o
  LD [M]  /home/jendep/Linux/src/hio/hio.ko
make[1]: Leaving directory `/usr/src/kernels/3.10.0-123.13.2.el7.x86_64'
[jensd@cen ~]$ ls
hio.c  hio.h  hio.ko  hio.mod.c  hio.mod.o  hio.o  Makefile  modules.order  Module.symvers

As you can see, we ended up with the necessary kernel module hio.ko, compiled for our recent 3.10.0-123-13.2 kernel.

In case you compiled the driver on another system, first copy the file to the system that has the ES3000 before executing the next steps.

[root@cen2 ~]# scp jensd@cen:/home/jensd/Linux/src/hio/hio.ko ~

Once the system that has the ES3000 contains hio.ko, to use the module, we can simply install and load it.

[root@cen2 ~]# mkdir -p /lib/modules/`uname -r`/kernel/drivers/hio
[root@cen2 ~]# cp hio.ko /lib/modules/`uname -r`/kernel/drivers/hio
[root@cen2 ~]# depmod -a
[root@cen2 ~]# modprobe hio

If all goes well, the device should show up as /dev/hio and we can create a partition on it:

[jensd@cen2 ~]$ lsblk /dev/hioa
hioa 252:0 0 1.1T 0 disk
└─hioa1 252:1 0 1.1T 0 part

At this time, the device /dev/hioa can be used but in order to use the new disk as physical volume for LVM, you need to allow devices with name hio* in the LVM configuration. If you don’t, you will get something like this:

[root@cen2 ~]# pvcreate /dev/hioa1
 Physical volume /dev/hioa1 not found
 Device /dev/hioa1 not found (or ignored by filtering).

To allow devices with name hio*, add the following to /etc/lvm/lvm.conf (line 128 in my configuration file):

types = [ "hio", 16 ]

After the change, a PV can be created using /dev/hioa1:

 [root@be-plw-kvm-0001 ~]# pvcreate /dev/hioa1
 Physical volume "/dev/hioa1" successfully created

Hopefully this can help someone that doesn’t find a suited driver for the 3.x kernel. While actually it’s about time that Huawei will start support for RHEL 7, which I assume is a commonly used OS for the target audience for the ES3000.

1 thought on “Compile the Huawei ES3000 PCIe SSD driver for CentOS 7 or RHEL7

Leave a Reply

Your email address will not be published. Required fields are marked *