~qbalazs/installation-guide/lp1030336

« back to all changes in this revision

Viewing changes to fi/using-d-i/modules/mdcfg.xml

  • Committer: joeyh
  • Date: 2005-10-07 19:51:38 UTC
  • Revision ID: vcs-imports@canonical.com-20051007195138-c3d57b2617a79a4f
move manual to top-level directory, split out of debian-installer package

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!-- retain these comments for translator revision tracking -->
 
2
<!-- original version: 30377 untranslated -->
 
3
 
 
4
   <sect3 id="mdcfg">
 
5
   <title>Configuring Multidisk Device (Software RAID)</title>
 
6
<para>
 
7
 
 
8
If you have more than one harddrive<footnote><para>
 
9
 
 
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
 
12
useful.
 
13
 
 
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>).
 
19
 
 
20
</para><para>
 
21
 
 
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,
 
26
etc.).
 
27
 
 
28
</para><para>
 
29
 
 
30
The benefit you gain depends on a type of a MD device you are
 
31
creating. Currently supported are:
 
32
 
 
33
<variablelist>
 
34
<varlistentry>
 
35
 
 
36
<term>RAID0</term><listitem><para>
 
37
 
 
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
 
44
failed disk).
 
45
 
 
46
</para><para>
 
47
 
 
48
The typical use for RAID0 is a partition for video editing.
 
49
 
 
50
</para></listitem>
 
51
</varlistentry>
 
52
<varlistentry>
 
53
 
 
54
<term>RAID1</term><listitem><para>
 
55
 
 
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.
 
65
 
 
66
</para><para>
 
67
 
 
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.
 
70
 
 
71
</para></listitem>
 
72
</varlistentry>
 
73
<varlistentry>
 
74
 
 
75
<term>RAID5</term><listitem><para>
 
76
 
 
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.
 
88
 
 
89
</para><para>
 
90
 
 
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
 
94
information.
 
95
 
 
96
</para></listitem>
 
97
</varlistentry>
 
98
</variablelist>
 
99
 
 
100
To sum it up:
 
101
 
 
102
<informaltable>
 
103
<tgroup cols="5">
 
104
<thead>
 
105
<row>
 
106
  <entry>Type</entry>
 
107
  <entry>Minimum Devices</entry>
 
108
  <entry>Spare Device</entry>
 
109
  <entry>Survives disk failure?</entry>
 
110
  <entry>Available Space</entry>
 
111
</row>
 
112
</thead>
 
113
 
 
114
<tbody>
 
115
<row>
 
116
  <entry>RAID0</entry>
 
117
  <entry>2</entry>
 
118
  <entry>no</entry>
 
119
  <entry>no</entry>
 
120
  <entry>Size of the smallest partition multiplied by number of devices in RAID</entry>
 
121
</row>
 
122
 
 
123
<row>
 
124
  <entry>RAID1</entry>
 
125
  <entry>2</entry>
 
126
  <entry>optional</entry>
 
127
  <entry>yes</entry>
 
128
  <entry>Size of the smallest partition in RAID</entry>
 
129
</row>
 
130
 
 
131
<row>
 
132
  <entry>RAID5</entry>
 
133
  <entry>3</entry>
 
134
  <entry>optional</entry>
 
135
  <entry>yes</entry>
 
136
  <entry>
 
137
    Size of the smallest partition multiplied by (number of devices in
 
138
    RAID minus one)
 
139
  </entry>
 
140
</row>
 
141
 
 
142
</tbody></tgroup></informaltable>
 
143
 
 
144
</para><para>
 
145
 
 
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>.
 
148
 
 
149
<note arch="powerpc" condition="sarge"><para>
 
150
 
 
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.
 
154
 
 
155
</para></note>
 
156
 
 
157
</para><para>
 
158
 
 
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>.)
 
165
 
 
166
</para><warning><para>
 
167
 
 
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.
 
174
 
 
175
</para></warning><para>
 
176
 
 
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.
 
183
</para>
 
184
 
 
185
<itemizedlist>
 
186
<listitem><para>
 
187
 
 
188
RAID0 is simple &mdash; you will be issued with the list of available
 
189
RAID partitions and your only task is to select the partitions which
 
190
will form the MD.
 
191
 
 
192
</para></listitem>
 
193
<listitem><para>
 
194
 
 
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.
 
203
 
 
204
</para></listitem>
 
205
<listitem><para>
 
206
 
 
207
RAID5 has similar setup procedure as RAID1 with the exception that you
 
208
need to use at least <emphasis>three</emphasis> active partitions.
 
209
 
 
210
</para></listitem>
 
211
</itemizedlist>
 
212
 
 
213
<para>
 
214
 
 
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>).
 
221
 
 
222
</para><para>
 
223
 
 
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.
 
228
 
 
229
</para>
 
230
   </sect3>