From owner-freebsd-current@FreeBSD.ORG Mon Apr 21 14:05:36 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A763106566B; Mon, 21 Apr 2008 14:05:36 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 2771C8FC1B; Mon, 21 Apr 2008 14:05:35 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id m3LE5SGR068955; Mon, 21 Apr 2008 08:05:29 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <480C9F28.6050400@samsco.org> Date: Mon, 21 Apr 2008 08:05:28 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9 MIME-Version: 1.0 To: Dmitry Morozovsky References: 9060000000212025383 <1415691208445504@webmail12.yandex.ru> <48077B1C.5070608@samsco.org> <20080420185448.X56317@woozle.rinet.ru> <480B5DA0.6030404@samsco.org> <20080420192735.G56317@woozle.rinet.ru> <20080420193212.Y56317@woozle.rinet.ru> <20080420194331.Y56317@woozle.rinet.ru> <480B6664.9040602@samsco.org> <20080420201013.M56317@woozle.rinet.ru> <20080421140600.E72747@woozle.rinet.ru> In-Reply-To: <20080421140600.E72747@woozle.rinet.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=5.4 tests=ALL_TRUSTED autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: "Andrey V. Elsukov" , emaste@freebsd.org, current@freebsd.org, sos@freebsd.org Subject: Re: Adaptec 1420SA support? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2008 14:05:36 -0000 Dmitry Morozovsky wrote: > On Sun, 20 Apr 2008, Dmitry Morozovsky wrote: > > DM> SL> This is just yet another item in the long list of problems with the ata > DM> SL> driver. As a workaround, try the following patch: > DM> SL> > DM> SL> --- ata-raid.c > DM> SL> +++ ata-raid.c > DM> SL> @@ -146,7 +146,7 @@ > DM> SL> rdp->disk->d_mediasize = (off_t)rdp->total_sectors * DEV_BSIZE; > DM> SL> rdp->disk->d_fwsectors = rdp->sectors; > DM> SL> rdp->disk->d_fwheads = rdp->heads; > DM> SL> - rdp->disk->d_maxsize = 128 * DEV_BSIZE; > DM> SL> + rdp->disk->d_maxsize = 32768; > DM> SL> rdp->disk->d_drv1 = rdp; > DM> SL> rdp->disk->d_unit = rdp->lun; > DM> SL> /* we support flushing cache if all components support it */ > DM> > DM> I thought about just the same quick'n'dirty fix, but you're, as usual, quickier > DM> ;-) > DM> > DM> Here are the results: > DM> > DM> # bsdlabel -Bw ar0 > DM> # fdisk -s ar0 > DM> /dev/ar0: 9709 cyl 255 hd 63 sec > DM> Part Start Size Type Flags > DM> 4: 0 50000 0xa5 0x80 > DM> # bsdlabel -R ar0 /dev/stdin > DM> a: 256M 16 4.2BSD 0 0 > DM> b: 4G * swap 0 0 > DM> d: 4G * 4.2BSD 0.0 > DM> e: 8G * 4.2BSD 0 0 > DM> # bsdlabel ar0 > DM> # /dev/ar0: > DM> 8 partitions: > DM> # size offset fstype [fsize bsize bps/cpg] > DM> a: 524288 16 4.2BSD 0 0 0 > DM> b: 8388608 524304 swap > DM> c: 155985920 0 unused 0 0 # "raw" part, don't > DM> edit > DM> d: 8388608 8912912 4.2BSD 0 0 0 > DM> e: 16777216 17301520 4.2BSD 0 0 0 > DM> # newfs /dev/ar0a > DM> /dev/ar0a: 256.0MB (524288 sectors) block size 16384, fragment size 2048 > DM> using 4 cylinder groups of 64.02MB, 4097 blks, 8256 inodes. > DM> super-block backups (for fsck -b #) at: > DM> 160, 131264, 262368, 393472 > DM> GEOM: Reconfigure ar0a, start 8192 length 268435456 end 268443647 > DM> GEOM: Reconfigure ar0b, start 268443648 length 4294967296 end 4563410943 > DM> GEOM: Reconfigure ar0c, start 0 length 79864791040 end 79864791039 > DM> GEOM: Reconfigure ar0d, start 4563410944 length 4294967296 end 8858378239 > DM> GEOM: Reconfigure ar0e, start 8858378240 length 8589934592 end 17448312831 > DM> # > DM> > DM> Seems to behave well so far. Will test further. > > At least after simulating drive loss (atacotrol detach, atacontrol attach) I > can't rebuild ar0: > > marck@moleskin:~# atacontrol status ar0 > ar0: ATA RAID1 status: DEGRADED > subdisks: > 0 ad16 ONLINE > 1 ad18 ONLINE > marck@moleskin:~# atacontrol rebuild ar0 > atacontrol: ioctl(IOCATARAIDREBUILD): Input/output error > marck@moleskin:~# > > Or, should I wipe out ar label from the second disk to emulate disk > replacement? > Generating metadata is not supported, nor is automatic failover to a spare. If you're interested in working on the code, let me know and I'll help you get started. Scott