Highpoint sell a line of low-cost disk and RAID controllers with Linux drivers and utilities. While the price point of these devices is excellent, you get what you pay for to an extent; reports of their tech-support are mixed at best (I’ve not experienced it myself) and the quality of their install documentation and packages aren’t great.
I recently purchased a 640L RAID controller and spent more than 2 days getting it working with the current Debian stable. After much wailing and gnashing of teeth I’ve ironed out all the kinks and the result is not too bad. Write speeds >300MB/s and read speeds of around 200MB/s across 3 Western Digital “Red” 1TB HDDs in a RAID 5 configuration. That’s is about as good as you could reasonably expect from this arrangement.
So that you don’t have to experience the same frustration, and because I couldn’t find any similar documentation online when I was looking, here is a step-by-step to getting the driver and utilities installed on Debian “Wheezy”
Note: I’ve done this on 64 bit Debian (amd64) but the same instructions should work for the 32 bit (i686) version, just make sure you download the appropriate software versions for your architecture from Highpoint and substitute filenames as needed.
Note 2: I’m also assuming you’re using the stock Debian “linux-image-amd64” kernel. If you’re not, I assume you will also know how to figure out the required substitutions.
Installing the Driver
PrerequisitesWe will be compiling from source so we will require some additional packages. Use apt-get or aptitude to install these:
- build-essential
- linux-headers-amd64
- dkms (optional, see below)
The latest driver for the 640L at the time of writing is v1.3, available on the Highpoint-tech.com download page under “Open Source Driver” at the bottom of the page:
http://www.highpoint-tech.com/USA_new/series_rr600-download.htm
Download and unpack this tarball, I unpacked it into /usr/src/ then compile the driver to test everything’s working ok:
root@debian:/usr/src# tar -zxf RR64xl-Linux-Src-v1.3-130325-0207.tar.gz
…
root@debian:/usr/src# cd rr64xl-linux-src-v1.3/product/rr64xl/linux/
root@debian:/usr/src/rr64xl-linux-src-v1.3/product/rr64xl/linux# make
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-4-amd64’
CC [M] /usr/src/rr64xl-linux-src-v1.3/product/rr64xl/linux/.build/os_linux.o
CC [M] /usr/src/rr64xl-linux-src-v1.3/product/rr64xl/linux/.build/osm_linux.o
CC [M] /usr/src/rr64xl-linux-src-v1.3/product/rr64xl/linux/.build/div64.o
CC [M] /usr/src/rr64xl-linux-src-v1.3/product/rr64xl/linux/.build/hptinfo.o
CC [M] /usr/src/rr64xl-linux-src-v1.3/product/rr64xl/linux/.build/config.o
LD [M] /usr/src/rr64xl-linux-src-v1.3/product/rr64xl/linux/.build/rr640l.o
Building modules, stage 2.
MODPOST 1 modules
CC /usr/src/rr64xl-linux-src-v1.3/product/rr64xl/linux/.build/rr640l.mod.o
LD [M] /usr/src/rr64xl-linux-src-v1.3/product/rr64xl/linux/.build/rr640l.ko
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-4-amd64’
At this point, if you’re only after the driver, you can just type “make install” and the module will be installed into the kernel module tree (in /lib/modules) after which you can type “modprobe rr640l” and you’re done. However if you do this, you will have to recompile the driver every time the kernel gets updated.
A better way is to use DKMS to automatically compile the module whenever a new kernel is installed.
It’s worth noting that we’re going to custom compile a kernel below in order to get the command line utilities working anyway, so there’s going to be a manual process each time a kernel update comes out anyway, so it’s up to you whether you want to bother with this.
(This process comes originally from here: https://help.ubuntu.com/community/RocketRaid which was written for Ubuntu. We only need the DKMS part)
DKMSDKMS (Dynamic Kernel Module Support) is used to compile kernel modules “on demand” and is most commonly used for proprietary video drivers. We’ll use it to automatically compile and install the RocketRAID driver whenever a new kernel is installed.
Start by installing the ‘dkms’ package if you haven’t already.
Create a DKMS config file:
root@debian:/usr/src/rr64xl-linux-src-v1.3/product/rr64xl/linux# cd ../../../
root@debian:/usr/src/rr64xl-linux-src-v1.3# echo 'MAKE=“make -C product/rr64xl/linux/ KERNELDIR=/lib/modules/${kernelver}/build”
CLEAN=“make -C product/rr64xl/linux/ clean”
BUILT_MODULE_NAME=rr640l
DEST_MODULE_LOCATION=/kernel/drivers/scsi/
BUILT_MODULE_LOCATION=product/rr64xl/linux/
PACKAGE_NAME=rr640l
PACKAGE_VERSION=1.3
AUTOINSTALL=yes
REMAKE_INITRD=yes’ > dkms.conf
Tell DKMS about the module
root@debian:/usr/src/rr64xl-linux-src-v1.3# cd ..
root@debian:/usr/src# ln -s rr64xl-linux-src-v1.3/ rr64xl-1.3
root@debian:/usr/src# dkms add -m rr64xl -v 1.3
Creating symlink /var/lib/dkms/rr64xl/1.3/source ->
/usr/src/rr64xl-1.3
DKMS: add completed.
Then build and install the module
root@debian:/usr/src# dkms build -m rr64xl -v 1.3
Kernel preparation unnecessary for this kernel. Skipping…
Building module:
cleaning build area….
make KERNELRELEASE=3.2.0-4-amd64 -C product/rr64xl/linux/ KERNELDIR=/lib/modules/3.2.0-4-amd64/build….
cleaning build area….
DKMS: build completed.
root@debian:/usr/src# dkms install -m rr64xl -v 1.3
rr640l:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/3.2.0-4-amd64/updates/dkms/
depmod……
Backing up initrd.img-3.2.0-4-amd64 to /boot/initrd.img-3.2.0-4-amd64.old-dkms
Making new initrd.img-3.2.0-4-amd64
(If next boot fails, revert to initrd.img-3.2.0-4-amd64.old-dkms image)
update-initramfs…..
DKMS: install completed.
Finally modprobe the module and you should now be able to see the raid disk(s)
root@debian:/usr/src# modprobe rr640l
root@debian:/usr/src# dmesg
…
[ 2549.744360] rr640l: module license 'Proprietary’ taints kernel.
[ 2549.744367] Disabling lock debugging due to kernel taint
[ 2549.746481] rr640l:RocketRAID 640L/642L/644L/RR644LS SATA controller driver v1.3 (Jan 3 2014 08:47:31)
[ 2549.973526] pci 0000:05:00.0: setting latency timer to 64
[ 2549.973541] rr640l:adapter at PCI 5:0:0, IRQ 16
[ 2550.197780] rr640l:[0 0 ] start port.
[ 2550.197782] rr640l:[0 0 ] start port hard reset (probe 1).
[ 2550.395625] rr640l:[0 1 ] start port.
[ 2550.395626] rr640l:[0 1 ] start port hard reset (probe 1).
[ 2550.593468] rr640l:[0 2 ] start port.
[ 2550.593469] rr640l:[0 2 ] start port hard reset (probe 1).
[ 2550.791312] rr640l:[0 3 ] start port.
[ 2550.791312] rr640l:[0 3 ] start port hard reset (probe 1).
[ 2553.103466] rr640l:[0 3 ] failed to hard reset.
[ 2553.103479] rr640l:[0 3 ] failed to perform port hard reset.
[ 2553.270981] rr640l:[0 0 ] start port soft reset (probe 1).
[ 2553.916670] rr640l:[0 1 ] start port soft reset (probe 1).
[ 2554.562359] rr640l:[0 2 ] start port soft reset (probe 1).
[ 2555.212057] rr640l:[0 0 ] port started successfully.
[ 2555.212061] rr640l:[0 0 0] device probed successfully.
[ 2555.246382] rr640l:Backup stamp 5261775f sum 0 backed 1
[ 2555.252348] rr640l:Master stamp 5261775f sum 0 backed 1
[ 2555.252355] rr640l:raw ffff880231608438 bad_sector 0
[ 2555.256351] rr640l:[0 1 ] port started successfully.
[ 2555.256355] rr640l:[0 1 0] device probed successfully.
[ 2555.291675] rr640l:Backup stamp 5261775f sum 0 backed 1
[ 2555.301613] rr640l:Master stamp 5261775f sum 0 backed 1
[ 2555.301619] rr640l:raw ffff8802314b3838 bad_sector 0
[ 2555.305614] rr640l:[0 2 ] port started successfully.
[ 2555.305618] rr640l:[0 2 0] device probed successfully.
[ 2555.340942] rr640l:Backup stamp 5261775f sum 0 backed 1
[ 2555.343930] rr640l:Master stamp 5261775f sum 0 backed 1
[ 2555.343936] rr640l:raw ffff880232668838 bad_sector 0
[ 2555.350082] scsi6 : rr640l
[ 2555.350354] scsi 6:0:0:0: Direct-Access HPT DISK_6_0 4.00 PQ: 0 ANSI: 5
[ 2555.350977] sd 6:0:0:0: [sdc] 3906732032 512-byte logical blocks: (2.00 TB/1.81 TiB)
[ 2555.350983] sd 6:0:0:0: Attached scsi generic sg2 type 0
[ 2555.351048] sd 6:0:0:0: [sdc] Write Protect is off
[ 2555.351060] sd 6:0:0:0: [sdc] Mode Sense: 2f 00 00 00
[ 2555.351129] sd 6:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn’t support DPO or FUA
[ 2555.410387] sdc: sdc1 sdc2 sdc3
[ 2555.410932] sd 6:0:0:0: [sdc] Attached SCSI disk
root@debian:/usr/src# cat /proc/partitions
major minor #blocks name
…
8 32 1953366016 sdc
…
Again, if all you’re after is the driver you can stop here. The module will be automatically recompiled when new kernel versions are installed so you shouldn’t have to worry about it any more. You can now start partitioning and using your disk(s).
Installing the Utilities
The command line utility (hptraidconf) uses a local daemon (hptsrv) to talk to the controller, but this daemon required legacy scsi 'proc’ filesystem support which no longer ships with the default Debian kernel. It’s a very minor change to compile a new kernel with this change however.
Custom KernelFirst install these additional packages which are needed to build the new kernel, then we need a few more packages which the build process depends on:
root@debian:/usr/src# apt-get install devscripts fakeroot
…
root@debian:/usr/src# apt-get build-dep linux
…
Then we need to download the source for the kernel:
root@debian:/usr/src# apt-get install linux-source
…
Alter the kernel configuration and build the kernel packages (this will take a long time):
root@debian:/usr/src# tar -jxf linux-source-3.2.tar.bz2
root@debian:/usr/src# cd linux-source-3.2/
root@debian:/usr/src/linux-source-3.2# cp /boot/config-3.2.0-4-amd64 .config
root@debian:/usr/src/linux-source-3.2# sed -i ’s/# CONFIG_SCSI_PROC_FS is not set/CONFIG_SCSI_PROC_FS=y/’ .config
root@debian:/usr/src/linux-source-3.2# scripts/config –disable DEBUG_INFO
root@debian:/usr/src/linux-source-3.2# make clean
root@debian:/usr/src/linux-source-3.2# make deb-pkg
…
root@debian:/usr/src/linux-source-3.2# cd ..
root@debian:/usr/src# dpkg -i linux-image-3.2.51_3.2.51-1_amd64.deb linux-headers-3.2.51_3.2.51-1_amd64.deb
Selecting previously unselected package linux-image-3.2.51.
(Reading database … 45770 files and directories currently installed.)
Unpacking linux-image-3.2.51 (from linux-image-3.2.51_3.2.51-1_amd64.deb) …
Selecting previously unselected package linux-headers-3.2.51.
Unpacking linux-headers-3.2.51 (from linux-headers-3.2.51_3.2.51-1_amd64.deb) …
Setting up linux-image-3.2.51 (3.2.51-1) …
: Unable to find an initial ram disk that I know how to handle.
Will not try to make an initrd.
update-initramfs: Generating /boot/initrd.img-3.2.51
Generating grub.cfg …
Found linux image: /boot/vmlinuz-3.2.51
Found initrd image: /boot/initrd.img-3.2.51
Found linux image: /boot/vmlinuz-3.2.0-4-amd64
Found initrd image: /boot/initrd.img-3.2.0-4-amd64
grub-probe: error: no such disk.
grub-probe: error: no such disk.
done
Setting up linux-headers-3.2.51 (3.2.51-1) …
Reboot onto the new kernel and you should now be able to see ’/proc/scsi’:
root@debian:~# ls -la /proc/scsi/
total 0
dr-xr-xr-x 4 root root 0 Jan 3 12:49 .
dr-xr-xr-x 117 root root 0 Jan 3 12:48 ..
-r-−r-−r-− 1 root root 0 Jan 3 12:49 device_info
dr-xr-xr-x 2 root root 0 Jan 3 12:49 rr640l
-r-−r-−r-− 1 root root 0 Jan 3 12:49 scsi
dr-xr-xr-x 2 root root 0 Jan 3 12:49 sg
This is the daemon which talks directly to the hardware. This is not required if you plan to install the Web GUI.
Highpoint provide a deb package for this, but it’s a little broken. The fix is simple though:
root@debian:/usr/src# tar -zxf CLI-Linux-3.5-100701.tgz
root@debian:/usr/src# cd CLI-Linux-3.5-100701/deb/
root@debian:/usr/src/CLI-Linux-3.5-100701/deb# dpkg -i hptsvr_3.13-7_amd64.deb
Selecting previously unselected package hptsvr.
(Reading database … 62313 files and directories currently installed.)
Unpacking hptsvr (from hptsvr_3.13-7_amd64.deb) …
Setting up hptsvr (3.13-7) …
Can’t detect any supported driver automatically.
hptmv6 is used by default.
The install will pause at this point, press enter to make it continue
/var/lib/dpkg/info/hptsvr.postinst: 242: [: unexpected operator
update-rc.d: using dependency based boot sequencing
insserv: warning: script 'hptdaemon’ missing LSB tags and overrides
Starting hptsvr daemonstart-stop-daemon: unable to stat /usr/bin/hptsvr (No such file or directory)
.
Ignore the error, the binary has been installed, but we need to fix some things before it will start:
root@debian:/usr/src/CLI-Linux-3.5-100701/deb# echo rr640l > /etc/hptcfg
root@debian:/usr/src/CLI-Linux-3.5-100701/deb# ln -s /bin/hptsvr /usr/bin/
root@debian:/usr/src/CLI-Linux-3.5-100701/deb# /etc/init.d/hptdaemon start
Starting hptsvr daemon.
This is the command line interface used to query and configure the controller through the hptsrv daemon. Do not install it if you plan to use the web GUI.
Highpoint also provide a deb package for this, but it is also broken. Luckily the fix is also pretty simple.
root@debian:/usr/src/CLI-Linux-3.5-100701/deb# dpkg -i hptraidconf_3.5_amd64.deb
Selecting previously unselected package hptraidconf.
(Reading database … 62330 files and directories currently installed.)
Unpacking hptraidconf (from hptraidconf_3.5_amd64.deb) …
Setting up hptraidconf (3.5) …
dpkg (subprocess): unable to execute installed post-installation script (/var/lib/dpkg/info/hptraidconf.postinst): No such file or directory
dpkg: error processing hptraidconf (–install):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
hptraidconf
We need to fix their bad installer before we can continue:
root@debian:/usr/src/CLI-Linux-3.5-100701/deb# rm /var/lib/dpkg/info/hptraidconf.postinst
root@debian:/usr/src/CLI-Linux-3.5-100701/deb# echo ’#!/bin/bash’ > /var/lib/dpkg/info/hptraidconf.postinst
Then complete the installation:
root@debian:/usr/src/CLI-Linux-3.5-100701/deb# apt-get -f install
Reading package lists… Done
Building dependency tree
Reading state information… Done
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up hptraidconf (3.5) …
Test the utility works (the username is 'RAID’ and the password is 'hpt’):
root@debian:/usr/src/CLI-Linux-3.5-100701/deb# hptraidconf
HighPoint RAID Management Command Line Utility v3.3
Copyright © 2009 HighPoint Technologies, Inc. All rights reserved.
Login:RAID
Password:
HighPoint CLI>query arrays
ID Capacity(GB) Type Status Block Sector Cache Name
——————————————————————————-
1 2000.25 RAID5 NORMAL 64k 512B WB RAID_5_0
Press Ctrl-D to log out.
hptsrv-https (WebGUI)I recommend installing either the CLI or the web GUI, not both.
Highpoint only provide RPM packages for this, so we will need alien to convert to deb packages.
root@debian:/usr/src# apt-get install alien
Unpack and convert and install the package:
root@debian:/usr/src# tar -zxf WebGUI-Linux-v2.1.5-130409.tgz
root@debian:/usr/src# alien –scripts hptsvr-https-2.1.5-13.0409.x86_64.rpm
hptsvr-https_2.1.5-14.0409_amd64.deb generated
root@debian:/usr/src# dpkg -i hptsvr-https_2.1.5-14.0409_amd64.deb
Selecting previously unselected package hptsvr-https.
(Reading database … 62625 files and directories currently installed.)
Unpacking hptsvr-https (from hptsvr-https_2.1.5-14.0409_amd64.deb) …
Setting up hptsvr-https (2.1.5-14.0409) …
update-rc.d: using dependency based boot sequencing
insserv: warning: script 'hptdaemon’ missing LSB tags and overrides
Starting hptsvr daemon.
Warning: Can not find a Web browser which can work with Web RAID Management.
Mozilla, Firefox are recommended.
Please link the browser to hptbrowser by command ln.
example: ln -sf /usr/bin/hptbrowser /usr/local/bin/mozilla
Ignore the warning about the browser.
If you haven’t already, prime the configuration file and start the service:
root@debian:/usr/src# echo rr640l > /etc/hptcfg
root@debian:/usr/src# /etc/init.d/hptdaemon start
Starting hptsvr daemon.
You should now be able to point a browser at your server, port 7402 and access the web interface. The default username is 'RAID’ and the password is 'hpt’