Linux Software RAID 5 on Debian Lenny or Ubuntu

This is an update Post for my old Howto http://www.mogilowski.net/2008/05/09/linux-software-raid-5-unter-debian-etch for Debian Lenny and Ubuntu.

In this configuration i created a raid 5 with the drives sda, sdb, sdc and sdc. (Change it to your configuration if you need it.)

1. Installation

aptitude install mdadm

2. Create Raid

Insert this line in the mdadm config file “/etc/mdadm/mdadm.conf”:

ARRAY /dev/md0 level=raid5 devices=/dev/sda,/dev/sdb,/dev/sdc,/dev/sdd

Now create the raid:

mdadm --create /dev/md0 --verbose --level=raid5 --raid-devices=4 /dev/sda /dev/sdb /dev/sdc /dev/sdd

The following command shows you some details of your new raid:

mdadm --detail /dev/md0

Look at:

Rebuild Status : 2% complete

This shows you, that the raid is build in background, but you can already use it if you like.

Active Devices : 4
Working Devices : 4
Failed Devices : 0
Spare Devices : 0

This shows you that all 4 disks are working and none of them is missing.

3. Format

Now format your new raid device. With ext3 for example:

mke2fs -j /dev/md0

Mount the new partition:

(mkdir /media/raid)
mount /dev/md0 /media/raid

or add it directly to /etc/fstab”:

/dev/md0 /media/raid ext3 suid,dev,exec  0  0

This Post Has 3 Comments

    1. Hi,

      recht hast du, das Raid auf Partitionen aufzusetzen ergab sich bei mir durch eine frühere Konfiguration. (Verschieden große Platten)
      In diesem neuen Howto macht es natürlich keinen Sinn und die Sache auch einfacher wenn man ohne Partitionen arbeitet.
      Habe alles nochmal aktualisiert und den entsprechenden Abschnitt geändert.

      Danke für den Hinweis und den Link !

Schreibe einen Kommentar

eMail-Benachrichtigung bei weiteren Kommentaren.
Auch möglich: Abo ohne Kommentar.

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.