Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Nov 2002 13:36:18 -0500
From:      "Roy Hooper" <rhooper@cyberus.ca>
To:        <doc@FreeBSD.org>
Subject:   ATA RAID rebuild steps
Message-ID:  <01ef01c28cd5$e33eedb0$c701140a@intranet.comnet.ca>

index | next in thread | raw e-mail


These notes are accurate for the HighPoint ATA controller with hot-swap
capable enclosures:

I am passing them on for potential inclusion in the handbook.


How to Rebuild ATA RAID1

FreeBSD allows you to hot-replace a failed disk in an array. This requires
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

Do a quick check to see how things are doing.

# 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

# atacontrol status ar0
ar0: ATA RAID1 subdisks: ad4 ad6 status: DEGRADED

1) You will first need to detach the disk from the array so that you can
safely remove it:
   # atacontrol detach 3

2) Replace the disk.
3) Reattach the disk as a spare
   # atacontrol attach 3
   Master:  ad6 <MAXTOR 6L080J4/A93.0500> ATA/ATAPI rev 5
   Slave:       no device present

- Rebuild the array
  # atacontrol rebuild ar0
- The rebuild command hangs until complete, so start another window
- Check on the progress:
- # dmesg | tail -10
  [snip]
  ad6: removed from configuration
  ad6: deleted from ar0 disk1
  ad6: inserted into ar0 disk1 as spare
  # atacontrol status ar0
  ar0: ATA RAID1 subdisks: ad4 ad6 status: REBUILDING 0% completed
- Wait till completed

--
Roy Hooper
Sr. System Administrator
Cyberus Online Inc.
http://www.cyberus.ca/
(613) 233-5555


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message



help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?01ef01c28cd5$e33eedb0$c701140a>