Document a method for rebuilding ATA RAID1. Tested on a HighPoint ATA

controller with hot-swap.

Submitted by:	Roy Hooper <rhooper@cyberus.ca> (Original version)
This commit is contained in:
Tom Rhodes 2002-11-24 21:33:22 +00:00
parent e6d62a9464
commit ed3fb7afa9
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=15023

View file

@ -570,6 +570,94 @@ sh MAKEDEV ccd0</programlisting>
accordingly.
</para>
</sect2>
<sect2>
<title>Rebuilding ATA RAID1 Arrays</title>
<para>FreeBSD allows you to hot-replace a failed disk in an array. This requires
that you catch it before you reboot.</para>
<para>You will probably see something like the following in the syslog/dmesg
output:</para>
<programlisting>ad6 on monster1 suffered a hard error.
ad6: READ command timeout tag=0 serv=0 - resetting
ad6: trying fallback to PIO mode
ata3: resetting devices .. done
ad6: hard error reading fsbn 1116119 of 0-7 (ad6 bn 1116119; cn 1107 tn 4 sn 11) status=59 error=40
ar0: WARNING - mirror lost</programlisting>
<para>Using &man.atacontrol.8;, check to see how things look:</para>
<screen>&prompt.root; <userinput>atacontrol list</userinput></screen>
<programlisting>ATA channel 0:
Master: no device present
Slave: acd0 &lt;HL-DT-ST CD-ROM GCR-8520B/1.00&gt; ATA/ATAPI rev 0
ATA channel 1:
Master: no device present
Slave: no device present
ATA channel 2:
Master: ad4 &lt;MAXTOR 6L080J4/A93.0500&gt; ATA/ATAPI rev 5
Slave: no device present
ATA channel 3:
Master: ad6 &lt;MAXTOR 6L080J4/A93.0500&gt; ATA/ATAPI rev 5
Slave: no device present</programlisting>
<screen>&prompt.root; <userinput>atacontrol status ar0</userinput></screen>
<programlisting>ar0: ATA RAID1 subdisks: ad4 ad6 status: DEGRADED</programlisting>
<procedure>
<step>
<para>You will first need to detach the disk from the array so that you can
safely remove it:</para>
<screen>&prompt.root; <userinput>atacontrol detach 3</userinput></screen>
</step>
<step>
<para>Replace the disk.</para>
</step>
<step>
<para>Reattach the disk as a spare:</para>
<screen>&prompt.root; <userinput>atacontrol attach 3</userinput></screen>
<programlisting>Master: ad6 &lt;MAXTOR 6L080J4/A93.0500&gt; ATA/ATAPI rev 5
Slave: no device present</programlisting>
<step>
<para>Rebuild the array:</para>
<screen>&prompt.root; <userinput>atacontrol rebuild ar0</userinput></screen>
</step>
<step>
<para>The rebuild command hangs until complete, its possible to open another
terminal and check on the progress by issuing the following command:</para>
<screen>&prompt.root; <userinput>dmesg | tail -10</userinput></screen>
<programlisting>[output removed]
ad6: removed from configuration
ad6: deleted from ar0 disk1
ad6: inserted into ar0 disk1 as spare</programlisting>
<screen>&prompt.root; <userinput>atacontrol status ar0</userinput></screen>
<programlisting>ar0: ATA RAID1 subdisks: ad4 ad6 status: REBUILDING 0% completed</programlisting>
</step>
<step>
<para>Wait until this operation completes.</para>
</step>
</procedure>
</sect2>
</sect1>
<sect1 id="creating-cds">