Contents
|
This HowTo details how to configure DKMS to build and install your RocketRaid driver. This will allow your driver to automatically migrate between kernel updates without your intervention. DKMS is automatically called by the Ubuntu kernel install scripts.
Notice
Powered by four dedicated 5Gb/s controllers, a PCI-E 2.0x4 host interface and UAS, HighPoint's RocketU 1144C is the industry's fastest USB 3.0 storage controller. Buy High Point RocketRAID 640 4 SATA Port PCI-Express 2.0 x4 SATA 6Gb/s RAID Controller: SCSI Port Cards - Amazon.com FREE DELIVERY possible on eligible purchases.
Variations on these instructions will likely work with other RocketRaid (or even other hardware) drivers, but they've at least been tested with the rr62x and rr64x on Maverick 10.10, Natty 11.04, Oneiric 11.10, and Precise 12.04 LTS. In spite of this, this how-to may not be complete and require modifications particular to your setup. Feel free to add modifications in this wiki page. For clarifications on how to use DKMS, the Ubuntu help page and man dkms are always a good place to look.
- Page 39 3 - Installing the RocketRAID 2220 driver for an Existing System Note: If a SCSI adapter is used to boot the system, make sure the RocketRAID 2220 controller BIOS loads/posts after the SCSI adapter’ s BIOS. It may be necessary to move the adapter(s) to another PCI slot.
- Serial attached SCSI (SAS) Cables 6. Savings & Stock. HighPoint SFF-8643 Port to Controller Cable for 4 x SFF-8482 Ports to 4 x SAS Drives (3.3').
Serial Attached SCSI InterfaceWith two external mini-SAS ports, the HighPoint RocketRAID 4322 supports both 3.0 Gb/s SAS and SATA II devices for enhanced flexibility and speed. RAID Support The HighPoint RocketRAID 4322 supports multi-level RAID configuration including RAID 0, 1, 3, 5, 6, 10, 50 and JBOD for better performance, enhanced data.
Warning
As it stands, the instructions are a bit out of date. The latest stuff is at the end, so start there and work backwards. Ubuntu up to 13.10 is mentioned, and mostly 2.6 kernels. An attempt to make the detailed instructions work with a 640L card on Xubuntu 14.04 and kernel 3.13 failed in January 2015.
Prerequisites
- Ubuntu 10.10, 11.04, 11.10, 12.04 (other versions may work as well)
DKMS
RocketRaid 620, 622, 640 or 644 RAID Card
- Kernel Tools and Headers
Aside from the RAID Card, the standard Ubuntu installation should have everything you need, but just in case, the following should pull in anything you're missing:
Updated and simplified procedure for Ubuntu 13.04 or later
(Note for kernel 3.11 and later)
If you get errors about proc_info, your rocket raid driver needs even further patches.
If you are using rr62x, try using this beta source ( it worked for me - Thank You irish-link ): rr62x-linux-src-v1.3.3-130822-17639.tar.gz
If you are using a different driver, try these patches from camper2: rocketraid-linux-3.11-patch-r2.tar.bz2
This procedure will work for both RAID and JBOD configurations, and includes dkms and the latest RocketRaid 62x, 64x, 64xl drivers (thank you to the brave sysadmins who have preceded me on this page).
The drivers are listed here: http://www.highpoint-tech.com/USA_new/series_rr600-download.htm
RocketRaid 62x
RocketRaid 64x
RocketRaid 64xl
Now untar/unzip the files and enter the installation directory. (Path to the directory should not contain any spaces, it could lead to errors when building module.)
RocketRaid 62x
RocketRaid 64x
RocketRaid 64xl
Fix the source code. There are four files to edit, and one to add.
1) Edit: inc/linux/Makefile.def ( rr64xl: inc/linux_32mpa/Makefile.def )
Replace these two lines:
With these two lines:
2) Edit: osm/linux/osm_linux.h
Comment out (or delete) this line:
3 & 4) rr62x, rr64x only. Unnecessary for rr64xl
Edit: osm/linux/os_linux.c & osm/linux/osm_linux.c
For every kmap_atomic and kunmap_atomic comment out the second parameter. e.g.:
becomes:
5) Create dkms.conf in the root of your build, containing:
RocketRaid 62x
RocketRaid 64x
RocketRaid 64xl
Now build and install.
The following is for rr62x v1.2. If you are building one of the others, please substitute rr64x v1.1, or rr64xl v1.3 wherever you see rr62x or v1.2. ( Also note that the rr64xl module is named rr640l, not rr64xl as we would expect. )
You should get something like this:
Now go back to the root of your rr62x installation, to register dkms, and install the driver:
Your output should look something like this:
The last modprobe will hopefully cause all the attached drives to appear in your file manager.
Shortcut - DEB Packages for DKMS
If you use DKMS on your system, you can jump right to the nitty-gritty and install one of these packages, or follow the instructions below to roll your own as needed:
RocketRaid 620/622/640/644 (archive containing BOTH driver debs): rr6xx-drivers-precise.tar.gz
RocketRaid 2322/2320 (should work for releases up to 12.04): rr232x-dkms_1.10_all.deb
These packages have already been patched as necessary and make use of DKMS, which means the driver will be correctly recompiled whenever you update your kernel. Also, the deb packages contained in the tar.gz archive *SHOULD* work with all Ubuntu from 10.10 upward all the way to 12.04.
Note
One final change is that you should add a line to /etc/initramfs-tools/modules containing the name of the module (rr64x or rr62x).
These DEB packages haven't been modified to do that automatically. This helps the kernel to auto-load the module on boot, and put it in your initrd file to be available at that time. Otherwise, you may or may not be able to boot off of any disks attached to the controller(s).
Introduction
To use a module with DKMS, one places the module installation files (could be source code or binary) in /usr/src/<modulename>-<version>, along with a configuration file dkms.conf that tells DKMS how to build/configure the module and what its name is. Under more advanced scenarios, conditional build instructions and patching can be done by the dkms system, but in our case this is not necessary.
Setup
Fire up your favorite terminal and download the driver package you want to use. I use the 'legacy' non-RAID driver that forces all disks to be recognized as pass-thru devices for direct disk access, but the RAID driver works in exactly the same way. The following links may not be up-to-date, but they work well as of kernel 2.6.35, and 2.6.38 works with some modifications, below.
or for RAID
RocketRaid 62x
RocketRaid 64x
Now untar/unzip the files and enter the installation directory. (Path to the directory should not contain any spaces, it could lead to errors when building module.) Non-RAID:
RAID:
Source modifications required in 11.04 (Natty), 11.10 (Oneiric) and 12.04 (Precise)
The linux kernel versions included in Natty, Oneiric and Precise includes some changes that break the rr62x/rr64x drivers referenced above, and as of this writing have not been updated. However, the changes required to the source code are fairly trivial. In fact, the changes are the same for the rr62x and rr26xx (below), with only the lines on which the offending code occurs changing between the versions.
If you are running Natty, Oneiric or Precise, make these changes in the osm/linux/ subdirectory ('+' and '-' preceding a line below indicates what is deleted and what is added to a file: do not include the '+' or '-' in the code).
* Fix the KERNEL_VER definition in inc/linux/Makefile.def
* Also in inc/linux/Makefile.def, add the KERNEL_VER check for the value 3.0 or 3.2
* Also in inc/linux/Makefile.def, fix the KERNEL_VER check for build configurations
* Remove the config.h include statement from osm_linux.h
* Fix :: I'm guessing this used to work, but not on 11.10, replace with the following (osm_linux.h)
* Modify the method call to blkdev_get to include a third parameter, NULL, in os_linux.c:
* Rename the hpt_queuecommand function to hpt_queuecommand_lck in osm_linux.c:
* Also in osm_linux.c, add a few lines before the hpt_reset function declaration:
* Fix install.sh to support 3.0 as a valid kernel version
* Fix patch.sh (at about line 146) as follows:
A patch for the non-RAID version 1.0 driver (rr62x-linuxla-src-v1.0) is included here (created using diff -Naur original patched > output.patch): rr62x-linuxla-src-v1.0-oneiric.patch . Download this file into your rr62x-linuxla-src-v1.0/ source directory and run:
Running this patch on the sources implements the changes above. Once these changes are done, you can proceed with installation as usual.
Another minor but critical fix
In 11.10 (at least) the 'asm' folder is missing from /lib/modules/*/build/include, before you can compile you need to do this;
* This is the same for x86 and x86_64 ...
Installation
From this point on, install instructions will be the same for the RAID and non-RAID drivers, except for the version difference (1.0 for non-RAID, 1.1 for RAID), and the 'la' suffix is in various places for the non-RAID driver. I'll continue as if we're working with the non-RAID driver, though if you drop the 'la' and change the version to 1.1 you have the instructions for the RAID driver.
Installation 'Without' DKMS
First, let's see what we're looking at:
Take a look at the README. Following its instructions we do the following:
With DKMS, we tell DKMS how to do all that for you by creating a dkms.conf file with the appropriate entries.
Configure dkms.conf
Back in the 'root' rr62x-linuxla-src-v1.0/, we create dkms.conf and open it in our favorite text editor:
Inside dkms.conf, we add the lines:
All directories are with respect to the location of the dkms.conf file. This tells DKMS
The command to build the module (run make in the directory product/rr62x/linuxla/).
The command to clean the source tree (run make clean in the directory product/rr62x/linuxla/).
The name of the module without the .o or .ko extension.
That DKMS can find the built module in product/rr62x/linuxla/.
- The name and version DKMS should associate with the module.
- To automatically install the module into a new kernel on boot if the capability exists (this isn't necessary if you use Ubuntu's prebuilt packages to update your kernels, but it doesn't hurt).
- To remake the initrd image after installing the module.
Save the file.
Tell DKMS about the module
Next, we install the module into DKMS by copying the module installation files into the kernel source tree /usr/src/<modulename>-<version> and tell DKMS about the new module. In our case, this is:
Build and Install
DKMS has now added our module to its list of modules to build for future kernel installations. To make sure it works and to install the module into our current kernel, we can instruct dkms to build and install the module:
Your module will be installed and reinstalled into future kernel updates.
NOTE:
At this point it is possible to have DKMS produce a DEB package, by issuing the command:
That way, if you need to repeat these steps, you can just install the generated .deb (in case you made your own modifications). One such deb package (for the RocketRAID 640) is here: rr64x-dkms_1.0_all.deb. *NOTE:* the --source-only flag is important to facilitate the compatibility of the module across versions - especially for precise.
Update:
The latest version of open source rr26xx driver 1.5 can be downloaded from HighPoint website, but It only supports to kernel 3.x. In order to compile/install it under Ubuntu 16.04 (kernel 4.4) successfully, some minor changes are needed:
- Add condition statements to allow 4.x kernel to build in these files
- Add flag '-Wno-error=date-time' to avoid the build error in the Makefile
- Add dkms.conf and build guidance into README
The revised source code package can be downloaded here: rr264x-linux-src-v1.5-k4.x.tar.gz
Notice
This is wiki page is in its infancy. Please feel free to modify or offer suggestions if possible. Currently a lot of this was done from memory and notes, and should therefore be tested again. These instructions are a bit dated, and some success may be had using a variation or combination of these with the RocketRaid 62x instructions above.
Purpose
This mini-howto is intended to help others avoid the frustration I went through when updating kernels and having my root partition on a RocketRaid mirrored drive. While not complete, this mini-howto should get most users the ability to have the driver automatically compile and install on a kernel update using DKMS.
Prerequisites
- Ubuntu 9.04 / 9.10
RocketRaid 26xx RAID Card
- Kernel Tools and Headers
DKMS
- Internet Access
- Root/sudo Permission
Setup
First, install the build tools:
'Note: Need to make sure kernel headers are installed'
Download the driver source from Highpoint: 'I recommend verifying this link is the most recent before downloading'
Extract the tar:
Make sure DKMS is installed:
Create the DKMS configuration file:
Cut and Paste the following text:
Hit 'Control-D' (as in Dog) to close the file.
Copy the Makefile and Config files up to the top directory:
Modify the HPT_ROOT in the Makefile:
Move the source into /usr/src for DKMS:
'Todo: Should probably verify permissions here...'
'Note: For some reason dkms will not copy object files (.o) when doing builds, so we need to fool it below.'
Trick dkms into looking in the /usr/src directory for the precompiled RocketRaid object code:
'Note: Above symbolic link must be complete (absolute) path!'
Add the source to DKMS:
Build the module:
This should hopefully compile correctly. If not send an email to 'rocketraid at mark.org' with the output from the file '/var/lib/dkms/rr26xx/1.2/build/make.log'
Next install the module:
Finally, create the boot image:
This should install it into the named kernel listed above (2.6.31-14 in this example). It will also use DKMS to compile the module for future kernel update automatically. Please see note below.
Running mkinitramfs
The directions above seem to automatically recompile and install the module whenever a new kernel update comes out (at least for 9.04 and 9.10). However, so far it does not automatically add it to the boot image.
If after a kernel upgrade you reboot and it can't find the rr26xx module, then reboot in an old working kernel and run this:
Obviously, replace '2.6.31-14-generic' with the kernel that was just updated.
I'm looking for a way to do this post DKMS (maybe POST_BUILD???). If anyone has any suggestions, please let me know!
I'm currently experimenting with adding the file /etc/kernel/postinst.d/rr26xx with the following contents:
vi /etc/kernel/postinst.d/rr26xx
in theory this should work, but I haven't tested it yet (will with next kernel upgrade)
Make problems with 2.6.38-8-generic
These notes come from my experience in getting a RocketRAID 2640x4 to work with 2.6.38-8-generic (Ubuntu 11.04).
Three problems exist with the version 1.2 source package.
- os_linux.h includes linux/config.h which yields file not found errors.
- The blkdev_get method has an additional parameter in this version of the kernel.
- A change with regards to SCSI requires a further code change in osm_linux.c, I found this problem here:
Highpoint RocketRAID problem with 2.6.37 onwards
I tackled these problems as follows:
- Removed the linux/config.h include statement from os_linux.h
- Modified the method call to blkdev_get at approximately line 348 of os_linux.c
- Appended the following to osm_linux.c
Before the hpt_reset method, I appended the following lines
These modifications allowed me to successfully make the kernel module and 2.6.38-8-generic is now running without issue.
Updating version rr286x-linux-src-v1.4
Thanks for the great Info! These instructions helped me with v1.4 of the RocketRAID 2680 driver, but there were some differences. As a result, I decided to add the steps I used to get the 2680 driver working with version 1.4 of the source.
You can get the source here:
http://www.highpoint-tech.cn/BIOS_Driver/rr26xx/RR268x/Linux/rr268x-linux-src-v1.4-091124-1558.tar.gz
Here are the steps I used (very similar as above):
Note: A patch which does the following changes can be found here: rr268x-linux-src-v1.4-natty.patch
- Removed the linux/config.h include statement from osm_linux.h
- Modified the method call to blkdev_get at line 263 of os_linux.c. There are several other calls to this function, but this was the only one that needed the extra NULL.
- Update the following function in osm_linux.c, line 877
Before the hpt_reset method (line 1411), I appended the following lines
After making these changes I was able to run make followed by sudo make install to build and install the new driver.
To load the driver you can restart or execute the following:
Mounting the RocketRAID drive array on boot
The instructions with the RocketRAID driver give the following example to be added to /etc/fstab so the array can be mounted. However, this would not work consistently.
The problem is that the main hard drive would sometimes use sda or sdb. As a result, the only thing that will work correctly is to use the UUID.
The easiest way to find the UUID is to mount the drive array manually and then use the following steps to find the UUID for your array.
Highpoint Scsi & Raid Devices Drivers
After mounting the array run:
This will provide a list (similar to the following) of mounted drives so you can see how your drive was mounted:
In my system I used /media/Media for the mount point instead of /mnt/raid, you can use what ever mount point you like.
Now that I know my drive is mounted on /dev/sdb1 I can then use the following command to find the UUID:
This will produce a list similar to the following:
The first one in this list for /dev/sdb1 gives me the UUID for my drive array. Next I updated /etc/fstab with the following;
Now on reboot my drive array is mounted to /media/Media and everything is good.
Highpoint SCSI & RAID Devices Driver
Hope this helps!