From owner-freebsd-stable Thu Aug 22 15:37:58 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C1CCB37B400 for ; Thu, 22 Aug 2002 15:37:54 -0700 (PDT) Received: from mail.allcaps.org (h-66-166-142-198.SNDACAGL.covad.net [66.166.142.198]) by mx1.FreeBSD.org (Postfix) with ESMTP id 36AD943E6E for ; Thu, 22 Aug 2002 15:37:54 -0700 (PDT) (envelope-from bsder@mail.allcaps.org) Received: by mail.allcaps.org (Postfix, from userid 501) id BF44F153C6; Thu, 22 Aug 2002 15:37:48 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.allcaps.org (Postfix) with ESMTP id B267D153C2 for ; Thu, 22 Aug 2002 15:37:48 -0700 (PDT) Date: Thu, 22 Aug 2002 15:37:48 -0700 (PDT) From: "Andrew P. Lentvorski" To: freebsd-stable@freebsd.org Subject: Using atacontrol for RAID ... Message-ID: <20020822151955.Q36782-100000@mail.allcaps.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Okay, so I'm trying to use atacontrol to create a RAID system. I don't have a motherboard with a RAID controller. I do have a motherboard (Asus A7V133) which has 4 IDE ports. What is the magic command to rebuild a failed RAID array? Here's my procedure: 1) I do a clean install of FreeBSD from the 4.6 CD's 2) atacontrol RAID1 ad0 ad2 The system claims that ar0 is good to go 3) shutdown and reboot I get dropped at the mountroot> prompt and nothing seems to have an effect. Hrm. 4) shutdown 5) Restart a reinstall from the 4.6 CD's 6) The install program recognizes ar0 in spite of the fact that I don't have a root. Cool! So I create my partitions on ar0. 7) Finish reinstall 8) System claims to have an ar0 RAID device. Life is good. Okay, now comes the fun parts: Lets simulate a disk failure -- take 1: A) Shut down machine B) Disconnect drive ad2 C) Power on machine D) System powers up and works claiming a degraded array. Fine. E) Shut machine down. F) Reconnect original drive to ad2 with the expectation of a rebuild G) Power up machine. H) Receive kernel panic ... Uh, oh. Fine, the drive seems to have persistent information and the OS can't seem to tell which is the correct one. Yuk. Restart from step 1. And get back to a working ar0. Lets simulate a disk failure -- take 2: A) Shut down machine B) Disconnect drive ad2 C) Power on machine D) System powers up and works claiming a degraded array. Fine. E) Shut machine down. F) Reconnect sparkly new drive to ad2 with the expectation of a rebuild G) Power up machine H) Machine powers up with ad0 in a degraded ar0. Fine. New ad2 is also recognized, but not yet being used I) atacontrol status ar0 ar0: ATA RAID1 subdisks: ad0 DOWN status: DEGRADED J) atacontrol rebuild ar0 atacontrol: ioctl(ATARAIDREBUILD): Operation not supported by device K) atacontrol list ATA channel 0: Master: ad0 ATA/ATAPI rev 5 Slave: acd0 ATA/ATAPI rev 5 ATA channel 1: Master: ad2 ATA/ATAPI rev 5 Slave: no device present ATA channel 2: Master: ad4 ATA/ATAPI rev 5 Slave: no device present ATA channel 3: Master: no device present Slave: no device present L) atacontrol detach 1 ad2: removed from configuration M) atacontrol attach 1 ad2: 76345MB [155114/16/63] at ata1-master UDMA100 Master: ad2 ATA/ATAPI rev 5 Slave: no device present N) atacontrol rebuild ar0 atacontrol: ioctl(ATARAIDREBUILD): Operation not supported by device So, what do I do now? Thanks, -a To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message