Date: Fri, 9 Jul 2010 15:40:47 GMT From: Daniel Feenberg <feenberg@nber.org> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/148471: fdisk prompts with negative partition size Message-ID: <201007091540.o69FelM9080964@www.freebsd.org> Resent-Message-ID: <201007091550.o69Fo2X6023440@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 148471 >Category: misc >Synopsis: fdisk prompts with negative partition size >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jul 09 15:50:02 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Daniel Feenberg >Release: 8.0-Release p2 >Organization: National Bureau of Economic Research >Environment: FreeBSD bulk4 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #0: Tue Jan 5 16:02:27 UTC 2010 root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386 >Description: With one of the new 2TB Samsung SATA drives with a 3ware controller (in single drive mode), fdisk reacts in a bizarre manner. Although it seems to extract the proper drive characteristics: > parameters extracted from in-core disklabel are: > cylinders=243151 heads=255 sectors/track=63 (16065 blks/cyl) When I modify parition 1 and accept all defaults, it suggests a negative value for size: > Do you want to change it? [n] y > > The static data for the slice 1 has been reinitialized to: > sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) > start 63, size 3906220752 (1907334 Meg), flag 80 (active) > beg: cyl 0/ head 1/ sector 1; > end: cyl 462/ head 254/ sector 63 > Supply a decimal value for "sysid (165=FreeBSD)" [165] > Supply a decimal value for "start" [63] > Supply a decimal value for "size" [-388746544] > Explicitly specify beg/end address ? [n] > sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) > start 63, size 3906220752 (1907334 Meg), flag 80 (active) > beg: cyl 0/ head 1/ sector 1; > end: cyl 462/ head 254/ sector 63 > Are we happy with this entry? [n] y Notice that the suggested value for size is -388746544 and the suggested end cylinder is 462 - both of which are implausible and inconsistent. Here is the info from dmesg about the drive: >How-To-Repeat: Obtain 2TB Samsung drive (and possibly 3Ware controller) and run fdisk -i /dev/... accepting all defaults as one defines a new partion. Note that this problem did not arise with 300GB drives on the same controller and an earlier version of FreeBSD. >Fix: Beyond my knowledge, but I can guess the problem comes from 32 bit integers, and perhaps upgrading to 64 bit FreeBSD would solve the problem for me. However, the bizarre behavior is a bug - if fdisk can't deal with the disk or controller it could say so explicitly. >Release-Note: >Audit-Trail: >Unformatted: >a2 at twa0 bus 0 target 2 lun 0 da2: <AMCC 9500S-8 DISK 2.06> Fixed Direct Access SCSI-3 device
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007091540.o69FelM9080964>