Sebastian Mogilowskis Blog

Just another blog about administration, linux and other stuff

Language: German English

Linux Software RAID 5 on Debian Lenny or Ubuntu

Update für meinen alten Artikel http://www.mogilowski.net/lang/de-de/2008/05/09/linux-software-raid-5-unter-debian-etch für Ubuntu und Debian Lenny.

In dieser Konfiguration sollen die Festplatten sda, sdb, sdc und sdd zu einem RAID 5 verbunden werden. (Sollte man also ggf. an seine eigene Konfiguration anpassen)

1. Installation

aptitude install mdadm

2. Raid anlegen

In der Konfigurationsdatei “/etc/mdadm/mdadm.conf” folgende Zeile anfügen:

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

Danach kann man das Software RAID erzeugen mit:

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

Der folgende Befehl zeigt ein paar Informationen über das neue Raid an:

mdadm --detail /dev/md0

Unter anderem ist folgende Zeile wichtig:

Rebuild Status : 2% complete

Das RAID wird also im Hintergrund gerade aufgebaut. Es kann aber bereits verwendet werden. Außerdem:

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

Zeigt an, dass alle 4 Festplatten arbeiten und keine ausgefallen ist.

3. Formatieren

Nun kann die Raid Festplatte md0 wie jede andere formatiert werden zum Beispiel mit EXT3:

mke2fs -j /dev/md0

Danach kann man die Partiton mounten:

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

bzw. zur “/etc/fstab” hinzufügen:

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

, , , ,

3 Responses to “Linux Software RAID 5 on Debian Lenny or Ubuntu”

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

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