Rate this post

2.1. I’m running [insert your linux distribution here]. Do I need to patch my kernel to make RAID work?

Well, the short answer is, it depends. Some distributions are using the RAID 0.90 patches, while others leave the kernel with the older md code. Unfortunately, I don’t have a list of which distributions have which kernels. If you’d like to maintain such a list, please email me as well as the linux-raid mailing list.

If you download a 2.2.x kernel from, then you will need to patch your kernel.

2.2. How can I tell if I need to patch my kernel?

That depends on which kernel series you’re using. If you’re using the 2.4.x kernels, then you’ve already got the latest RAID code that’s available. If you’re running 2.2.x, see the following instructions on how to find out.

The easiest way is to check what’s in /proc/mdstat. Here’s a sample from a 2.2.x kernel, with the RAID patches applied.


[gleblanc@grego1 gleblanc]$ cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid5] [translucent]
read_ahead not set
unused devices: 

If the contents of /proc/mdstat looks like the above, then you don’t need to patch your kernel.

The « Personalities » line in your kernel may not look exactly like the above, if you have RAID compiled as modules. Most distributions will have RAID compiled as modules to save space on the boot diskette. If you’re not using any RAID sets, then you will probably see a blank space at the end of the « Personalities » line, don’t worry, that just means that the RAID modules aren’t loaded yet.

Here’s a sample from a 2.2.x kernel, without the RAID patches applied.

Lire aussi...  Atlanta Showcase Report Issue 19
[root@serek ~]# cat /proc/mdstat 
Personalities : [1 linear] [2 raid0] 
read_ahead not set 
md0 : inactive 
md1 : inactive 
md2 : inactive 
md3 : inactive 


If your /proc/mdstat looks like this one, then you need to patch your kernel.

2.3. Where can I get the latest RAID patches for my kernel?

The patches for the 2.2.x kernels up to, and including, 2.2.13 are available from Use the kernel patch that most closely matches your kernel revision. For example, the 2.2.11 patch can also be used on 2.2.12 and 2.2.13.

The patches for 2.2.14 and later kernels are at Use the right patch for your kernel, these patches haven’t worked on other kernel revisions yet. Please use something like wget/curl/lftp to retrieve this patch, as it’s easier on the server than using a client like Netscape. Downloading patches with Lynx has been unsuccessful for me; wget may be the easiest way.

2.4. How do I apply the patch to a kernel that I just downloaded from

First, unpack the kernel into some directory, generally people use /usr/src/linux. Change to this directory, and type patch -p1 < /path/to/raid-version.patch.

2.5. What kind of drives can I use RAID with? Do only SCSI or IDE drives work? Do I need different patches for different kinds of drives?

Software RAID works with any block device in the Linux kernel. This includes IDE and SCSI drives, as well as most harware RAID controllers. There are no different patches for IDE drives vs. SCSI drives.