From owner-freebsd-bugs@FreeBSD.ORG Mon Aug 8 22:52:11 2005 Return-Path: X-Original-To: freebsd-bugs@FreeBSD.org Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D5C5616A41F; Mon, 8 Aug 2005 22:52:11 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailout2.pacific.net.au (mailout2.pacific.net.au [61.8.0.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4949243D5C; Mon, 8 Aug 2005 22:52:11 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.0.87]) by mailout2.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id j78MqAqQ002762; Tue, 9 Aug 2005 08:52:10 +1000 Received: from epsplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailproxy2.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id j78Mq8pa000328; Tue, 9 Aug 2005 08:52:09 +1000 Date: Tue, 9 Aug 2005 09:00:05 +1000 (EST) From: Bruce Evans X-X-Sender: bde@epsplex.bde.org To: Francis Gendreau In-Reply-To: <20050809050637.N644@epsplex.bde.org> Message-ID: <20050809082938.Y1154@epsplex.bde.org> References: <200507152302.j6FN2iGr059633@www.freebsd.org> <20050809050637.N644@epsplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-bugs@FreeBSD.org, freebsd-gnats-submit@FreeBSD.org Subject: Re: kern/83529: partition table corruption using wdc/wd driver X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Aug 2005 22:52:12 -0000 On Tue, 9 Aug 2005, Bruce Evans wrote: > However, the wdc/wd driver still seems to work well enough for disks > smaller than 137GB (1GB = 10^9 bytes). On my test system, there were > similar but not identical problems accessing partitions until I > configured the wd driver to use the "LBA addressing" flag 0x1000 (see > wd(4)). Try using this flag. It shouldn't be needed, but is needed > for all disks larger than 33GB due to driver bugs. Some disks have a > hard limit of 8GB, and the driver gets the test for this mostly wrong > and ends up intentionally breaking CHS above 33GB where it might work, > without intentionally breaking CHS between 8-33GB where it might not > work (the intentional breakage is just to truncate disks to a limit > above which the driver fears that they might not work). Oops. The test is correct. The 33GB limit is unrelated to hardware limits. It results from (virtual) disk geometries with more than 63 sectors being impractical because old BIOS interfaces are limited to this number and the wd driver doesn't change the CHS translation very much. In CHS mode, the driver uses the number of sectors in the current translation mode; this is set by the BIOS, so for not very old disks and not very new or very old BIOSes, it is almost always 63 instead of the maximum of 255, so the 137GB limit is reduced by a factor of 255/63 to become 33GB. The BIOS on my test machine is new enough to support 255 sectors, but I never use this because of compatibility problems (partition tables are still limited to 63 sectors of CHS addressing is used to boot). Bruce