From ishizuka@ish.org  Thu May  1 04:11:12 2003
Return-Path: <ishizuka@ish.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 777B237B401
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  1 May 2003 04:11:12 -0700 (PDT)
Received: from onion.ish.org (onion.ish.org [219.118.161.2])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 73C7143FA3
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  1 May 2003 04:11:11 -0700 (PDT)
	(envelope-from ishizuka@ish.org)
Received: from onion.ish.org (ishizuka@localhost [IPv6:::1])
	by onion.ish.org (8.12.9/8.12.9/2003-03-30) with ESMTP id h41BBAaO053582
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 1 May 2003 20:11:10 +0900 (JST)
	(envelope-from ishizuka@onion.ish.org)
Received: (from ishizuka@localhost)
	by onion.ish.org (8.12.9/8.12.9/Submit) id h41BBAHt053581;
	Thu, 1 May 2003 20:11:10 +0900 (JST)
	(envelope-from ishizuka)
Message-Id: <200305011111.h41BBAHt053581@onion.ish.org>
Date: Thu, 1 May 2003 20:11:10 +0900 (JST)
From: Masachika ISHIZUKA <ishizuka@ish.org>
Reply-To: Masachika ISHIZUKA <ishizuka@ish.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: ata RAID driver
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         51654
>Category:       kern
>Synopsis:       ata RAID driver
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    sos
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 01 04:20:12 PDT 2003
>Closed-Date:    Sun May 04 02:40:41 PDT 2003
>Last-Modified:  Sun May 04 02:40:41 PDT 2003
>Originator:     Masachika ISHIZUKA
>Release:        FreeBSD 4.8-RELEASE i386
>Organization:
>Environment:
System: FreeBSD onion.ish.org 4.8-RELEASE FreeBSD 4.8-RELEASE #0: Sat Apr 5 22:52:44 JST 2003 ishizuka@:/usr/src/sys/compile/onion i386


>Description:
	(1) Shifted ata raid drives display at boot.
	    [see freebsd-stable ML 2003-3-13 <3E70A7D6.1060409@pydo.org>]
	(2) 'atacontrol delete ar0' cannot delete ATA_MAGIC.
	    [see freebsd-stable ML 2002-9-30 <20020930.170110.74702592.ishizuka@ish.org>]
	(3) If disks broken when RAID1 or RAID0+1 with 'non-real' ATA RAID
	    controller, the new disks cannot be spare because of no
	    promise_raid_conf information on these disks.

>How-To-Repeat:
	
>Fix:

	Get the patch from ftp://ftp.ish.org/pub/work/ata-raid.diff
	and rebuild kernel and atacontrol command with it as follows.

	% su
	# cd /usr/src
	# patch -p < ata-raid.diff
	# cd /sys/i386/conf
	# config YOURKERNEL
	# cd ../../compile/YOURKERNEL
	# make depend && make && make install
	# cp -p /sys/sys/ata.h /usr/include/sys/
	# cd /usr/src/sbin/atacontrol/
	# make && make install
	# reboot

	Description (1) and (2) are corrected. You can use new
	'atacontrol spare' command and can replace new disks as follows.
	For example, ar0 is RAID1 of ad0 and ad2, and ad2 is broken.

	[1] If you use hot swap enclosures

	(a) atacontrol detach ata1
	(b) swap ad2 to a new disk.
	(c) atacontrol attach ata1
	(d) atacontrol spare ar0 ad2
	(e) atacontrol rebuild ar0

	[2] If you use non hot swap enculosures

	(a) shutdown -p now
	(b) swap ad2 to new disk.
	(c) power on and boot
	(d) atacontrol spare ar0 ad2
	(e) atacontrol rebuild ar0
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->sos 
Responsible-Changed-By: sos 
Responsible-Changed-When: Thu May 1 06:00:39 PDT 2003 
Responsible-Changed-Why:  
I have something semilar in a tree here that will hit -current 
sometime soon. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=51654 
State-Changed-From-To: open->closed 
State-Changed-By: sos 
State-Changed-When: Sun May 4 02:40:25 PDT 2003 
State-Changed-Why:  
Fixed in -current. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=51654 
>Unformatted:
