From owner-freebsd-stable@FreeBSD.ORG Thu Aug 3 05:50:59 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org 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 351FB16A4DA for ; Thu, 3 Aug 2006 05:50:59 +0000 (UTC) (envelope-from wayne@manor.msen.com) Received: from manor.msen.com (manor.msen.com [148.59.4.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA3BB43D53 for ; Thu, 3 Aug 2006 05:50:58 +0000 (GMT) (envelope-from wayne@manor.msen.com) Received: from manor.msen.com (localhost [127.0.0.1]) by manor.msen.com (8.12.11/8.12.11) with ESMTP id k735ovOj097662 for ; Thu, 3 Aug 2006 01:50:57 -0400 (EDT) (envelope-from wayne@manor.msen.com) Message-Id: <200608030550.k735ovOj097662@manor.msen.com> To: freebsd-stable@freebsd.org From: "Michael R. Wayne" Date: Thu, 03 Aug 2006 01:50:57 -0400 Sender: wayne@manor.msen.com Subject: fdisk problem on 3ware based system (6.1-RELEASE-p3) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2006 05:50:59 -0000 I see to have an fdisk issue on one of our boxes with a 3ware card. Relevant lines from dmesg: twe0: <3ware Storage Controller. Driver version 1.50.01.002> port 0x9c00-0x9c0f mem 0xfc000000-0xfc7fffff irq 20 at device 1.0 on pci2 twe0: 2 ports, Firmware FE8S 1.05.00.068, BIOS BE7X 1.08.00.048 twed0: on twe0 twed0: 76318MB (156299440 sectors) This started out because I am unable to create a new partition on a machine running 6.1-RELEASE-p3 and am beginning to suspect something is wrong in fdisk. If I run sysinstall and go to the partition editor, I get the following, which seems correct: Disk name: twed0 FDISK Partition Editor DISK Geometry: 9729 cyls/255 heads/63 sectors = 156296385 sectors (76316MB) Offset Size(ST) End Name PType Desc Subtype Flags 0 63 62 - 12 unused 0 63 31455207 31455269 twed0s1 8 freebsd 165 31455270 58717575 90172844 twed0s2 8 freebsd 165 90172845 66126595 156299439 - 12 unused 0 But, I am unable to create a third partition. Every time I do that, I get: ERROR: Unable to write data to disk twed0! This machine is not running with an elevated security level: kern.securelevel: -1 So, I decided to go in with fdisk and see what was up. It looks like fdisk is very confused on partition 2, which is likely why I can not create a partition 3 (even using fdisk): > fdisk /dev/twed0 ******* Working on device /dev/twed0 ******* parameters extracted from in-core disklabel are: cylinders=9729 heads=255 sectors/track=63 (16065 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=9729 heads=255 sectors/track=63 (16065 blks/cyl) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 63, size 31455207 (15358 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 1023/ head 254/ sector 63 The data for partition 2 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 31455270, size 58717575 (28670 Meg), flag 0 beg: cyl 1023/ head 255/ sector 63; end: cyl 1023/ head 254/ sector 63 <---------------- !! The data for partition 3 is: The data for partition 4 is: At this point, I'm suspecting that fdisk is computing something incorrectly and am not sure how to proceed as I'd prefer not to corrupt my disk label. Before I consider filing a PR, is this a known problem? /\/\ \/\/