/[gentoo]/xml/htdocs/doc/en/gentoo-x86-tipsntricks.xml
Gentoo

Diff of /xml/htdocs/doc/en/gentoo-x86-tipsntricks.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.6 Revision 1.7
14submitted tips and tricks for reference purposes. 14submitted tips and tricks for reference purposes.
15</abstract> 15</abstract>
16 16
17<license/> 17<license/>
18 18
19<version>1.3</version> 19<version>1.4</version>
20<date>August 01, 2004</date> 20<date>August 01, 2004</date>
21 21
22<chapter> 22<chapter>
23<title>Introduction</title> 23<title>Introduction</title>
24<section> 24<section>
94You can alter the partition type using the <c>t</c> command in <c>fdisk</c>. 94You can alter the partition type using the <c>t</c> command in <c>fdisk</c>.
95</p> 95</p>
96 96
97<p> 97<p>
98After partitioning, create the <path>/etc/raidtab</path> file (yes, indeed, on 98After partitioning, create the <path>/etc/raidtab</path> file (yes, indeed, on
99the LiveCD environment) and insert the necessary commands for your RAID setup. 99the LiveCD environment) using <c>mdadm</c>, an advanced tool for <uri
100link="http://www.linuxdevcenter.com/pub/a/linux/2002/12/05/RAID.html">RAID
100For instance, to have your boot, swap and root partition mirrored (RAID-1) 101management</uri>. For instance, to have your boot, swap and root partition
101covering <path>/dev/sda</path> and <path>/dev/sdb</path>, you can use: 102mirrored (RAID-1) covering <path>/dev/sda</path> and <path>/dev/sdb</path>,
102</p> 103you can use:
103
104<pre caption="/etc/raidtab for RAID-1 setup">
105raiddev /dev/md0
106 raid-level 1
107 nr-raid-disks 2
108 chunk-size 32
109 persistent-superblock 1
110 device /dev/sda1
111 raid-disk 0
112 device /dev/sdb1
113 raid-disk 1
114
115raiddev /dev/md1
116 raid-level 1
117 nr-raid-disks 2
118 chunk-size 32
119 persistent-superblock 1
120 device /dev/sda2
121 raid-disk 0
122 device /dev/sdb2
123 raid-disk 1
124
125raiddev /dev/md2
126 raid-level 1
127 nr-raid-disks 2
128 chunk-size 32
129 persistent-superblock 1
130 device /dev/sda3
131 raid-disk 0
132 device /dev/sdb3
133 raid-disk 1
134</pre>
135
136<p> 104</p>
137Now create the necessary RAID devices for each RAID device you listed in
138<path>/etc/raidtab</path>:
139</p>
140 105
141<pre caption="Creating RAID devices"> 106<pre caption="mdadm command example">
142# <i>mkraid /dev/md0</i> 107# <i>mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1</i>
143# <i>mkraid /dev/md1</i> 108# <i>mdadm --create --verbose /dev/md1 --level=1 --raid-devices=2 /dev/sda2 /dev/sdb2</i>
144# <i>mkraid /dev/md2</i> 109# <i>mdadm --create --verbose /dev/md2 --level=1 --raid-devices=2 /dev/sda3 /dev/sdb3</i>
145</pre> 110</pre>
146 111
147<p> 112<p>
148The Linux Software RAID driver will start creating the metadevices. You can see 113The Linux Software RAID driver will start creating the metadevices. You can see
149its progress in <path>/proc/mdstat</path>. Wait until the metadevices are 114its progress in <path>/proc/mdstat</path>. Wait until the metadevices are

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.20