1
<!-- retain these comments for translator revision tracking -->
2
<!-- original version: 30377 untranslated -->
6
<title>Configuring Multidisk Device (Software RAID)</title>
9
If you have more than one harddrive<footnote><para>
11
To be honest, you can construct MD device even from partitions
12
residing on single physical drive, but that won't bring you anything
15
</para></footnote> in your computer, you can use
16
<command>mdcfg</command> to setup your drives for increased
17
performance and/or better reliability of your data. The result is
18
called <firstterm>Multidisk Device</firstterm> (or after its most
19
famous variant <firstterm>software RAID</firstterm>).
23
MD is basically a bunch of partitions located on different disks and
24
combined together to form a <emphasis>logical</emphasis> device. This
25
device can then be used like an ordinary partition (i.e. in
26
<command>partman</command> you can format it, assign a mountpoint,
31
The benefit you gain depends on a type of a MD device you are
32
creating. Currently supported are:
37
<term>RAID0</term><listitem><para>
39
Is mainly aimed at performance. RAID0 splits all incoming data into
40
<firstterm>stripes</firstterm> and distributes them equally over each
41
disk in the array. This can increase the speed of read/write
42
operations, but when one of the disks fails, you will loose
43
<emphasis>everything</emphasis> (part of the information is still on
44
the healthy disk(s), the other part <emphasis>was</emphasis> on the
49
The typical use for RAID0 is a partition for video editing.
55
<term>RAID1</term><listitem><para>
57
Is suitable for setups where reliability is the first concern. It
58
consists of several (usually two) equally sized partitions where every
59
partition contains exactly the same data. This essentially means three
60
things. First, if one of your disks fails, you still have the data
61
mirrored on the remaining disks. Second, you can use only a fraction
62
of the available capacity (more precisely, it is the size of the
63
smallest partition in the RAID). Third, file reads are load balanced among
64
the disks, which can improve performance on a server, such as a file
65
server, that tends to be loaded with more disk reads than writes.
69
Optionally you can have a spare disk in the array which will take the
70
place of the failed disk in the case of failure.
76
<term>RAID5</term><listitem><para>
78
Is a good compromise between speed, reliability and data redundancy.
79
RAID5 splits all incomming data into stripes and distributes them
80
equally on all but one disks (similar to RAID0). Unlike RAID0, RAID5
81
also computes <firstterm>parity</firstterm> information, which gets
82
written on the remaining disk. The parity disk is not static (that
83
would be called RAID4), but is changing periodically, so the parity
84
information is distributed equally on all disks. When one of the
85
disks fails, the missing part of information can be computed from
86
remaining data and its parity. RAID5 must consist of at least three
87
active partitions. Optionally you can have a spare disk in the array
88
which will take the place of the failed disk in the case of failure.
92
As you can see, RAID5 has similar degree of reliability like RAID1
93
while achieving less redundancy. On the other hand it might be a bit
94
slower on write operation than RAID0 due to computation of parity
108
<entry>Minimum Devices</entry>
109
<entry>Spare Device</entry>
110
<entry>Survives disk failure?</entry>
111
<entry>Available Space</entry>
121
<entry>Size of the smallest partition multiplied by number of devices in RAID</entry>
127
<entry>optional</entry>
129
<entry>Size of the smallest partition in RAID</entry>
135
<entry>optional</entry>
138
Size of the smallest partition multiplied by (number of devices in
143
</tbody></tgroup></informaltable>
147
If you want to know the whole truth about Software RAID, have a look
148
at <ulink url="&url-software-raid-howto;">Software RAID HOWTO</ulink>.
150
<note arch="powerpc" condition="sarge"><para>
152
There is no widely accepted standard to identify partitions containing
153
RAID data on Apple Power Macintosh hardware. This means that &d-i;
154
currently does not support setting up RAID on this platform.
160
To create a MD device, you need to have the desired partitions it
161
should consist of marked for use in a RAID. (This is done in
162
<command>partman</command> in the <guimenu>Partition
163
settings</guimenu> menu where you should select <menuchoice>
164
<guimenu>Use as:</guimenu> <guimenuitem>physical volume for
165
RAID</guimenuitem> </menuchoice>.)
167
</para><warning><para>
169
Support for MD is a relatively new addition to the installer.
170
You may experience problems for some RAID levels and in combination
171
with some bootloaders if you try to use MD for the root
172
(<filename>/</filename>) filesystem. For experienced users, it may be
173
possible to work around some of these problems by executing some
174
configuration or installation steps manually from a shell.
176
</para></warning><para>
178
Next, you should choose <guimenuitem>Configure software
179
RAID</guimenuitem> from the main <command>partman</command> menu.
180
On the first screen of <command>mdcfg</command> simply select
181
<guimenuitem>Create MD device</guimenuitem>. You will be presented with
182
a list of supported types of MD devices, from which you should choose
183
one (e.g. RAID1). What follows depends on the type of MD you selected.
189
RAID0 is simple — you will be issued with the list of available
190
RAID partitions and your only task is to select the partitions which
196
RAID1 is a bit more tricky. First, you will be asked to enter the
197
number of active devices and the number of spare devices which will
198
form the MD. Next, you need to select from the list of available RAID
199
partitions those that will be active and then those that will be
200
spare. The count of selected partitions must be equal to the number
201
provided few seconds ago. Don't worry. If you make a mistake and
202
select different number of partitions, the &d-i; won't let you
203
continue until you correct the issue.
208
RAID5 has similar setup procedure as RAID1 with the exception that you
209
need to use at least <emphasis>three</emphasis> active partitions.
216
It is perfectly possible to have several types of MD at once. For
217
example if you have three 200 GB hard drives dedicated to MD, each
218
containing two 100 GB partitions, you can combine first partitions on
219
all three disk into the RAID0 (fast 300 GB video editing partition)
220
and use the other three partitions (2 active and 1 spare) for RAID1
221
(quite reliable 100 GB partition for <filename>/home</filename>).
225
After you setup MD devices to your liking, you can
226
<guimenuitem>Finish</guimenuitem> <command>mdcfg</command> to return
227
back to the <command>partman</command> to create filesystems on your
228
new MD devices and assign them the usual attributes like mountpoints.