From ed3fb7afa91bf274af36073583e4dcc15bb04be2 Mon Sep 17 00:00:00 2001 From: Tom Rhodes Date: Sun, 24 Nov 2002 21:33:22 +0000 Subject: [PATCH] Document a method for rebuilding ATA RAID1. Tested on a HighPoint ATA controller with hot-swap. Submitted by: Roy Hooper (Original version) --- .../books/handbook/disks/chapter.sgml | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/en_US.ISO8859-1/books/handbook/disks/chapter.sgml b/en_US.ISO8859-1/books/handbook/disks/chapter.sgml index a87654d2ca..b09d5d04a2 100644 --- a/en_US.ISO8859-1/books/handbook/disks/chapter.sgml +++ b/en_US.ISO8859-1/books/handbook/disks/chapter.sgml @@ -570,6 +570,94 @@ sh MAKEDEV ccd0 accordingly. + + + Rebuilding ATA RAID1 Arrays + + FreeBSD allows you to hot-replace a failed disk in an array. This requires + that you catch it before you reboot. + + You will probably see something like the following in the syslog/dmesg + output: + + 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 + + Using &man.atacontrol.8;, check to see how things look: + + &prompt.root; atacontrol list + +ATA channel 0: + Master: no device present + Slave: acd0 <HL-DT-ST CD-ROM GCR-8520B/1.00> ATA/ATAPI rev 0 + +ATA channel 1: + Master: no device present + Slave: no device present + +ATA channel 2: + Master: ad4 <MAXTOR 6L080J4/A93.0500> ATA/ATAPI rev 5 + Slave: no device present + +ATA channel 3: + Master: ad6 <MAXTOR 6L080J4/A93.0500> ATA/ATAPI rev 5 + Slave: no device present + + &prompt.root; atacontrol status ar0 + + ar0: ATA RAID1 subdisks: ad4 ad6 status: DEGRADED + + + + You will first need to detach the disk from the array so that you can + safely remove it: + + &prompt.root; atacontrol detach 3 + + + + Replace the disk. + + + + Reattach the disk as a spare: + + &prompt.root; atacontrol attach 3 + + Master: ad6 <MAXTOR 6L080J4/A93.0500> ATA/ATAPI rev 5 +Slave: no device present + + + Rebuild the array: + + &prompt.root; atacontrol rebuild ar0 + + + + The rebuild command hangs until complete, its possible to open another + terminal and check on the progress by issuing the following command: + + &prompt.root; dmesg | tail -10 + + [output removed] +ad6: removed from configuration +ad6: deleted from ar0 disk1 +ad6: inserted into ar0 disk1 as spare + + &prompt.root; atacontrol status ar0 + + ar0: ATA RAID1 subdisks: ad4 ad6 status: REBUILDING 0% completed + + + + Wait until this operation completes. + + +