Hardware RAID 1 on Ubuntu

The system I was trying to install RAID 1 had an Adaptec 2500S hardware RAID card installed on it. Therefore, I did not need to deal with software RAID. The system had two Pentium III processors, 3 GB memory, and two SCSI hard drives with approximately 20 GB on each of them. Since it was a hand-me-down system, the hardware card had been installed and configured already. Let’s call this computer ‘raidtest‘.

RAID Setup

When raidtest boots up, the user gets an option to hit Control+A to enter the RAID setup utility. There I deleted the previous configuration and created a new one. This one now had two drives and these were set up for RAID 1. The process was quite simple and without any fuss. However, I was unable to set up the option of drives being removable because I could see no way how to. I would have liked to set this option and test what it did and how it did. If you can help us out here, it would be appreciated.

RAID on CentOS

I intended to install CentOS on it because I wanted to learn to use it as well. However, CentOS 5 was unable to recognize the RAID at all. It just said ‘no’. So I downloaded CentOS 3.9 server and popped it in. It was able to recognize the hardware and said it was going to load the driver. But this is where the installation just hung up and would not get out of its stuck state. Even CTRL+ALT+DEL would not work. So I just gave up CentOS.

RAID on Ubuntu Server

I also did an installation of the Ubuntu 6.06.1 Server LTS on the same machine. However, upon successful installation, the boot up process would hang up saying that I2O was already in use. Research (wrong /etc/fstab when installing on RAID using Adaptec 2100S) showed that this problem existed in Debian where installation and boot names for the same devices were different. I even tried out the install image but it did not work for me. So I gave up the thought of either Debian or Ubuntu Server.

RAID on Ubuntu Desktop

I used the ‘alternate’ installation CD for Ubuntu 7.10 (Gutsy Gibbon) since the ‘desktop’ version would not boot properly. I have no idea why. Ubuntu not only recognized the RAID hardware as a single disk, but also installed fine. I installed it as if it was a single disk as well using guided partitioning.

During the first boot process after the installation, I saw some weird error messages saying I2O could not be configured (or something like that) but the computer worked fine. I restarted the machine a few times and everything was working.

Failure Simulation

I knew that the BIOS (?) setup of the RAID did not enable drives to be ‘removable’. However, I needed to test what would happen if one of the drives failed. So I took one drive out while the system was running. The system ran fine so I put the drive back in. However, the drive I had pulled out would not work. All reads and writes on the disk were being done on the drive which had been left untouched. I expected the RAID controller to rebuild the failed drive automatically but could see no evidence of it.

I then turned off the computer, took out the working drive, put in the ‘failed’ drive, and booted up. No luck. Ubuntu would not boot. So I put in the working drive, took out the ‘failed’ drive, and booted up. Ubuntu worked flawlessly. Even now the RAID array was not being rebuilt. I had to do something.

Cold-Boot RAID Array Rebuild

I rebooted the computer and hit CTRL+A at boot time to enter the Adaptec RAID configuration utility. There I saw that the ‘untouched’ drive’s status was ‘optimal’ while the ‘failed’ drive said something else (I forgot what it was but it indicated that there was some problem). So from one of the menus of the configuration utility I chose to rebuild the array. Suddenly activity lights for both drives began to blink in unison and the status on the configuration utility showed a progress bar of the rebuild process. Once it was done, the computer worked well off both drives, together or individually.

Online RAID Array Rebuild Using raidutil

I came across an Ubuntu package called raidutils. It contains I2O RAID management utilities. So I installed it by

sudo apt-get install raidutils

Once it was installed, I had no idea how to use it. So a few web pages helped me out. Manpage of RAIDUTIL was the first. This showed me that although the package is named raidutils, the command actually is raidutil; notice the absence of ‘s’ from the name of the command. So I ran the following

raidutil -L physical

But I got an error; Engine connect failed: Open. So I tried the following

sudo raidutil -L physical

Which produced a whole new error; Engine connect failed: COMPATIBILITY number. This is where I2O on Linux – FAQ was very helpful. I ran the following two commands

sudo mknod /dev/i2o/ctl c 10 166

sudo modprobe i2o_config

And then I ran the first command again

sudo raidutil -L physical

Now I did not get any errors and saw the physical devices of the RAID system. However, I wanted to get a way to be able to rebuild an array while the system was running. Here again a web page was extremely helpful. Monitoring RAID with NetSaint had useful commands. I used them as follows:

sudo raidutil -L logical

The RAID was ‘optimal’. So I took one drive out of the system again and ran the command again.

sudo raitutil -L logical

This time the status was ‘degraded’. I put the drive back in and ran the command yet again.

sudo raitutil -L logical

Alas, the status was still degraded. To reconstruct RAID, all I had to do was run the following command

sudo raidutil -a rebuild d0b0t0d0

Where d0b0t0d0 was the Address of the RAID system. Yours could be different. But how did I get this piece of information? From the command sudo raitutil -L logical. So I ran this command periodically and it showed the status of the RAID reconstruction. Once the process was completed, activity lights on both disks blinked together which I took to mean the process was successful.

Automatically Load i2o_config

I then restarted raidtest and what do I see? I am unable to run the raidutil command without getting the error: Engine connect failed: COMPATIBILITY number. So I look on the Internet and find a post (What directory to drivers go into) which tells me to modify the /etc/modules file. So I did just that, using the following process:

sudo vim /etc/modules

Add the following at the end of the file, on its own line, of course


Then save the file. I restarted and ran the raidutil command. It gave me results immediately and successfully. What did I learn? You have to load the i2o_config module at startup to be able to use raidutil. Otherwise you have to manually do it every time your computer reboots.

Testing the RAID

It is a very unscientific test but BitTorrent is fairly disk-use intensive. So I just downloaded a BitTorrent client: Deluge.

sudo apt-get install deluge-torrent

And then I started a few torrents of Ubuntu and CentOS ISOs to make sure the drives were working together and working well. I intend to put the new system through its paces before trusting it enough for everyday use.


My experience with hardware-based RAID has shown that it is quite simple to use and troubleshoot. Whatever I have seen of software RAID looks simple enough. Maybe one day I will try that as well.

The following tips should help you out:

  • Make sure that the controller you use is well supported by Linux and also by the distribution of your choice.
  • Make sure that you know how to configure it at the BIOS level. This also includes reconstructing an array.
  • Find out what utilities are available from Linux to monitor and manage the RAID.
  • Test your system for failures and how to recover from them.
  • Once everything is working fine, test the whole system by doing some disk intensive tasks.

4 Responses to Hardware RAID 1 on Ubuntu

  1. Olivier says:

    Are you sure about “sudo mknod /dev/i2o/ctl c 10 166”, shouldn’t that be “sudo mknod /dev/i2octl c 10 166”?

  2. Olivier says:

    Hmmm, it seems you are right:
    open(“/dev/i2o/ctl”, O_RDONLY) = -1 ENOENT (No such file or directory)

  3. Sergio says:

    I’m so used to software RAID that I have never even tried to use hardware based. I’ll find sometime for doing some tests.

    Just a comment, to setup a RAID 1 using ubuntu desktop you don’t need the alternate cd you can also create the array using mdadm and after use the GUI installer (ubiquity): http://blog.foobaria.com/2010/05/installing-ubuntu-1004-desktop-with.html

  4. J.C. Denton says:

    Thanks for your post, HS!

    However with my raid controller the whole procedure didn’t work aout fine. It seems like it’s not supported by raidutils/i2o yet.

    03:06.0 RAID bus controller: Silicon Image, Inc. Adaptec AAR-1210SA SATA HostRAID Controller (rev 02) (prog-if 01)
    Subsystem: Adaptec Unknown device 0240
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-
    Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- SERR- <PERR-
    Latency: 64, Cache Line Size: 64 bytes
    Interrupt: pin A routed to IRQ 20
    Region 0: I/O ports at ec00 [size=8]
    Region 1: I/O ports at e880 [size=4]
    Region 2: I/O ports at e800 [size=8]
    Region 3: I/O ports at e480 [size=4]
    Region 4: I/O ports at e400 [size=16]
    Region 5: Memory at febff800 (32-bit, non-prefetchable) [size=512]
    Expansion ROM at feb00000 [disabled] [size=512K]

    The message I received was:
    osdOpenEngine : 04/08/112-02:16:24 Fatal error, no active controller device files found.

    Looks like I’ll have to check out the Adaptec ARC (Raid Controller BIOS) once in a while and choose the manual rebuild option. It’s not perfect, but better than nothing.

%d bloggers like this: