how to setup linux software RAID 10

Stefano Rivera ubuntu-edubuntu-devel at
Sat Aug 25 23:15:58 BST 2007

Hi Joe (2007.08.25_21:35:38_+0200)
> My wish list:
> Step by step instructions, with a FAQ, some screen snapshots etc.
> Things like, now you have completed this so you should see this...

Every distro is different. These things aren't static. But when you are
used to it, you know what to do.

Software Raid 10 in linux is rather new, and so probably isn't well
documented. Personally, I've never used RAID 10, all my servers use RAID
1, and if they have lots of disks, RAID 5. (Often system on RAID1, data
on RAID5) And they use LVM on top of that.

The debian installer (which is on the ubuntu alternate install CDs) does
software RAID and LVM, and it's easy. The principle to create a RAID
device is:
* Create a partition on each drive, and set it's type to RAID.
* Go into the RAID menu, and create a RAID device out of those
* Now on the partitioning screen, you'll see a RAID drive /dev/md* turn
  it into an LVM PV or a filesystem.

My normal approach is:
2 system disks, not massive, but good value for money size, with 2
partitions on them
* The first partition is for /dev/md0: maybe 10GB. It houses /
* The second partition is for /dev/md1: It houses an LVM PV & VG called
* /home is an LV on system
* swap is an LV on system
* /usr is an LV on system, if my install grows beyond 10G
* Anything else special is an LV on system (i.e. /srv/www or /tmp or
If it's a big server, The rest of the disks contain a single partition
for RAID5, which is a separate LVM group, data.

> How do I set it up so it boots?

The best approach is to make sure that /boot is readable without
anything special. So make sure it's part of a RAID1.

If you are using kernels without initrds (which all my debian servers
do), then you want the whole / to be like that. This also helps with

> Which drives should be paired together?

I don't follow, aren't the drives all identical?

> (Is each SATA drive on its own channel?

Yes. SATA doesn't share channels, unless you use port multipliers (which
aren't currently supported in Linux, AFAIK, and anyway, the SATA bus has
enough bandwidth to handle a few drives on each port).

> Do I have to do anything special for swap?

If you want performance, you can create a single swap partition on each
drive, and just swapon them all. This has no redundancy, i.e. disk goes
down the server will crash.

More common is to just stick the swap on RAID/LVM like everything else.


Stefano Rivera
  H: +27 21 794 7937   C: +27 72 419 8559

More information about the edubuntu-users mailing list