Merge remote-tracking branch 'origin/github/pr/45'
[grml.org.git] / raid / index.html
1 <html>
2 <head>
3 <title>raid</title>
4 <link rel="stylesheet" href="http://michael-prokop.at/style.css" type="text/css" />
5 </head>
6
7 <body>
8
9 <h1>RAID with Linux</h1>
10
11 <h2>'Real' Hardware RAID</h2>
12
13 <h3>3ware controller</h3>
14
15 <p><a href="http://www.3ware.com/">3ware</a> controllers are supported in Vanilla
16 kernel since 'ages'. A command line interface namend <a
17 href="http://www.panduck.com/media/tw_cli.8.html">tw_cli</a> is available on <a
18 href="http://www.3ware.com/support/download.asp">the download webpage at
19 3ware.com</a>. A webinterface (providing remote access) is available through the
20 debian-unofficial.org-project:
21
22 <pre class="rahmen">
23 deb     http://ftp.debian-unofficial.org/debian sarge main contrib non-free restricted
24 deb-src http://ftp.debian-unofficial.org/debian sarge main contrib non-free restricted</pre>
25
26 There are two packages available: 3ware-3dm2-new-binary (for 3ware 9550SX) and
27 3ware-3dm2-old-binary (for 3ware 700x, 750x, 800x, 850x, 900xS, 950xS).
28 3ware-3dm2-old-binary is included in <a href="http://grml.org/">grml</a>.
29
30 <h3>ICP Vortex</h3>
31
32 <p><a href="http://www.icp-vortex.com/">ICP Vortex</a> should work as well and
33 provides <a
34 href="http://www.vortex.de/german/download/rz_neu/linux/linux_d.htm">linux
35 drivers</a> as well, but I've no experience in using them yet...</p>
36
37 <h2>'Fake' Hardware RAID</h2>
38
39 <p>That's stuff like Intel ICHx, VIA, Silicon, Adaptec and Promise RAID. Accessing
40 such a RAID is possible with kernel 2.6 using <a
41 href="http://sources.redhat.com/dm/">device mapper ('DM')</a> and <a
42 href="http://people.redhat.com/~heinzm/sw/dmraid/">dmraid</a> (both provided by <a
43 href="http://grml.org/">grml</a>) [kernel 2.4 requires ataraid].</p>
44
45 <h2>Linux Software RAID</h2>
46
47 <p>Important: there's a lot of documentation hanging around, describing how to use
48 software raid with raidtools2. raidtools2 is not maintained by its upstream
49 developers anymore and has been replaced by the package mdadm.  The last debian
50 package version of raidtools2 shipping the binaries is 1.00.3-17 (available on <a
51 href="http://grml.org/">grml</a>), afterwards it's just a dummy package with
52 dependency on mdadm.</p>
53
54 <p>Things to take care of:</p>
55
56 <ul>
57   <li>don't take RAID as a backup</li>
58   <li>test the setup (remove disk, restore,...) before going productive</li>
59   <li>use every disk on its own bus if possible</li>
60 </ul>
61
62 <h3>Installing grml using grml2hd on a bootable SW-RAID ('/' on RAID)</h3>
63
64 <pre class="rahmen">
65 cfdisk /dev/hda                   # select type FD (Linux raid autodetect)
66 cfdisk /dev/hdc                   # select type FD (Linux raid autodetect)
67 mdadm --create --verbose /dev/md0 --level=raid1 --raid-devices=2 /dev/hda1 /dev/hdc1 # create raid
68 mdadm --detail /dev/md0           # show details of raid system
69 cat /proc/mdstat                  # now wait until raid sync has finished (otherwise performance sucks)
70 SWRAID='mbr-only' grml2hd /dev/md0 --mbr /dev/md0   # install grml to raid
71 cat /proc/mdstat                  # again wait until raid sync has finished
72 </pre>
73
74 <!--
75 <p>To be able to boot your system now you have to make sure that lilo is installed on
76 the first partition - in this case /dev/hda1.  Therefore stop /dev/md0 running 'mdadm
77 --manage --stop /dev/md0' and run lilo with the following /etc/lilo.conf (just the
78 relevant part of it):</p>
79
80 <pre class="rahmen">
81 boot=/dev/hda1 # maybe even with 'bios=0x80'? not yet sure if needed
82 root=/dev/md0</pre>
83
84 <p>Now reboot into your harddisk installation. Important: if the first partition (in
85 this case /dev/hda) is removed lilo won't boot anymore. Therefore we have to rerun
86 lilo setting the following options in /etc/lilo.conf:</p>
87
88 <pre class="rahmen">
89 boot=/dev/md0
90 root=/dev/md0
91 raid-extra-boot=/dev/hda,/dev/hdc</pre>
92
93 <p>That's it.</p>
94 -->
95
96 <h3>Often needed commands</h3>
97
98 <pre class="rahmen">
99 mdadm --detail /dev/md0                        # show details of raid system
100 cat /proc/mdstat                               # details of mdstat
101 mdadm --fail /dev/md0 /dev/hdc1                # mark disk as faulty
102 mdadm -r /dev/md0 /dev/hdc1                    # remove disk from array
103 mdadm -a /dev/md0 /dev/hdc1                    # integrate disk into array
104 mdadm --manage --stop /dev/md0                 # stop multidevice
105 mdadm --assemble /dev/md0 /dev/sda1 /dev/sdb1  # start multidevice</pre>
106
107 <h3>Links</h3>
108
109 <h4>German</h4>
110 <a href="http://glt05.linuxtage.at/slides/sw-raid.pdf">Jimmys slides from GLT05 talk: sw-raid.pdf</a><br />
111
112 <h4>English</h4>
113 <a href="http://www.linux-magazine.com/issue/33/Software_RAID.pdf">www.linux-magazine.com/issue/33/Software_RAID.pdf</a><br />
114 <a href="http://www.gentoo.org/doc/en/gentoo-x86-tipsntricks.xml#software-raid">http://www.gentoo.org/doc/en/gentoo-x86-tipsntricks.xml#software-raid</a><br />
115 <a href="http://tldp.org/HOWTO/Software-RAID-HOWTO.html">http://tldp.org/HOWTO/Software-RAID-HOWTO.html</a><br />
116 <a href="http://www.devil-linux.org/documentation/1.0.x/ch01s05.html">http://www.devil-linux.org/documentation/1.0.x/ch01s05.html</a><br />
117 <a href="http://lca2005.linux.org.au/Papers/Theodore%20Ts'o/Recovering%20from%20Hard%20Drive%20Disasters/slides.pdf">http://lca2005.linux.org.au/Papers/Theodore%20Ts'o/Recovering%20from%20Hard%20Drive%20Disasters/slides.pdf</a><br />
118 <a href="http://www.midhgard.it/docs/lvm/Root-on-LVM-on-RAID-HOWTO.pdf">http://www.midhgard.it/docs/lvm/Root-on-LVM-on-RAID-HOWTO.pdf</a><br />
119 <a href="http://www.fsugar.be/docu/fs-lvm-md.pdf">http://www.fsugar.be/docu/fs-lvm-md.pdf</a><br />
120 <a href="http://oxygen.chem.nthu.edu.tw/~jsyu/linux/debk26.pdf">http://oxygen.chem.nthu.edu.tw/~jsyu/linux/debk26.pdf</a><br />
121 <a href="http://datadisk.co.uk/doc/software_raid.pdf">http://datadisk.co.uk/doc/software_raid.pdf</a><br />
122 <a href="http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/pdf/Software-RAID-HOWTO.pdf">http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/pdf/Software-RAID-HOWTO.pdf</a><br />
123
124 <h2>Windows Software RAID</h2>
125
126 <p>Notice: if you have any chance to boot Windows for accessing the SW-RAID this
127 methode should be prefered. If you can't boot anymore try to boot with a Windows
128 Live-CD (using <a href="http://www.nu2.nu/pebuilder/">BartPE</a>).  The command line
129 tool <a href="http://support.microsoft.com/kb/300415/EN-US/">diskpart</a> is very
130 useful (start using it via 'select disk $NUMBER', 'detail disk', 'list disk', 'list
131 volume',...).</p>
132
133 <h3>Links</h3>
134
135 <h4>German</h4>
136 <a href="http://support.microsoft.com/default.aspx?scid=kb;DE;q175761">Vergleich von
137 dynamischem Speicher und Basisspeicher in Windows 2000 und Windows XP</a><br />
138
139 <h4>English</h4>
140 <a href="http://support.microsoft.com/kb/314343/EN-US/">Basic Storage Versus Dynamic
141 Storage in Windows XP</a><br />
142 <a
143 href="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/diskpart.mspx">DiskPart
144 @ WinXP documentation</a><br />
145
146 <h2>Terms</h2>
147
148 <ul>
149   <li><a href="http://sources.redhat.com/dm/">device-mapper</a>: component of the
150   linux kernel that supports logical volume management (that's the main logical volume manager)
151   <li><a href="http://sources.redhat.com/dm/">dmsetup</a>: userspace configuration tool for device-mapper, (let's you) create(s) a device out of a partition, raid,...
152   <li><a href="http://people.redhat.com/~heinzm/sw/dmraid/">dmraid</a>: based upon device-mapper, searches for 'fake' raids
153   <li><a href="http://www.saout.de/misc/">dm-crypt and cryptsetup</a>: encryption target of device-mapper, doing block-level encryption using device-mapper
154   <li><a href="http://sources.redhat.com/lvm2/">lvm2</a>: logical volume management
155   (found in linux 2.6 kernels)
156   <li>lvm: old, original lvm (found in linux 2.4 kernels)
157   <li><a href="http://evms.sourceforge.net/">evms</a>: Enterprise Volume Management System, handling Software-RAID and logical
158   volume groups
159   <li><a href="http://christophe.varoqui.free.fr/wiki/wakka.php?wiki=Home">multipath-tools</a>:
160 </ul>
161
162 </body>
163 </html>