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