Updating the aacraid driver in Ubuntu
Posted in RAID under Linux, Linux distributions, Open Source Support, General by Phil WilsonI have had a few questions recently on how to update the aacraid driver in Ubuntu and wanted to share the procedure I use as the readme in our source code downloads is confusing for Debian type distributions.
In general, the aacraid driver uses a family match approach to identify RAID cards using ARC (Adaptec RAID Code) firmware and the driver to firmware interface has been kept consistent (which in most cases allows an older driver to recognise and work with more recent hardware). The driver itself is held in the scsi-misc-2.6 repository at kernel.org so most distributions include a suitable driver. We hope to add a posting soon discussing this in more detail.
In most cases, the shipped driver is fine and there is little or no benefit in updating, however to take advantage of the Intelligent Power Management feature (which required additional code) or updating to a driver which supports the cache module parameter (see my post on xfs write performance - coming shortly), it can be necessary.
For information, the code additions to support Intelligent Power Management were introduced at 1.1.5-2456 - I believe this is the version that ships with Ubuntu 8.10. If you have an earlier driver, the controller will work fine but the power management options in ASM aren’t acccessible.
Our support website contains the aacraid source code in DKMS (Dynamic Kernel Module Support) format which is intended to make the process of building and installing kernel modules from source far simpler. More information on DKMS can be found here ..
http://linux.dell.com/projects.shtml/
Here is the procedure I use …
First install the Linux headers
apt-get install linux-headers-`uname -r`
If this fails due to missing dependencies then run
apt-get -f install
Now download and install the Debian DKMS package from here ….
http://linux.dell.com/dkms/
(It looks like the latest stable DKMS package for debian is here
http://linux.dell.com/dkms/permalink/dkms_2.0.20.4-0ubuntu1_all.deb
Download the compressed aacraid DKMS tarball and extract the files. You don’t need the dkms rpm , just the aacraid module source rpm.
You can either convert the aacraid dkms rpm to deb using alien
alien aacraid-1.1.5.2459-dkms.noarch.rpm
and install the resulting deb file using dpkg
or
rpm2cpio aacraid-1.1.5.2459-dkms.noarch.rpm | (cd / ; cpio -idmu)
Now add the module to the dkms tree
dkms add -m aacraid -v 1.1.5.2459
Now build it
dkms build -m aacraid -v 1.1.5.2459
and install the new driver.
dkms install -m aacraid -v 1.1.5.2459
The install process will also rebuild the initrd (saving the old one first).
Hope this helps someone - thanks for reading, Phil.
May 6th, 2009 at 6:26 pm
This does not work with newer kernels. I am using xfs and have horrible write performance and since ubuntu 9.04 is out and using the 2.6.28 or 2.6.29 kernels, this doesn’t work.
make KERNELRELEASE=2.6.29 -C /lib/modules/2.6.29/build SUBDIRS=/var/lib/dkms/aacraid/1.1.5.2453/build modules…..(bad exit status: 2)
Error! Bad return status for module build on kernel: 2.6.29-custom (x86_64)
Consult the make.log in the build directory
/var/lib/dkms/aacraid/1.1.5.2453/build/ for more information.
make.log:
DKMS make.log for aacraid-1.1.5.2453 for kernel 2.6.29 (x86_64)
Wed May 6 13:23:12 MDT 2009
make: Entering directory `/usr/src/linux-2.6.29′
CC [M] /var/lib/dkms/aacraid/1.1.5.2453/build/linit.o
/var/lib/dkms/aacraid/1.1.5.2453/build/linit.c:71:27: error: asm/semaphore.h: No such file or directory
In file included from /var/lib/dkms/aacraid/1.1.5.2453/build/linit.c:206:
/var/lib/dkms/aacraid/1.1.5.2453/build/aacraid.h:2259: warning: ‘struct class_device’ declared inside parameter list
/var/lib/dkms/aacraid/1.1.5.2453/build/aacraid.h:2259: warning: its scope is only this definition or declaration, which is prob$
/var/lib/dkms/aacraid/1.1.5.2453/build/linit.c: In function ‘aac_slave_configure’:
/var/lib/dkms/aacraid/1.1.5.2453/build/linit.c:867: error: ‘struct scsi_device’ has no member named ‘timeout’
/var/lib/dkms/aacraid/1.1.5.2453/build/linit.c:868: error: ‘struct scsi_device’ has no member named ‘timeout’
/var/lib/dkms/aacraid/1.1.5.2453/build/linit.c: At top level:
/var/lib/dkms/aacraid/1.1.5.2453/build/linit.c:1756: warning: ‘struct class_device’ declared inside parameter list
/var/lib/dkms/aacraid/1.1.5.2453/build/linit.c: In function ‘aac_show_model’:
/var/lib/dkms/aacraid/1.1.5.2453/build/linit.c:1758: warning: initialization from incompatible pointer type
/var/lib/dkms/aacraid/1.1.5.2453/build/linit.c: At top level:
/var/lib/dkms/aacraid/1.1.5.2453/build/linit.c:1799: warning: ‘struct class_device’ declared inside parameter list
/var/lib/dkms/aacraid/1.1.5.2453/build/linit.c: In function ‘aac_show_vendor’:
/var/lib/dkms/aacraid/1.1.5.2453/build/linit.c:1801: warning: initialization from incompatible pointer type
/var/lib/dkms/aacraid/1.1.5.2453/build/linit.c: At top level:
/var/lib/dkms/aacraid/1.1.5.2453/build/linit.c:1841: warning: ‘struct class_device’ declared inside parameter list
etc etc etc
May 6th, 2009 at 6:26 pm
also, i am using 2453 because i checked the 2459 version you used and the 31205 adapter isn’t listed as supported.
May 7th, 2009 at 1:27 pm
Hi Paul, thanks for posting this and sorry for the problems. I hope it’s okay if I break this into two areas.
XFS write performance
I’d recommend checking the very helpful www.xfs.org site and in particular the recommendations in http://xfs.org/index.php/XFS_FAQ regarding write barrier support.
As explained in the FAQ on write barrier support, XFS by default has barrier support enabled which results in the write back cache being flushed on XFS log writes. This causes a synchronize cache command to be sent to the aacraid driver which by default will pass it to the controller on every log write. The controller will then flush its entire write cache and also send a synchronize cache command to each of the disks that are in the relevant array. This generates a huge overhead which is most noticeable when concurrently writing to multiple smaller files as each access is likely to result in a log write. The FAQ recommends that for controllers which have a persistent write cache, that write barriers should be disabled by mounting the filesystem with the “nobarrier” option.
I have recently been working with a customer who was looking to achieve high write rates to multiple files and we confirmed that following the recommendations in the FAQ (mount using the nobarrier option, disable individual drive write caches, make sure you have a battery backup module installed on the raid controller) gave good performance.
I’m in the process of downloading Ubuntu 9.04 and will check if the nobarrier option is available - given the very recent kernel I’m fairly certain it will be. For the benefit of those who are using an earlier distribution where the xfs nobarrier mount option is not supported, there are a couple of other options.
- With aacraid driver revisions from 1.1.5-2454 onwards, a module options parameter called “cache” was added which allows the default driver behavior to be overridden. Setting the cache options parameter to “2″ will tell the driver to ignore the sync_cache command. To take advantage, add the following line to the /etc/modprobe.conf file (or Debian equivalent) after the alias scsihostadapter aacraid entry ..
options aacraid cache=2
The initial ram disk will then need to be rebuilt. Remember to check that the module option is supported especially if you are booting from the controller (modinfo aacraid) to avoid grief. It may be wise to build a new initrd image and create a new appropriate stanza in grub.conf/menu.1st.
modinfo aacraid gives more information on this parameter and the values that it can take.
- If the aacraid module pre-dates the inclusion of the cache options parameter and it is not desirable or possible to update to a later driver, a workaround is to use LVM to label and partition the array and then create the XFS filesystem on the LVM device. Whether by design or accident, sync_cache commands don’t get propagated to the driver.
Driver build problem
There’s only one driver - aacraid - for all Adaptec controllers which use the “ARC - Adaptec Raid Code” firmware stack including some OEM branded controllers. The driver uses a “family match” approach to identify compatible controllers and the code is held and maintained at kernel.org (scsi-misc-2.6 GIT respository) by the community and Adaptec. As a consequence, pretty much all distributions ship a driver which was current at the time a snapshot of the kernel source was taken. The firmware to driver interface is kept constant so that an older driver can work with newer hardware but it may need to be updated in order to take advantage of newer features.
One example of this is the Intelligent Power Management feature on the series-5 family of controllers. The minimum driver level to take advantage of the feature is 1.1.5-2456 (which I think is what you get with Ubuntu 9.04), however, if you have a distribution with an earlier driver, it will still work but Intelligent Power management won’t be available.
There has been some confusion caused by the structure of our Linux support information (adaptec.com/support) and I would welcome feedback on how this could be improved. For each major software / firmware / management software release we carry out a rigorous testing process with a large number of drives, motherboards and enclosures for all operating systems we support. For practical reasons we have to limit the number of distributions we test against and they are chosen based on feedback from large accounts that specifically require a fully Adaptec tested solution. As a consequence we currently test against
Fedora Core 5
Fedora Core 6
Red Hat Enterprise Linux 4
Red Hat Enterprise Linux 5
SuSE Linux Enterprise Server 10
SuSE Linux Enterprise Server 9
and provide precompiled driver modules and driver disk images using the most up to date source code for these distributions.
The limit on the number of distributions we include in our testing process does not imply that another distribution that is using the same driver from kernel.org would not work. Similarly problems that are found during testing and fixed in the aacraid driver source at kernel.org would also benefit distributions that are not included. We provide the source code for the driver in two formats - in your case you are using the separately packaged dkms source however a non dkms source tarball which can be compiled “in-tree” is included in the driver rpm package.
I would recommend using the driver that shipped with Ubuntu 9.04 but having said all that, the source code should clearly compile on the later kernel versions. I am discussing this with our Linux driver guy and will come back to you.
huge thanks, Phil.
May 13th, 2009 at 4:08 pm
Hi!
On Ubuntu 9.04 server I can’t build module
(e.g. “dkms build -m aacraid -v 1.1.5.2459″ command fails).
I have Adaptec 5805 with Supermicro X7DWN+ /Seagate EC2 1.5Tb HDD*7, 3*RAID6/.
I start search any information about aacraid driver because have famous “SCSI Hang” error. Server works very slow on I/O operations and sometimes RAID hangs, which means pause in 10-30 second on any operations with HDD.
May 14th, 2009 at 12:57 pm
Hi Andrey, I’m sorry for the delay in coming back to you - I have been travelling to our head office and then stuck in all day meetings so I’m trying to catch up.
Firstly on the subject of the hangs you are seeing - I’m suspicious that something might be going wrong between the controller and the disks. Would you mind if I contact you directly to discuss this - I think it would be worth getting the controller logs over to me and I’ll see what is happening.
The issue with the source posted on our website not compiling has been raised by a few other customers and we have been working on it - the issue relates to some changes which have been introduced in the SCSI APIs and our driver source wasn’t correctly aligned with the changes. The aacraid driver in kernel.org seems to be fine - I checked it with the 2.6.29 kernel which ships with Ubuntu 9.04 server. (I can mail you the latest version from the scsi-misc-2.6 GIT repository (build 2461) if you don’t mind me contacting you directly).
Just for information, I was looking at this with our engineering folks yesterday and they look like they have almost fixed the issue - so I hope we can update the dkms package and the source tarball included in the latest rpm file fairly quickly.
Sorry for the problems - let me know if its okay to contact you directly.
many thanks, Phil
May 19th, 2009 at 1:09 am
In case anyone else tries this:
It does NOT work on Ubuntu 8.04 LTS server…
RAID6 on Adaptec 5805, running latest firmware (16501), 7 drives (1 TB each)…
dkms is latest (dkms_2.0.22.0-0), so is the aacraid driver source (.2459)…
dkms builds and installs the driver…. but the system fails to boot up/hangs at a certain point during the boot process…
the only solution was to boot into an older kernel from grub and replace the initrd of the latest kernel by the .bak of the same created by dkms during module installation…
please help!!
May 19th, 2009 at 1:10 am
oops, forgot to mention:
uname -r for my system is: 2.6.24-24-server
!!
May 22nd, 2009 at 11:27 pm
OK. This is what worked for me so far:
Disable “SATA Native Command Queuing (NCQ)” in the Adaptec BIOS.
Nothing else seemed to help. I tired updating the RAID card (5805) BIOS to the latest version, updated the drive firmware (Seagate SN05), updated the aacraid driver (.2459) with the latest dkms build and the latest kernel (x86_64 ubuntu/hardy), none of the forementioned worked… I also tried all combinations of options on the aacraid module.
Only diabling the NCQ helped prevent “scsi hang” messages.
From Phil :-
Hi Shiven - I sent you mail directly but haven’t seen a reply. I’m guessing that you are using the Seagate ES.2 SATA drives in which case you need a minimum disk firmware of SN06. The symptoms you describe are consistent with a known compatibility issue between series-5 controllers and models with SN04 or SN05 firmware. Please let me know if you didn’t get my mail.
May 28th, 2009 at 4:19 am
Hi Phil.
You pointing you currently test against Red Hat Enterprise Linux 5.
What about driver image for Red Hat Enterprise Linux 5 update 3?
I’m trying to install this OS on raid 10 on 1430SA with no luck. Driver from here http://www.adaptec.com/en-US/downloads/rh/rhel_5?productId=AAR-1430SA&dn=Adaptec+Serial+ATA+II+RAID+1430SA doesn’t work. Or please post article explaining how to build driver fo Red Hat to be able to add it at the setup stage.
Regards,
Sergey
May 28th, 2009 at 5:36 am
Hi Sergey, I asked the product manager for an update and will get back to you asap.
These are hostraid products which use a dfferent driver (not aacraid) for which the source hasn’t been released by Adaptec. Unfortunately this means there are no in-box drivers and they are only available from our support site.
In Linux environments I have been recommending using hardware RAID products that use the aacraid driver. This is held at kernel.org and a suitable version ships “in-box” with the vast majority of distributions.
An h/w raid equivalent to the 1430 would be a 2405.
thanks, Phil
May 28th, 2009 at 8:00 am
Hi Phil, thank you for quick reply.
I’ve this raid already and can’t return it.
So I should wait for updated driver or install old OS.
June 2nd, 2009 at 12:39 am
Does it work on 2.4 kernel ?
June 2nd, 2009 at 11:52 am
Quick note to Sergey - I’m still waiting for an answer which suggests that it isn’t right around the corner. I have chased the product manager again to confirm but I would recommend for the moment using an older version if at all possible.
Hi VPS, regarding your question on the 2.4 kernel - I’m sorry but I really have no idea. Which OS version are you using? If you’ve tried it since do please post your findings. If you need to get this working for a project then do let me know.
many thanks, Phil.
June 4th, 2009 at 1:44 pm
I also am eagerly waiting for an updated source package for the Linux kernel that will compile in Ubuntu 9.04.
Phil, can you let us know when you expect that to be posted? I understand you were waiting on engineering to produce the patch.
I hope that Adaptec will fully support Ubuntu in the future.
Thank you,
–Edwin
June 9th, 2009 at 7:11 am
Hi Edwin, sorry for the delay in responding. I’ll check and see if the update that is being released this week solves the build problem. I did get some code a couple of weeks ago which almost compiled okay so I know it was being worked on. I’ll come back to you asap. Regarding better support for Ubuntu - I raised this while I was in out head office - I’ll chase it again. The driver compilation issue isn’t strictly a Ubuntu issue but the lack of deb packages for ASM is a nuisance to all.
thanks, Phil
July 22nd, 2009 at 7:42 pm
I’d really like to see some official support for Debian based systems. All the supported systems have a common root. I’d imagine that at least supporting Ubuntu LTS might be something desirable, since that is aimed at being stable and offering long term support.
July 22nd, 2009 at 11:06 pm
Any updates ?
Can’t build this kernel module on gentoo either. Tried 2.6.28 and 2.6.30 including vanilla kernel-sources. I’ve tried with dkms and I’ve also tried building kernel and modules after injecting aacraid directory into fresh kernel-source tree.
Are my scsi related #Include files outdated ?
What could possible cause ’struct scsi_device’ has no member named ‘timeout’ ?
DKMS make.log for aacraid-1.1.5.2465 for kernel 2.6.30-gentoo-r1 (x86_64)
Mon Jul 6 04:18:00 CEST 2009
make: Entering directory `/usr/src/linux-2.6.30-gentoo-r1′
CC [M] /var/lib/dkms/aacraid/1.1.5.2465/build/linit.o
/var/lib/dkms/aacraid/1.1.5.2465/build/linit.c: In function ‘aac_slave_configure’:
/var/lib/dkms/aacraid/1.1.5.2465/build/linit.c:887: error: ’struct scsi_device’ has no member named ‘timeout’
/var/lib/dkms/aacraid/1.1.5.2465/build/linit.c:888: error: ’struct scsi_device’ has no member named ‘timeout’
/var/lib/dkms/aacraid/1.1.5.2465/build/linit.c: In function ‘aac_procinfo’:
/var/lib/dkms/aacraid/1.1.5.2465/build/linit.c:2931: warning: passing argument 2 of ‘aac_store_uart_adapter’ from incompatible pointer type
/var/lib/dkms/aacraid/1.1.5.2465/build/linit.c:2931: warning: passing argument 3 of ‘aac_store_uart_adapter’ makes pointer from integer without a cast
/var/lib/dkms/aacraid/1.1.5.2465/build/linit.c:2931: error: too few arguments to function ‘aac_store_uart_adapter’
make[1]: *** [/var/lib/dkms/aacraid/1.1.5.2465/build/linit.o] Error 1
make: *** [_module_/var/lib/dkms/aacraid/1.1.5.2465/build] Error 2
make: Leaving directory `/usr/src/linux-2.6.30-gentoo-r1′
Rune
July 23rd, 2009 at 10:58 am
Hi Rune, the source code on our website tries it’s level best to work with as many current and past kernels as possible. Unfortunately we had an issue (for kernels >= 2.6.26) which was corrected in 1.1.5-2467. This completed validation last week but I notice still has not been posted on our support site - I’ll chase this up. In the meantime, I hope you don’t mind, I sent you a mail with version 1.1.5-2467 DKMS package as an attachment. If anyone else needs a copy, post here and I’ll do likewise but I would hope it would be available from our support site within the next week.
Out of interest, I was wondering why you wanted to replace the driver that was included in Gentoo (or the vanilla sources - build 2461 I think, possibly 2459)?
Ignoring the changes associated with handling newer kernels…
build 2461
- fixed an issue where hot adding a drive with the raid controller “JBOD mode” enabled didn’t result in the OS seeing it until a reboot.
build 2463
- fixed an isse where with firmware that supports “JBOD mode”, setting the expose_physicals module parameter > 0, didn’t result in the physical devices behind the controller being fully exposed to the OS. (i.e. exposed and no_uld_attach flag not set).
thanks, Phil
July 23rd, 2009 at 2:25 pm
Thanks Phil !
E-mail attachment, build 2467 compiles without errors.
I wanted to replace in-tree 2461 to troubleshoot some SSD (non-supported OCZ Vertex) issues I’m having.
thanks,
Rune
July 24th, 2009 at 5:28 am
Thanks Rune, just to let everyone know the build 2467 DKMS package has now been posted on our support site. Select one of the newer controllers (e.g. 5805 -> downloads -> Linux driver source code) or follow this link.
http://www.adaptec.com/en-US/speed/raid/aac/linux/aacraid_dkms_v1_1_5-2467_tgz.htm
Phil
September 12th, 2009 at 4:40 pm
I have a much more basic question. I’d like to install 64-bit Ubuntu 9.04 to a fresh system containing only new hard drives managed by an Adaptec 2405 controller.
Can you point me to a step-by-step HOWTO on how to proceed with the install? Specifically, what drivers to use, where to get them, how to compile (if necessary), when and how to provide them to the installer so the discs can be seen, an array can be built, and then the system can be installed there? I have done standard installs, but never with a RAID card, and there seems to be NOTHING on the forums or net at large. Is this even possible or do I have to install the system onto a BIOS controller disc?
Thank yoy very much.
September 14th, 2009 at 4:53 pm
Hi Jeremy, sorry for the delay - I’m travelling in ‘wet’ Spain at the moment. Ubuntu 9.04 uses a fairly recent kernel and as such includes a relatively up to date version of the aacraid driver (probably 1.1.5-2456). It shouldn’t be necessary to compile any drivers or download any etc.
If you have just a single array and you want to install on it - that should work without any problem. If you plan on having multiple arrays (for example some people like a mirror of the OS and a raid 5 for data volumes) then I would just create the mirror first, install the OS and then create the raid 5.
If you go ahead and give it a try, post back here if you see any problems etc and I’ll work with you to resolve them.
thanks, Phil
October 8th, 2009 at 2:44 pm
Hi Phil. Noting the last two posts, I am thinking of setting up a adaptec RAID on ubuntu 9.04 server, and am encouraged by the new aacraid drivers in the kernel. However, I was wondering about any support software (ie. management, SMART detection, emails, and other warnings, etc). Some posts from a number of years ago mention converting an rpm into a deb but I am wondering if there is any simpler way (ie. a deb, or tar’d binary file, etc?)
Thanks!
October 8th, 2009 at 7:02 pm
Hi Pat, would you be able to try the deb packages on our password support site
http://www.adaptec.com/support/files/
When prompted enter :-
Filename: asm_debian_x86_x64_v6_30_18508.tgz
Password: ASMDEB
This is a tar of both the 32bit and amd64 versions of the ASM software. It is a repackage of the latest version released on the public site (but made by me so any problems please report them back here).
I’d be grateful for any feedback.
huge thanks, Phil
October 28th, 2009 at 8:18 am
Hi Phil, I’m planning to migrate one of our server from a centos 5.4 release to a ubuntu 9.10. Driver side seems to be OK for an Adaptec 3805, but ASM V6.3 debian version I saw in previous response seems not to be compatible with this card. Do you have other tgez verison of ASM for debian? Maybe a V5.30.
Anyway, great blog! Full of usefull info!
Gianni
October 30th, 2009 at 12:42 pm
Hi Gianni, to try to simplify the test matrix and release process, my colleagues tend to limit the validation exercise to the latest controllers (in this case series-2 and 5). In general, later versions of ASM will work fine with even quite old controllers and I have used this version (6.30) with the 3805. Some of the features may be grayed out if they aren’t supported by the firmware (for example the MaxIQ caching technology).
If you do run into any issues do let me know - I’d like to raise them as a bug - and I can create deb packages on the older release if it is needed but I would personally recommend using this version.
Thanks so much for the kind comments!
very many thanks, Phil
November 4th, 2009 at 12:39 pm
Hi Phil,
thanks for your answer. I’ll try this solutions during the Week-End. My doubt was entirely due to the release note of the 6.3 version. If it works this way, great news.
I’ll keep you informed about results.
Best Regards
Gianni
November 6th, 2009 at 4:13 pm
Hi,
If I want to use the MAX-IQ SSD-cache product with a series 5, do I need to compile a new aacraid driver ?
I have 2461 that comes with my distribution and I have been unable to compile the 2468 dkms driver against my 2.6.31 kernel.
November 6th, 2009 at 6:11 pm
Hi Ob, to use MaxIQ SSD caching there’s no dependency on the driver. You just need later firmware (17517 onwards) and latest ASM 6.30 onwards s/w if you want to configure via the GUI. I’ve been using build 2461 on my benchmark machine with no problems.
thanks, Phil
If you need deb packages for ASM 6.30 - see my comments on Oct 8th above
November 6th, 2009 at 6:54 pm
Great, thanks a lot !