<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https:///index.php?action=history&amp;feed=atom&amp;title=Mdadm</id>
	<title>Mdadm - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https:///index.php?action=history&amp;feed=atom&amp;title=Mdadm"/>
	<link rel="alternate" type="text/html" href=""/>
	<updated>2026-04-07T09:26:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id></id>
		<title>Gr0x0rd: /* Using RAID */</title>
		<link rel="alternate" type="text/html" href=""/>
		<updated>2011-05-11T04:59:37Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Using RAID&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 04:59, 11 May 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l19&quot; &gt;Line 19:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 19:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  watch cat /proc/mdstat&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  watch cat /proc/mdstat&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You can now proceed with building your system, using md1, md2 and md3 in the place of sd1, sd2 and sd3.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You can now proceed with building your system, using md1, md2 and md3 in the place of sd1, sd2 and sd3.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== Replacing a dead disk ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;If one of the drives in your array has died, you&amp;#039;ll need to replace it. Once you have connected the new drive and powered up your system, copy the partition table from one of the surviving disks to the new drive. In this example, the new drive is recognized as &amp;#039;&amp;#039;/dev/sdY&amp;#039;&amp;#039;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo sfdisk -d /dev/sda &amp;gt; sda.tmp&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sfdisk /dev/sdY &amp;lt; sda.tmp&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Now that the partition table is ready, you can use mdadm to rebuild the array. Here, X is the array in question [1-3], Y is the letter of the drive in question [a-d], and Z is the partition in question [1-3] based on the partition table setup explained above. Repeat as necessary for each array.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo mdadm /dev/mdX [-r /dev/sdYZ] -a /dev/sdYZ&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Gr0x0rd</name></author>
	</entry>
	<entry>
		<id></id>
		<title>Gr0x0rd: Created page with &quot;== Using RAID ==  If you have multiple hard drives, you may want to consider using RAID for the purpose of redundancy. Often, a dead drive can result in a dead system, and withou...&quot;</title>
		<link rel="alternate" type="text/html" href=""/>
		<updated>2011-05-11T04:37:31Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Using RAID ==  If you have multiple hard drives, you may want to consider using RAID for the purpose of redundancy. Often, a dead drive can result in a dead system, and withou...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Using RAID ==&lt;br /&gt;
&lt;br /&gt;
If you have multiple hard drives, you may want to consider using RAID for the purpose of redundancy. Often, a dead drive can result in a dead system, and without frequent backups, not having RAID leaves you vulnerable to catastrophic data loss. &lt;br /&gt;
&lt;br /&gt;
While mdadm provides redundancy for your data, it also is software based, so it consumes CPU cycles to perform its operations. If a drive is lost and an array needing to be rebuilt, your system will suffer from performance issues until the rebuild is completed. However, this is a small price to pay for safeguarding your system and your data.&lt;br /&gt;
&lt;br /&gt;
This example uses four SATA hard drives (sda, sdb, sdc and sdd) in a RAID5 configuration for the root and swap partitions, and RAID1 for the boot partition. Since the kernel needs to be loaded from the boot partition, and mdadm cannot be run without the kernel or another boot device, the only configuration for a bootable software RAID linux system is RAID1.&lt;br /&gt;
&lt;br /&gt;
Once you have partitioned your primary disk, you&amp;#039;ll need to copy the partition table to the other drives you&amp;#039;ll be leveraging in your RAID array. &lt;br /&gt;
 sfdisk -d /dev/sda &amp;gt; sda.tmp&lt;br /&gt;
 sfdisk /dev/sdb &amp;lt; sda.tmp&lt;br /&gt;
 sfdisk /dev/sdc &amp;lt; sda.tmp&lt;br /&gt;
 sfdisk /dev/sdd &amp;lt; sda.tmp&lt;br /&gt;
Initialize the arrays using mdadm. Note that newer versions of mdadm are not compatible with the current linux kernel without grub2 and an initramfs (May 2011) so the option &amp;#039;&amp;#039;--metadata=0.9&amp;#039;&amp;#039; needs to be included.&lt;br /&gt;
 mdadm --create --verbose --metadata=0.9 /dev/md1 --level=1 --raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1 &lt;br /&gt;
 mdadm --create --verbose --metadata=0.9 /dev/md2 --level=5 --raid-devices=4 /dev/sda2 /dev/sdb2 /dev/sdc2 /dev/sdd2&lt;br /&gt;
 mdadm --create --verbose --metadata=0.9 /dev/md3 --level=5 --raid-devices=4 /dev/sda3 /dev/sdb3 /dev/sdc3 /dev/sdd3&lt;br /&gt;
View the status of the newly created arrays using &lt;br /&gt;
 watch cat /proc/mdstat&lt;br /&gt;
You can now proceed with building your system, using md1, md2 and md3 in the place of sd1, sd2 and sd3.&lt;/div&gt;</summary>
		<author><name>Gr0x0rd</name></author>
	</entry>
</feed>